Skip to content

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

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

Open
wants to merge 6 commits into
base: v22.x-staging
Choose a base branch
from

Conversation

Lordfirespeed
Copy link
Contributor

@Lordfirespeed Lordfirespeed commented Jun 12, 2025

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

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-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
@Lordfirespeed Lordfirespeed changed the title [Backport v22.x] esm: implement import.meta.main [v22.x backport] esm: implement import.meta.main Jun 12, 2025
@alexsch01
Copy link
Contributor

Should include #58661 if it doesn't already

@aduh95
Copy link
Contributor

aduh95 commented Jun 12, 2025

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

@Lordfirespeed
Copy link
Contributor Author

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

@Lordfirespeed Lordfirespeed force-pushed the backport-import-meta-main-to-v22.x branch from e529a26 to 8868f38 Compare June 13, 2025 18:18
@Lordfirespeed
Copy link
Contributor Author

Lordfirespeed commented Jun 13, 2025

@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
Contributor Author

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

@aduh95
Copy link
Contributor

aduh95 commented Jun 20, 2025

@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
Copy link
Member

marco-ippolito commented Jun 25, 2025

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

@Lordfirespeed
Copy link
Contributor Author

Lordfirespeed commented Jun 25, 2025

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
Copy link
Member

marco-ippolito commented Jun 25, 2025

Sorry I didnt notice it was already included. Looks good

Lordfirespeed and others added 6 commits June 26, 2025 22:14
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
Fixes: 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>
(cherry picked from commit bbc0593)
PR-URL: nodejs#58661
Fixes: 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>
(cherry picked from commit bba07d7)
document `isEntryPoint` parameter in JSDoc
fix: do not supply `undefined` for `phase` parameter

`phase` parameter doesn't exist in v22.x
add `--experimental-strip-types` flag to typescript tests
style: wrap long line + keep flag values on same line as flag
@Lordfirespeed Lordfirespeed force-pushed the backport-import-meta-main-to-v22.x branch from 25ba866 to ea7c98b Compare June 26, 2025 21:15
@richardlau
Copy link
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants