node
node copied to clipboard
module: remove bogus assertion in CJS entrypoint handling with --import
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
Review requested:
- [ ] @nodejs/loaders
CI: https://ci.nodejs.org/job/node-test-pull-request/61555/
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: |
CI: https://ci.nodejs.org/job/node-test-pull-request/61589/
CI: https://ci.nodejs.org/job/node-test-pull-request/61605/
Happened to notice that this should've used spawnSyncAndAssert(), so fixed that as well
CI: https://ci.nodejs.org/job/node-test-pull-request/61665/
CI: https://ci.nodejs.org/job/node-test-pull-request/61718/
CI: https://ci.nodejs.org/job/node-test-pull-request/61787/
CI: https://ci.nodejs.org/job/node-test-pull-request/61829/
CI: https://ci.nodejs.org/job/node-test-pull-request/61871/
CI: https://ci.nodejs.org/job/node-test-pull-request/61896/
CI: https://ci.nodejs.org/job/node-test-pull-request/61908/
CI: https://ci.nodejs.org/job/node-test-pull-request/61916/
CI: https://ci.nodejs.org/job/node-test-pull-request/62021/
CI: https://ci.nodejs.org/job/node-test-pull-request/62138/
CI: https://ci.nodejs.org/job/node-test-pull-request/62470/
CI: https://ci.nodejs.org/job/node-test-pull-request/62472/
CI: https://ci.nodejs.org/job/node-test-pull-request/62473/
CI was orange, though the bot seems to fail to communicate that to GitHub again.
Landed in 3c4ef343eeb4
Backport in https://github.com/nodejs/node/pull/56927