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

doc: clarify that conditional exports take effect with ES module #42336

Closed
wants to merge 1 commit into from
Closed

doc: clarify that conditional exports take effect with ES module #42336

wants to merge 1 commit into from

Conversation

meixg
Copy link
Member

@meixg meixg commented Mar 15, 2022

resolve: #36162


Self-referencing works fine without --experimental-modules in v12.16.0.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/modules

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 15, 2022
@meixg meixg requested a review from aduh95 March 15, 2022 04:56
@ljharb
Copy link
Member

ljharb commented Mar 15, 2022

I’m confused; ES module support was unflagged in v12.17; why would we want to document the flag for an EOL node version where it was experimental?

@meixg
Copy link
Member Author

meixg commented Mar 15, 2022

I’m confused; ES module support was unflagged in v12.17; why would we want to document the flag for an EOL node version where it was experimental?

There is a gap(v12.16.0) between ES module unflagged and conditional exports adding, people may get confused like #36162.

Also, "conditional exports take effect with ES module" seems not clarified.


Not sure if is necessary to document the flag for an EOL node version though.

@ljharb
Copy link
Member

ljharb commented Mar 15, 2022

I agree that’s not a complete sentence and is very confusing, but your PR is what’s adding that.

The linked issue is from almost 2 years ago. I don’t think this is what’s confusing people about ES modules (there’s a lot, but “i need to use a flag on my unsupported insecure buggy old node version” isn’t it)

Copy link
Member

@GeoffreyBooth GeoffreyBooth left a comment

Choose a reason for hiding this comment

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

I don’t think this is necessary information for the docs to include, especially since the unflagging was years ago.

@meixg
Copy link
Member Author

meixg commented Mar 15, 2022

kinda agree with that, maybe we can just close #36162 then?

@meixg meixg closed this Mar 15, 2022
@meixg meixg deleted the doc-conditional-exports-meixg branch March 15, 2022 05:23
@gpoole
Copy link
Contributor

gpoole commented Mar 15, 2022

The original issue was that the history section of the documentation currently indicates that support for this feature was completely unflagged in v12.16 when this isn't the case, since it was behind a second flag which isn't mentioned at all there. I feel that it's important for the history to be an accurate record of what changed when, regardless of how old, buggy or unsupported the version is, which is why I opened the issue originally.

I agree that it's now not relevant for the vast majority of people and shouldn't be called out explicitly in the main text for that section. It seems to me like a simple and unintrusive fix is to correct the inaccuracy with a new entry in the history like this:

v12.16.0 Remove the --experimental-conditional-exports option, conditional exports now behind --experimental-modules
v12.17.0 Remove --experimental-modules flag

I'm happy to open a PR for that if it's likely to be accepted.

@ljharb
Copy link
Member

ljharb commented Mar 15, 2022

That sounds great to me! Accurate history is good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: history shows wrong version for conditional package export support
5 participants