Skip to content

Backport clarification - pattern trailers #690

Description

@guybedford

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.

Activity

  1. targos commented on Aug 27, 2021

    @targos
    Member

    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

  2. MylesBorins commented on Aug 30, 2021

    @MylesBorins
    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

  3. guybedford commented on Oct 18, 2021

    @guybedford
    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?

  4. MylesBorins commented on Oct 19, 2021

    @MylesBorins
    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

  5. targos commented on Oct 19, 2021

    @targos
    Member

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

  6. MylesBorins commented on Oct 19, 2021

    @MylesBorins
    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

  7. BethGriggs commented on Feb 17, 2022

    @BethGriggs
    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.

  8. guybedford commented on Feb 17, 2022

    @guybedford
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions