node icon indicating copy to clipboard operation
node copied to clipboard

module: remove bogus assertion in CJS entrypoint handling with --import

Open joyeecheung opened this issue 1 year ago β€’ 3 comments

The synchronous CJS translator can handle entrypoints now, this can be hit when --import is used, so lift the bogus assertions and added tests.

Fixes: https://github.com/nodejs/node/issues/54577

joyeecheung avatar Aug 27 '24 15:08 joyeecheung

Review requested:

  • [ ] @nodejs/loaders

nodejs-github-bot avatar Aug 27 '24 15:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61555/

nodejs-github-bot avatar Aug 27 '24 16:08 nodejs-github-bot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.33%. Comparing base (cc26951) to head (68be620). Report is 1334 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #54592      +/-   ##
==========================================
- Coverage   87.34%   87.33%   -0.01%     
==========================================
  Files         649      649              
  Lines      182544   182600      +56     
  Branches    35030    35031       +1     
==========================================
+ Hits       159445   159481      +36     
- Misses      16372    16392      +20     
  Partials     6727     6727              
Files with missing lines Coverage Ξ”
lib/internal/modules/esm/translators.js 91.46% <ΓΈ> (-0.59%) :arrow_down:

... and 56 files with indirect coverage changes

codecov[bot] avatar Aug 27 '24 17:08 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/61589/

nodejs-github-bot avatar Aug 28 '24 13:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61605/

nodejs-github-bot avatar Aug 28 '24 21:08 nodejs-github-bot

Happened to notice that this should've used spawnSyncAndAssert(), so fixed that as well

joyeecheung avatar Aug 28 '24 22:08 joyeecheung

CI: https://ci.nodejs.org/job/node-test-pull-request/61665/

nodejs-github-bot avatar Aug 29 '24 16:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61718/

nodejs-github-bot avatar Aug 30 '24 18:08 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61787/

nodejs-github-bot avatar Sep 01 '24 13:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61829/

nodejs-github-bot avatar Sep 02 '24 15:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61871/

nodejs-github-bot avatar Sep 03 '24 17:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61896/

nodejs-github-bot avatar Sep 04 '24 07:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61908/

nodejs-github-bot avatar Sep 04 '24 11:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/61916/

nodejs-github-bot avatar Sep 04 '24 12:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62021/

nodejs-github-bot avatar Sep 05 '24 22:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62138/

nodejs-github-bot avatar Sep 07 '24 23:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62470/

nodejs-github-bot avatar Sep 16 '24 10:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62472/

nodejs-github-bot avatar Sep 16 '24 11:09 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/62473/

nodejs-github-bot avatar Sep 16 '24 12:09 nodejs-github-bot

CI was orange, though the bot seems to fail to communicate that to GitHub again.

joyeecheung avatar Sep 17 '24 10:09 joyeecheung

Landed in 3c4ef343eeb4

joyeecheung avatar Sep 17 '24 10:09 joyeecheung

Backport in https://github.com/nodejs/node/pull/56927

joyeecheung avatar Feb 06 '25 00:02 joyeecheung