-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: throw on require('./path.mjs');
This is an extremely important part of the ESM implementation that should have been unflagged as a breaking change in v12.0.0 to allow us to unflag ESM in Node.js 12.x before LTS. Assuming we can get consensus on this behavior I would argue that this Semver-Major behavior change could be viewed as a Semver-Patch fix in v12.0.1 PR-URL: #27417 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
- Loading branch information
1 parent
5bcd770
commit 014a9fd
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict'; | ||
require('../common'); | ||
const assert = require('assert'); | ||
|
||
assert.throws( | ||
() => require('../fixtures/es-modules/test-esm-ok.mjs'), | ||
{ | ||
message: /Must use import to load ES Module/, | ||
code: 'ERR_REQUIRE_ESM' | ||
} | ||
); |