Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore devDependencies when generating tsconfig.json #16659

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jul 17, 2024

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This PR lets us publish d.ts for Babel 8.

There is only one remaining cycle between our packages (@babel/core <> @babel/helper-module-transforms), which will go away in Babel 8 as we'll remove the dependency. This cycle doesn't affect types, so we can manually ignore it.

This PR also improves type checking time: it's now 29s for a full clean make tscheck and 12s for a subsequent make tscheck run on my machine.

@nicolo-ribaudo nicolo-ribaudo changed the title Move ensureFunctionName to NodePath.prototype Ignore devDependencies when generating tsconfig.json Jul 17, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Jul 17, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57509

@nicolo-ribaudo nicolo-ribaudo force-pushed the feat-7.25.0/remove-cycles branch 2 times, most recently from bcac3c8 to 62b12b0 Compare July 26, 2024 10:30
@nicolo-ribaudo nicolo-ribaudo deleted the branch babel:main July 26, 2024 12:21
@nicolo-ribaudo nicolo-ribaudo changed the base branch from feat-7.25.0/remove-cycles to main July 26, 2024 12:26
@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review July 29, 2024 13:27
@nicolo-ribaudo nicolo-ribaudo changed the title Ignore devDependencies when generating tsconfig.json Ignore devDependencies when generating tsconfig.json Jul 29, 2024
@nicolo-ribaudo nicolo-ribaudo added PR: Internal (next major) 🏠 A type of pull request used for our changelog categories for next major release PR: Internal 🏠 A type of pull request used for our changelog categories and removed PR: Internal (next major) 🏠 A type of pull request used for our changelog categories for next major release PR: Internal 🏠 A type of pull request used for our changelog categories labels Jul 29, 2024
Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.

@@ -39,7 +55,7 @@ function getTsPkgs(subRoot) {
name === "@babel/compat-data" ||
fs.existsSync(new URL(relative + "/src/index.ts", rootURL));
if (!ret) {
console.log(`Skipping ${name} for tsconfig.json`);
// console.log(`Skipping ${name} for tsconfig.json`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was just annoying whenever we have empty folders due to changing branch 😅

I left it commented out so that we can re-enable it if we have to debug the script.

@nicolo-ribaudo nicolo-ribaudo merged commit dba45d3 into babel:main Jul 31, 2024
50 of 51 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the nice-tsconfig branch July 31, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants