Skip to content

[v22.x backport] esm: implement import.meta.main - #58693

Merged
aduh95 merged 2 commits into
nodejs:v22.x-stagingfrom
Lordfirespeed:backport-import-meta-main-to-v22.x
Jul 28, 2025
Merged

[v22.x backport] esm: implement import.meta.main#58693
aduh95 merged 2 commits into
nodejs:v22.x-stagingfrom
Lordfirespeed:backport-import-meta-main-to-v22.x

Conversation

@Lordfirespeed

@LordfirespeedLordfirespeed commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

Backport #57804 and #58661 to v22.x release line

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v22.x Issues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch. labels Jun 12, 2025
@LordfirespeedLordfirespeed changed the title [Backport v22.x] esm: implement import.meta.main[v22.x backport] esm: implement import.meta.mainJun 12, 2025
@alexsch01

Copy link
Copy Markdown
Contributor

Should include #58661 if it doesn't already

@aduh95

Copy link
Copy Markdown
Contributor

We should only pick the commits that have landed on main, this PR have 47 commits that are not on main

@Lordfirespeed

Copy link
Copy Markdown
ContributorAuthor

Ah, my bad, I probably picked commits from the wrong branch.

@Lordfirespeed
Lordfirespeedforce-pushed the backport-import-meta-main-to-v22.x branch from e529a26 to 8868f38CompareJune 13, 2025 18:18
@Lordfirespeed

Lordfirespeed commented Jun 13, 2025

Copy link
Copy Markdown
ContributorAuthor

@aduh95 to adhere to the 'only commits that landed' rule, should I squash the new commits into a landed commit? or are commits for manual resolution after cherry-picking OK?

@Lordfirespeed

Copy link
Copy Markdown
ContributorAuthor

What's the deal here? I don't understand why CI is failing 🤔

@aduh95

Copy link
Copy Markdown
Contributor

@aduh95 to adhere to the 'only commits that landed' rule, should I squash the new commits into a landed commit? or are commits for manual resolution after cherry-picking OK?

You can use git commit --fixup <commit-sha>, so it's easier to review and squash those additional commits upon landing.

What's the deal here? I don't understand why CI is failing 🤔

It looks like the Coverage CI is broken on that branch, unrelated to your changes. The macOS one timed out, also probably unrelated to your changes.

@marco-ippolito

marco-ippolito commented Jun 25, 2025

Copy link
Copy Markdown
Member

can you include bba07d7 in the backport (if lands cleanly otherwise I can open a backport)

@Lordfirespeed

Lordfirespeed commented Jun 25, 2025

Copy link
Copy Markdown
ContributorAuthor

can you include bba07d7 in the backport (if lands cleanly otherwise I can open a backport)

'In addition to' or 'instead of' d8d3b07 (which is currently included) ?

@marco-ippolito

marco-ippolito commented Jun 25, 2025

Copy link
Copy Markdown
Member

Sorry I didnt notice it was already included. Looks good

@Lordfirespeed
Lordfirespeedforce-pushed the backport-import-meta-main-to-v22.x branch from 25ba866 to ea7c98bCompareJune 26, 2025 21:15
@richardlau

Copy link
Copy Markdown
Member

What's the deal here? I don't understand why CI is failing 🤔

It looks like the Coverage CI is broken on that branch, unrelated to your changes.

FWIW the broken Coverage Windows GitHub Workflow is the same breakage as #58801 (and unrelated to this PR). cc FYI @nodejs/releasers

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Lordfirespeed
Lordfirespeedforce-pushed the backport-import-meta-main-to-v22.x branch from ea7c98b to d546c7aCompareJuly 24, 2025 00:16
@Lordfirespeed

Copy link
Copy Markdown
ContributorAuthor

Rebased onto v22.x-staging

@aduh95

Copy link
Copy Markdown
Contributor

Can you please rebase?

@Lordfirespeed
Lordfirespeedforce-pushed the backport-import-meta-main-to-v22.x branch from d546c7a to 917555bCompareJuly 24, 2025 21:41
@Lordfirespeed

Lordfirespeed commented Jul 24, 2025

Copy link
Copy Markdown
ContributorAuthor

Something weird happened and I had to drop a couple of commits, then redo the rebase - let me know whether or not things look OK

@aduh95
aduh95force-pushed the backport-import-meta-main-to-v22.x branch 2 times, most recently from 686d42a to ee7910eCompareJuly 27, 2025 21:37
@aduh95

Copy link
Copy Markdown
Contributor

Rebased on top of v22.x, fixed the commit message

@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 27, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 27, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Lordfirespeedand others added 2 commits July 28, 2025 08:46
Boolean value to check if an ES Module is the entrypoint of the
current process.
Implements: nodejs#57226
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs#57804
Backport-PR-URL: nodejs#58693Fixes: nodejs#57226
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: nodejs#58661
Backport-PR-URL: nodejs#58693Fixes: nodejs#58660
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@aduh95
aduh95force-pushed the backport-import-meta-main-to-v22.x branch from ee7910e to 2fc8989CompareJuly 28, 2025 06:46
@aduh95
aduh95 merged commit 2fc8989 into nodejs:v22.x-stagingJul 28, 2025
@aduh95

Copy link
Copy Markdown
Contributor

Landed in f99aa74...2fc8989

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.v22.xIssues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Lordfirespeed@nodejs-github-bot@alexsch01@aduh95@marco-ippolito@richardlau