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

Fix TypeScript type imports #3

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Fix TypeScript type imports #3

merged 1 commit into from
Jul 11, 2022

Conversation

remcohaszing
Copy link
Member

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

TypeScript 4.7 includes the new node16 module resolution value. This requires imports to have an extension, even if the import doesn’t reference an existing .js file.

TypeScript 4.7 includes the new `node16` module resolution value. This
requires imports to have an extension, even if the import doesn’t
reference an existing `.js` file.

This still works with other module resolution values.
@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Jul 11, 2022
@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jul 11, 2022
@ChristianMurphy
Copy link
Member

And to confirm, this doesn't break backwards compatibility with node (without the 16)?

@remcohaszing
Copy link
Member Author

Nope, just reran npm test locally with moduleResolution reverted to be absolutely sure. I think it makes sense to set moduleResolution to node16 as it appears to be slightly more strict.

@wooorm wooorm changed the title Fix Node type imports Fix TypeScript type imports Jul 11, 2022
@wooorm wooorm merged commit bc1154c into syntax-tree:main Jul 11, 2022
@wooorm wooorm added ☂️ area/types This affects typings 💪 phase/solved Post is done labels Jul 11, 2022
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jul 11, 2022
@wooorm
Copy link
Member

wooorm commented Jul 11, 2022

Released in 1.2.1!

alecmev added a commit to alecmev/unist-util-visit that referenced this pull request Aug 21, 2022
alecmev added a commit to alecmev/unist-util-visit-parents that referenced this pull request Aug 21, 2022
wooorm pushed a commit to syntax-tree/unist-util-visit-parents that referenced this pull request Aug 21, 2022
Closes GH-12.
Related-to: syntax-tree/mdast-util-mdxjs-esm#3.
Related-to: syntax-tree/unist-util-visit#35.

Reviewed-by: JounQin <admin@1stg.me>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
wooorm pushed a commit to syntax-tree/unist-util-visit that referenced this pull request Aug 21, 2022
Closes GH-35.
Related-to: syntax-tree/mdast-util-mdxjs-esm#3.
Related-to: syntax-tree/unist-util-visit-parents#12.

Reviewed-by: JounQin <admin@1stg.me>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☂️ area/types This affects typings 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants