-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add .js
file extension to all in-project imports
#10994
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
size-limit report 📦
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
A new release has been made for this PR. You can install it with |
Bundling changes from a TypeScript perspective can be seen here: AreTheTypesWrong result for @apollo/[email protected] AreTheTypesWrong result for @apollo/[email protected] => we're probably not end up "perfect" without an |
.js
file extension to all in-project imports.js
file extension to all in-project imports
A PR that I made over in attw (arethetypeswrong/arethetypeswrong.github.io#46) now also checks all entry points and just revealed one more wrong import, and now it seems we're as good as we can be: I guess we should add this check to our CI once it's merged?
(For comparison, here is the result for AC 3.7) |
So we now get AreTheTypesWrong results in the Job Summary. I believe that's good enough and probably better than having yet another bot comment? |
I'm totally fine with this. We've got a decent amount of noise with bot comments right now, so the check seems reasonable to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be great to land this change. Thanks for hitting this up so fast!
config/rollup.config.js
Outdated
@@ -137,7 +163,8 @@ function prepareBundle({ | |||
|
|||
export default [ | |||
...entryPoints.map(prepareBundle), | |||
// Convert the ESM entry point to a single CJS bundle. | |||
//.filter(x => x.input.includes("utilities")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//.filter(x => x.input.includes("utilities")), |
Do we need this line?
config/rollup.config.js
Outdated
@@ -109,9 +109,12 @@ function prepareBundle({ | |||
|
|||
return { | |||
input: inputFile, | |||
/* | |||
external(id, parentId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed anymore? I see its commented out, so perhaps we can just remove it altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's quite a bunch of stuff that can be completely removed at this point - also the full postprocessDist.ts
- I'm gonna do another cleanup on this :)
config/postprocessDist.ts
Outdated
}); | ||
// since we have all the file extensions in the src directory now, we can | ||
// skip that part | ||
// and the other PR will remove the __DEV__ check, so this whole file can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
config/rollup.config.js
Outdated
@@ -137,7 +163,8 @@ function prepareBundle({ | |||
|
|||
export default [ | |||
...entryPoints.map(prepareBundle), | |||
// Convert the ESM entry point to a single CJS bundle. | |||
//.filter(x => x.input.includes("utilities")), | |||
// Convert the ESM entry point to a single CJS bundle.# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Convert the ESM entry point to a single CJS bundle.# | |
// Convert the ESM entry point to a single CJS bundle. |
Differences between before this change and after can now be seen in the "Summary" tab of the "Compare Build Output" GitHub action. |
Okay, let's get this in :) |
Triggered by #9890 - I'm not sure yet how to validate that this is not a breaking change in some environments. Ideas welcome.
Checklist: