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

[meta] fix "exports" for node 13.0-13.6 #4

Merged
merged 1 commit into from
Jun 26, 2022

Conversation

ljharb
Copy link
Contributor

@ljharb ljharb commented Jun 24, 2022

engines.node explicitly says ">= 6", which includes node 13.0-13.6, which is broken without this change.

This came up because @babel/generator now depends on this package.

`engines.node` explicitly says ">= 6", which includes node 13.0-13.6, which is broken without this change.

This came up because `@babel/generator` now depends on this package.
@jridgewell
Copy link
Owner

@JLHwung
Copy link

JLHwung commented Jun 24, 2022

Conditional exports, first introduced in 13.2, were behind the flag --experimental-conditional-exports in Node 13.2 - 13.6: https://nodejs.org/docs/v13.6.0/api/esm.html#esm_conditional_exports The link you provided is the latest v13 doc.

@ljharb
Copy link
Contributor Author

ljharb commented Jun 24, 2022

Yep - node 13.0-13.1 only supports the string form (which is a bug that those versions of node consider "exports" at all), and 13.2-13.6 only support "default" (13.7 added "require"). The string fallback should cover both (adding "default" to the object would cover 13.3-13.6 alone)

ljharb added a commit to ljharb/npm-deprecations that referenced this pull request Jun 24, 2022
ljharb added a commit to ljharb/npm-deprecations that referenced this pull request Jun 24, 2022
@jridgewell
Copy link
Owner

Ok. What's the urgency of this to release?

@ljharb
Copy link
Contributor Author

ljharb commented Jun 25, 2022

I mean, I’d say low given that few people are using node 13.0-13.6, but I’d hope it would be a quick patch regardless?

jridgewell added a commit to jridgewell/resolve-uri that referenced this pull request Jun 26, 2022
jridgewell added a commit to jridgewell/set-array that referenced this pull request Jun 26, 2022
jridgewell added a commit to jridgewell/trace-mapping that referenced this pull request Jun 26, 2022
@jridgewell jridgewell merged commit 4308671 into jridgewell:main Jun 26, 2022
@jridgewell
Copy link
Owner

Thanks! Released in v0.3.2.

@ljharb ljharb deleted the patch-1 branch June 26, 2022 16:13
jridgewell added a commit to jridgewell/sourcemap-codec that referenced this pull request Jun 26, 2022
ljharb added a commit to ljharb/npm-deprecations that referenced this pull request Jun 27, 2022
jridgewell added a commit to jridgewell/sourcemaps that referenced this pull request Dec 2, 2024
jridgewell added a commit to jridgewell/sourcemaps that referenced this pull request Dec 2, 2024
[meta] fix "exports" for node 13.0-13.6
jridgewell added a commit to jridgewell/sourcemaps that referenced this pull request Dec 2, 2024
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.

3 participants