diff --git a/.github/actions/clone-submodules/action.yml b/.github/actions/clone-submodules/action.yml index 8dff7cdb5..339bb9ac7 100644 --- a/.github/actions/clone-submodules/action.yml +++ b/.github/actions/clone-submodules/action.yml @@ -10,7 +10,7 @@ runs: show-progress: false repository: tc39/test262 path: tasks/coverage/test262 - ref: eefc5cf367b999768445432e167606fd1acf1734 + ref: dc0082c5ea347e5ecb585c1d7ebf4555aa429528 - uses: actions/checkout@v4 with: diff --git a/crates/oxc_parser/src/js/module.rs b/crates/oxc_parser/src/js/module.rs index 8f2540c00..60a91b084 100644 --- a/crates/oxc_parser/src/js/module.rs +++ b/crates/oxc_parser/src/js/module.rs @@ -59,9 +59,13 @@ impl<'a> ParserImpl<'a> { let mut import_kind = ImportOrExportKind::Value; let mut phase = None; match self.cur_kind() { - Kind::Source if self.peek_kind().is_binding_identifier() => { - self.bump_any(); - phase = Some(ImportPhase::Source); + Kind::Source => { + let peek_kind = self.peek_kind(); + // Allow `import source from 'mod'` + if peek_kind.is_binding_identifier() && peek_kind != Kind::From { + self.bump_any(); + phase = Some(ImportPhase::Source); + } } Kind::Defer if self.peek_at(Kind::Star) => { self.bump_any(); diff --git a/justfile b/justfile index 44016f3b4..01d0c41c4 100755 --- a/justfile +++ b/justfile @@ -36,7 +36,7 @@ ready: # Clone or update submodules # Make sure to update `.github/actions/clone-submodules/action.yml` too submodules: - just clone-submodule tasks/coverage/test262 https://github.com/tc39/test262.git eefc5cf367b999768445432e167606fd1acf1734 + just clone-submodule tasks/coverage/test262 https://github.com/tc39/test262.git dc0082c5ea347e5ecb585c1d7ebf4555aa429528 just clone-submodule tasks/coverage/babel https://github.com/babel/babel.git 54a8389fa31ce4fd18b0335b05832dc1ad3cc21f just clone-submodule tasks/coverage/typescript https://github.com/microsoft/TypeScript.git d85767abfd83880cea17cea70f9913e9c4496dcc just clone-submodule tasks/prettier_conformance/prettier https://github.com/prettier/prettier.git 37fd1774d13ef68abcc03775ceef0a91f87a57d7 diff --git a/tasks/coverage/snapshots/codegen_test262.snap b/tasks/coverage/snapshots/codegen_test262.snap index 9aed4479e..c59ae7590 100644 --- a/tasks/coverage/snapshots/codegen_test262.snap +++ b/tasks/coverage/snapshots/codegen_test262.snap @@ -1,5 +1,5 @@ -commit: eefc5cf3 +commit: dc0082c5 codegen_test262 Summary: -AST Parsed : 44169/44169 (100.00%) -Positive Passed: 44169/44169 (100.00%) +AST Parsed : 44096/44096 (100.00%) +Positive Passed: 44096/44096 (100.00%) diff --git a/tasks/coverage/snapshots/minifier_test262.snap b/tasks/coverage/snapshots/minifier_test262.snap index 7f91b4eea..982b24519 100644 --- a/tasks/coverage/snapshots/minifier_test262.snap +++ b/tasks/coverage/snapshots/minifier_test262.snap @@ -1,5 +1,5 @@ -commit: eefc5cf3 +commit: dc0082c5 minifier_test262 Summary: -AST Parsed : 44169/44169 (100.00%) -Positive Passed: 44169/44169 (100.00%) +AST Parsed : 44096/44096 (100.00%) +Positive Passed: 44096/44096 (100.00%) diff --git a/tasks/coverage/snapshots/parser_test262.snap b/tasks/coverage/snapshots/parser_test262.snap index ebc34fd2f..b00389321 100644 --- a/tasks/coverage/snapshots/parser_test262.snap +++ b/tasks/coverage/snapshots/parser_test262.snap @@ -1,38 +1,18 @@ -commit: eefc5cf3 +commit: dc0082c5 parser_test262 Summary: -AST Parsed : 44166/44169 (99.99%) -Positive Passed: 44166/44169 (99.99%) +AST Parsed : 44095/44096 (100.00%) +Positive Passed: 44095/44096 (100.00%) Negative Passed: 4454/4456 (99.96%) Expect Syntax Error: tasks/coverage/test262/test/language/import/import-attributes/json-invalid.js Expect Syntax Error: tasks/coverage/test262/test/language/import/import-attributes/json-named-bindings.js -Expect to Parse: tasks/coverage/test262/test/language/import/import-defer/errors/resolution-error/import-defer-of-missing-module-fails.js +Expect to Parse: tasks/coverage/test262/test/language/module-code/source-phase-import/import-source-binding-name-2.js - × Expected `from` but found `string` - ╭─[test262/test/language/import/import-defer/errors/resolution-error/import-defer-of-missing-module-fails.js:22:22] - 21 │ - 22 │ import defer * as ns "./resolution-error_FIXTURE.js"; - · ───────────────┬─────────────── - · ╰── `from` expected - ╰──── -Expect to Parse: tasks/coverage/test262/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js - - × Expected `from` but found `string` - ╭─[test262/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js:22:22] - 21 │ - 22 │ import defer * as ns "./syntax-error_FIXTURE.js"; - · ─────────────┬───────────── - · ╰── `from` expected - ╰──── -Expect to Parse: tasks/coverage/test262/test/language/module-code/source-phase-import/import-source-binding-name.js - - × Expected `from` but found `string` - ╭─[test262/test/language/module-code/source-phase-import/import-source-binding-name.js:22:20] - 21 │ - 22 │ import source from ''; - · ─────────┬──────── - · ╰── `from` expected - 23 │ import from from ''; + × Unexpected token + ╭─[test262/test/language/module-code/source-phase-import/import-source-binding-name-2.js:23:20] + 22 │ import source source from ''; + 23 │ import source from from ''; + · ──── ╰──── × '0'-prefixed octal literals and octal escape sequences are deprecated diff --git a/tasks/coverage/snapshots/runtime.snap b/tasks/coverage/snapshots/runtime.snap index 98c5d36d5..bdf0133da 100644 --- a/tasks/coverage/snapshots/runtime.snap +++ b/tasks/coverage/snapshots/runtime.snap @@ -1,4 +1,4 @@ -commit: eefc5cf3 +commit: dc0082c5 runtime Summary: AST Parsed : 18055/18055 (100.00%) diff --git a/tasks/coverage/snapshots/semantic_test262.snap b/tasks/coverage/snapshots/semantic_test262.snap index 2c5d99199..e2dd848fd 100644 --- a/tasks/coverage/snapshots/semantic_test262.snap +++ b/tasks/coverage/snapshots/semantic_test262.snap @@ -1,8 +1,8 @@ -commit: eefc5cf3 +commit: dc0082c5 semantic_test262 Summary: -AST Parsed : 44169/44169 (100.00%) -Positive Passed: 43640/44169 (98.80%) +AST Parsed : 44096/44096 (100.00%) +Positive Passed: 43569/44096 (98.80%) tasks/coverage/test262/test/annexB/language/function-code/if-decl-else-decl-a-func-block-scoping.js semantic error: Symbol scope ID mismatch for "f": after transform: SymbolId(3): ScopeId(4294967294) @@ -3695,14 +3695,8 @@ Unresolved references mismatch: after transform: ["$DONE", "Object", "assert", "require"] rebuilt : ["$DONE", "Object", "_superprop_getMethod", "assert", "require"] -tasks/coverage/test262/test/language/import/import-defer/errors/resolution-error/import-defer-of-missing-module-fails.js -semantic error: Expected `from` but found `string` - -tasks/coverage/test262/test/language/import/import-defer/errors/syntax-error/import-defer-of-syntax-error-fails.js -semantic error: Expected `from` but found `string` - -tasks/coverage/test262/test/language/module-code/source-phase-import/import-source-binding-name.js -semantic error: Expected `from` but found `string` +tasks/coverage/test262/test/language/module-code/source-phase-import/import-source-binding-name-2.js +semantic error: Unexpected token tasks/coverage/test262/test/language/module-code/top-level-await/syntax/for-await-await-expr-func-expression.js semantic error: Scope children mismatch: diff --git a/tasks/coverage/snapshots/transformer_test262.snap b/tasks/coverage/snapshots/transformer_test262.snap index 33bcc1d2d..b7dd47bbf 100644 --- a/tasks/coverage/snapshots/transformer_test262.snap +++ b/tasks/coverage/snapshots/transformer_test262.snap @@ -1,5 +1,5 @@ -commit: eefc5cf3 +commit: dc0082c5 transformer_test262 Summary: -AST Parsed : 44169/44169 (100.00%) -Positive Passed: 44169/44169 (100.00%) +AST Parsed : 44096/44096 (100.00%) +Positive Passed: 44096/44096 (100.00%) diff --git a/tasks/coverage/src/test262/mod.rs b/tasks/coverage/src/test262/mod.rs index 57debe0e1..584a2c78e 100644 --- a/tasks/coverage/src/test262/mod.rs +++ b/tasks/coverage/src/test262/mod.rs @@ -27,6 +27,7 @@ impl Suite for Test262Suite { fn skip_test_path(&self, path: &Path) -> bool { let path = path.to_string_lossy(); + path.contains("test262/test/staging") || // ignore markdown files path.ends_with(".md") || // ignore fixtures