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

Backport clarification - pattern trailers #690

Closed
guybedford opened this issue Aug 26, 2021 · 8 comments
Closed

Backport clarification - pattern trailers #690

guybedford opened this issue Aug 26, 2021 · 8 comments

Comments

@guybedford
Copy link

I'd like to request some backporting guidance on nodejs/node#39635 as to whether it would be possible to backport this to the 12.x branch.

The reason why this requires clarification is because, strictly speaking, it is a minor change as it extends the ESM resolver to support "exports" field mappings like "./*.js": "./dist/*.js" whereas previously we only supported "./*": "./dist/*" mappings with the * always being at the end of the match key on the left.

I'm opening discussion here because if it were possible to backport this PR that would allow us to update our package guidelines sooner for package authors to encourage the new form as a best-practise whereas otherwise we would have to wait until 12 EOL until that could happen (although not that long away either now!).

Thoughts or feedback either way on this would be a great help to understand the best route forward here.

@targos
Copy link
Member

targos commented Aug 27, 2021

From https://github.com/nodejs/Release#release-phases:

Maintenance - Critical bug fixes and security updates. New features may be added at the discretion of the LTS team - typically only in cases where the new feature supports migration to later release lines.

I think we've already used this exception in v12.x for other ESM changes. /cc @MylesBorins

@MylesBorins
Copy link
Contributor

I'm waffling on this one. It is a non-trivial feature and it isn't yet battle tested. If we were to backport I'd want to see more usage on 16, a backport to 14, and no major issues first

@guybedford
Copy link
Author

The 14.x backport finally landed in nodejs/node#39888 here previously and is currently set to go out in 14.18.2.

As soon as that release goes out I would really still like to push for a 12.x backport primarily so that we can encourage and document that users do "./*.js": "./dist/*.js" as a best-practice for modules to have better support with import maps in future, and wouldn't want to document such a pattern while Node.js 12 compat remains broken.

@MylesBorins no issues have come up so far, is there anything else you'd like to see here further?

@MylesBorins
Copy link
Contributor

The only thing that I'd point out is that this change is Semver-Minor... so it probably should go out in 14.19.0

@targos
Copy link
Member

targos commented Oct 19, 2021

Wouldn't it be better to release it in v14.x and v12.x at the same time?

@MylesBorins
Copy link
Contributor

@targos it would be good to have in both for sure, but I'm unclear if we want to do another semver-minor of 12.x so close to EOL

@BethGriggs
Copy link
Member

It looks like this was shipped on Node.js 14 (v14.19.0). We now have no further minor releases scheduled for Node.js 12. And, with only ~2 months left before Node.js 12 goes End-of-Life IMO the impact of backporting is reduced.

If there's now general agreement that we shouldn't ship on Node.js 12, I think this can be closed.

@guybedford
Copy link
Author

Thank you @BethGriggs for the follow-up here. Two months shouldn't be an issue - once we hit April I will then post the documentation update PR with regards to pattern trailers having full support.

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

No branches or pull requests

4 participants