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.
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
modules: runtime deprecate subpath folder mappings #35747
modules: runtime deprecate subpath folder mappings #35747
Changes from all commits
f258111
dda5369
8a517bd
0460eb4
4caaf60
6bf53be
e33c7ac
850772a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
would it be reasonable in this message to mention which node versions support subpath patterns, so package authors don't unknowingly make a breaking change?
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.
We have version information in the documentation for this under the exports field.
Keeping it up to date here might be tricky though, especially with a backport still in progress.
It's a good point though - we could possibly delay this landing until the 12 backport is released if you'd prefer.
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.
I don't think we should print version information here. It should be available in the docs and to the best of my knowledge we d not have that information available in any other deprecation warnings
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.
Fair. How likely are other deprecation warnings to cause package breakage compared to this one? Maybe we could at least say "Please check the docs for which node versions support subpath patterns" and link them there?
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.
Subpath patterns are on 14.13, 15 and will be backported to 12 very soon so I'm just not sure what value there is in muddying the advice for users here? The deprecation has a clear action and that is to move away from the feature or upgrade to subpaths.
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.
Just because node doesn’t support a version doesn’t mean package authors don’t. It’s obv fine if you don’t want to take my suggestion, but i think the risk of causing breakage is far greater than the risk of someone remaining on slash patterns due to an extra sentence.
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.
Agreed there is a risk, but my concern is that any advice with respect to being cautious about subpaths support will be outdated by the time most users read it.
Even if we weren't backporting to Node.js 12, a deprecation of a feature on 15/16 that points to using a feature only available on 14 seems fine to me and I'm not sure there is precedent for warning users from using a feature (from the web to Node.js) just because it's not available 3 versions back.
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.
(within the platform warning itself)