Skip to content

Conversation

@cspotcode
Copy link
Collaborator

@cspotcode cspotcode commented Feb 22, 2021

Fix #1229
Also fixes #1235

always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when ESM loader is not loaded

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #1232 (8642890) into master (f6ed08c) will increase coverage by 0.70%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
src/index.ts 80.43% <100.00%> (+0.38%) ⬆️
dist-raw/node-cjs-loader-utils.js 89.79% <0.00%> (+6.12%) ⬆️
dist-raw/node-internal-fs.js 87.50% <0.00%> (+12.50%) ⬆️

@cspotcode cspotcode changed the title Fix #1229: always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when ESM loader is not loaded Fix #1229 and #1235: always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when ESM loader is not loaded Feb 22, 2021
@cspotcode cspotcode changed the title Fix #1229 and #1235: always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when ESM loader is not loaded Fix #1229 and #1235: [BREAKING] always throw ERR_REQUIRE_ESM when attempting to execute ESM as CJS, even when ESM loader is not loaded Feb 22, 2021
@cspotcode cspotcode marked this pull request as ready for review February 22, 2021 16:56
@cspotcode cspotcode merged commit e53619e into master Feb 22, 2021
@cspotcode cspotcode added this to the 10.0.0 milestone May 15, 2021
@cspotcode cspotcode deleted the ab/issue-1229 branch October 11, 2021 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assertScriptCanLoadAsCJS() can trigger self when loading assertScriptCanLoadAsCJSImpl Make attempts to require() ESM *always* throw error

2 participants