Skip to content

Conversation

@dygabo
Copy link
Member

This is a backport PR for PR #40980 (cc: @danielleadams)
During merging I did one branch for PR #40980 and #41218 according to input on the backport request thread from @Flarna
Additionally I had to cherry-pick the commit of PR #41132 (@aduh95) as this contains a bugfix needed by #40980

Following commits have been backported:

for PR #40980: 85d4cd3
for PR #41132: e5c1fd7
for PR #41218: 34e3dd5

Since this is my first backport PR hopefully I got all the detail steps right for the tooling to work properly.

make -j4 test passes all the tests.
make lint as well

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/modules

@nodejs-github-botnodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. v16.x labels Jan 29, 2022
dygabo added a commit to dynatrace-oss-contrib/node that referenced this pull request Jan 29, 2022
this commit solves a regression introduced with PR-40980. if a resolve call results in a script with .mjs extension the is automatically set to . This avoids the case where an additional in the same directory as the .mjs file would declare the to commonjs PR-URL: nodejs#41218 Refs: nodejs#40980 Refs: yargs/yargs#2068 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: nodejs#41752
@dygabodygaboforce-pushed the backport-40980-to-v16.x branch from 0cb30ba to 5fedf30CompareJanuary 29, 2022 16:41
@FlarnaFlarna added the loaders Issues and PRs related to ES module loaders label Jan 29, 2022
@Flarna
Copy link
Member

fyi @nodejs/loaders

@FlarnaFlarna added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2022
@nodejs-github-bot

This comment has been minimized.

@aduh95
Copy link
Contributor

Shouldn't 5fe75b0 come before c75d953?

dygabo added a commit to dynatrace-oss-contrib/node that referenced this pull request Jan 29, 2022
this commit solves a regression introduced with PR-40980. if a resolve call results in a script with .mjs extension the is automatically set to . This avoids the case where an additional in the same directory as the .mjs file would declare the to commonjs PR-URL: nodejs#41218 Refs: nodejs#40980 Refs: yargs/yargs#2068 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: nodejs#41752
@dygabodygaboforce-pushed the backport-40980-to-v16.x branch from 5fedf30 to 883c643CompareJanuary 29, 2022 18:31
@dygabo
Copy link
MemberAuthor

Shouldn't 5fe75b0 come before c75d953?

correct, done that. as they are disjunct, if these commits get squashed when merging this PR it shouldn't make a difference.

@aduh95
Copy link
Contributor

They won't get squashed, each commit will be cherry-picked on the staging branch when this PR lands (equivalent to the rebase and merge GitHub feature).

@aduh95aduh95 added the semver-minor PRs that contain new features and should be released in the next minor version. label Jan 29, 2022
@FlarnaFlarna added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2022
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@danielleadamsdanielleadams added the fast-track PRs that do not need to wait for 48 hours to land. label Jan 30, 2022
@github-actions
Copy link
Contributor

Fast-track has been requested by @danielleadams. Please 👍 to approve.

@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2022
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

danielleadams pushed a commit that referenced this pull request Feb 1, 2022
This is a proposed modification of defaultResolve to return the package format in case it has been found during package resolution. The format will be returned as described in the documentation: https://nodejs.org/api/esm.html#resolvespecifier-context-defaultresolve There is one new unit test as well: test/es-module/test-esm-resolve-type.js PR-URL: #40980 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Backport-PR-URL: #41752
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
this commit solves a regression introduced with PR-40980. if a resolve call results in a script with .mjs extension the is automatically set to . This avoids the case where an additional in the same directory as the .mjs file would declare the to commonjs PR-URL: #41218 Refs: #40980 Refs: yargs/yargs#2068 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: #41752
@danielleadams
Copy link
Contributor

@dygabo@Flarna This looks good, but the PR still needs to be rebased from the base branch for the original conflicts. I tried to run the rebase myself, but I think I need write access on the fork. I'm going to go ahead and prepare the release and then I can add pull in the backport tomorrow.

aduh95and others added 3 commits February 1, 2022 08:09
PR-URL: nodejs#41132 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Backport-PR-URL: nodejs#41752
This is a proposed modification of defaultResolve to return the package format in case it has been found during package resolution. The format will be returned as described in the documentation: https://nodejs.org/api/esm.html#resolvespecifier-context-defaultresolve There is one new unit test as well: test/es-module/test-esm-resolve-type.js PR-URL: nodejs#40980 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Backport-PR-URL: nodejs#41752
this commit solves a regression introduced with PR-40980. if a resolve call results in a script with .mjs extension the is automatically set to . This avoids the case where an additional in the same directory as the .mjs file would declare the to commonjs PR-URL: nodejs#41218 Refs: nodejs#40980 Refs: yargs/yargs#2068 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: nodejs#41752
@dygabodygaboforce-pushed the backport-40980-to-v16.x branch from ffa49d2 to 29a7f7bCompareFebruary 1, 2022 07:26
@dygabo
Copy link
MemberAuthor

@dygabo@Flarna This looks good, but the PR still needs to be rebased from the base branch for the original conflicts. I tried to run the rebase myself, but I think I need write access on the fork. I'm going to go ahead and prepare the release and then I can add pull in the backport tomorrow.

@danielleadams: I rebased the branch now on current head of v16.x-staging. Please let me know if it's fine now.

@FlarnaFlarna added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 1, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 1, 2022
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@Flarna
Copy link
Member

@danielleadams Any chance that this gets included into the upcoming node 16 release? Otherwise I fear we will end up again in a rebase cycle in next release.

@danielleadams
Copy link
Contributor

@Flarna yes, definitely. I'll pull this one in. The 16.x release won't go out for another week.

danielleadams pushed a commit that referenced this pull request Feb 5, 2022
PR-URL: #41132 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Backport-PR-URL: #41752 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Danielle Adams <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
danielleadams pushed a commit that referenced this pull request Feb 5, 2022
This is a proposed modification of defaultResolve to return the package format in case it has been found during package resolution. The format will be returned as described in the documentation: https://nodejs.org/api/esm.html#resolvespecifier-context-defaultresolve There is one new unit test as well: test/es-module/test-esm-resolve-type.js PR-URL: #40980 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Backport-PR-URL: #41752 Reviewed-By: Danielle Adams <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
danielleadams pushed a commit that referenced this pull request Feb 5, 2022
this commit solves a regression introduced with PR-40980. if a resolve call results in a script with .mjs extension the is automatically set to . This avoids the case where an additional in the same directory as the .mjs file would declare the to commonjs PR-URL: #41218 Refs: #40980 Refs: yargs/yargs#2068 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: #41752 Reviewed-By: Danielle Adams <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
@danielleadams
Copy link
Contributor

Landed in 99a90db...d422e58

@dygabodygabo deleted the backport-40980-to-v16.x branch February 10, 2022 18:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esmIssues and PRs related to the ECMAScript Modules implementation.fast-trackPRs that do not need to wait for 48 hours to land.fsIssues and PRs related to the fs subsystem / file system.loadersIssues and PRs related to ES module loadersneeds-ciPRs that need a full CI run.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@dygabo@nodejs-github-bot@Flarna@aduh95@danielleadams@GeoffreyBooth