Skip to content
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

esm: --experimental-default-type flag to flip module defaults #49869

Merged
merged 24 commits into from
Sep 29, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c7b6685
esm: --experimental-default-type flag to flip module defaults
GeoffreyBooth Sep 16, 2023
e2bfe8a
add flag, tests
GeoffreyBooth Sep 16, 2023
d51cabc
Rename files
GeoffreyBooth Sep 17, 2023
e253231
Modernize, add to tests
GeoffreyBooth Sep 23, 2023
7feafa5
Get flag working for extensionless entry points and imports
GeoffreyBooth Sep 24, 2023
ebc5795
Move Wasm tests
GeoffreyBooth Sep 24, 2023
f4d9367
Write tests for all intended functionality of the new flag
GeoffreyBooth Sep 24, 2023
74fed34
Fix --check
GeoffreyBooth Sep 24, 2023
2a96125
Fix --eval, STDIN
GeoffreyBooth Sep 24, 2023
73ff39a
Support extensionless Wasm in explicit or default-via-flag "module" s…
GeoffreyBooth Sep 24, 2023
70366fb
Fix package scopes
GeoffreyBooth Sep 24, 2023
9b3b7c4
Move test
GeoffreyBooth Sep 24, 2023
7075fcd
Simplify tests
GeoffreyBooth Sep 24, 2023
b1c3ac2
Lint
GeoffreyBooth Sep 24, 2023
d0939f0
Review notes
GeoffreyBooth Sep 26, 2023
6497dbe
Apply suggestions from code review
GeoffreyBooth Sep 26, 2023
6b1a515
Allow --input-type to be used with --experimental-type
GeoffreyBooth Sep 26, 2023
d682003
Add TODO
GeoffreyBooth Sep 26, 2023
4c5238d
Lint
GeoffreyBooth Sep 26, 2023
3874795
Ensure that JS that imports Wasm runs
GeoffreyBooth Sep 26, 2023
f79c9e1
Limit node_modules exception to files
GeoffreyBooth Sep 26, 2023
8e354e0
More efficient
GeoffreyBooth Sep 26, 2023
3da7932
Rename from --experimental-type to --experimental-default-type
GeoffreyBooth Sep 28, 2023
1f93d5e
Clarify
GeoffreyBooth Sep 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix --eval, STDIN
GeoffreyBooth committed Sep 28, 2023
commit 2a9612509ea0c7d70b7bebba3afeb528f275e1a0
2 changes: 1 addition & 1 deletion lib/internal/main/eval_stdin.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ readStdin((code) => {

const print = getOptionValue('--print');
const loadESM = getOptionValue('--import').length > 0;
if (getOptionValue('--input-type') === 'module')
if (getOptionValue('--input-type') === 'module' || getOptionValue('--experimental-type') === 'module')
evalModule(code, print);
else
evalScript('[stdin]',
2 changes: 1 addition & 1 deletion lib/internal/main/eval_string.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ markBootstrapComplete();
const source = getOptionValue('--eval');
const print = getOptionValue('--print');
const loadESM = getOptionValue('--import').length > 0 || getOptionValue('--experimental-loader').length > 0;
if (getOptionValue('--input-type') === 'module')
if (getOptionValue('--input-type') === 'module' || getOptionValue('--experimental-type') === 'module')
evalModule(source, print);
else {
// For backward compatibility, we want the identifier crypto to be the