-
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
Change relative import to extensioned variations for Node16 and NodeNext #6399
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ext type support (#6380) - chore(msal-node): add $schema props for schema validation - test(msal-node): add support for .js extension import - build(msal-node): remove redundant pass - feat(msal-node): change all relative imports to .js I've made meaningful commits, so I recommend you review them instead of all the files at once. The other solutions are: 1. to manually transform d.ts files after the build, which is a great way to introduce both complexity and brittleness to the project 2. use self-imports, allowing many entry-points `import { Configuration } from "@azure/msal-node/config/Configuration"` letting typescript and node to each resolve it in the way they understand. But this is a massive design-shift 3. using package.json `"imports"` entry. Just changing one problem for another, not a real solution and doesn't scale 4. emitting 2 `d.ts` versions, `d.mts` and `d.cts`. Thats possible but just.. redundant? There are a few oddities, like the meme extensions importing only within their meme domain, but `d.ts` referencing non-existent `.js` files. Which is fine because it will just direct _Typescript_ to the correct `d.ts` and there isn't an interface difference between cjs and esm. Also `jest` had to be adjusted since it never got the memo that 3 LTS versions ago nodejs started supporting and advocating for `.js` extensions. If we ditch one of the meme extensions then this would be visually less scary, though it should be just as safe as it is now. closes #6377 personal note: Please don't bike-shed this pr for months, yes it would probably break node versions before 12 but come on. [even 16 is literally days away from deprecation](https://github.com/nodejs/release#release-schedule), it would be absolutely unreasonable.. This is over all a small change with a visually large foot print
tnorling
requested review from
sameerag,
hectormmg,
peterzenz,
jennyf19,
jmprieur,
bgavrilMS and
Robbie-Microsoft
as code owners
August 26, 2023 00:24
Codecov Report
|
🎉 |
konstantin-msft
approved these changes
Aug 28, 2023
change/@azure-msal-node-fd9abab4-f755-4c59-8e63-744eefaee29b.json
Outdated
Show resolved
Hide resolved
tnorling
commented
Aug 28, 2023
change/@azure-msal-node-fd9abab4-f755-4c59-8e63-744eefaee29b.json
Outdated
Show resolved
Hide resolved
sameerag
approved these changes
Aug 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses Node 16 and NodeNext moduleResolution types
Thanks @datner for the PR!