Update dependency oxc-parser to v0.116.0 (#18918)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
renovate[bot]andfisker authored and GitHub committed 2026-03-04 23:43:34 +08:00
1 parent 49421f926f
commit 8e4bfdb9b0
8 files changed
+156 -101

No files matched your search

@@ -671,7 +671,7 @@ Cause: [5:12-5:13]: Unexpected token: 'PrivateField'"
`;
exports[`destructuring-private.js format[oxc] 1`] = `
"Unexpected token (5:13)
"Private identifier '#x' is not allowed in property names (5:13)
3 | constructor() {
4 | console.log(this.#x); // => 1
> 5 | const { #x: x } = this;
@@ -53,7 +53,7 @@ Cause: [3:10-3:11]: Unexpected token: 'PrivateField'"
`;
exports[`arrow-params.js format[oxc] 1`] = `
"Unexpected token (3:11)
"Private identifier '#x' is not allowed in property names (3:11)
1 | class C {
2 | #x = 1;
> 3 | #p = ({ #x: x }) => {}
@@ -124,7 +124,7 @@ Cause: [5:7-5:8]: Unexpected token: 'PrivateField'"
`;
exports[`assignment.js format[oxc] 1`] = `
"Unexpected token (5:8)
"Private identifier '#x' is not allowed in property names (5:8)
3 | m() {
4 | let x;
> 5 | ({ #x: x } = this);
@@ -187,7 +187,7 @@ Cause: [3:16-3:17]: Unexpected token: 'PrivateField'"
`;
exports[`async-arrow-params.js format[oxc] 1`] = `
"Unexpected token (3:17)
"Private identifier '#x' is not allowed in property names (3:17)
1 | class C {
2 | #x = 1;
> 3 | #p = async ({ #x: x }) => {}
@@ -256,7 +256,7 @@ Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
`;
exports[`bindings.js format[oxc] 1`] = `
"Unexpected token (4:12)
"Private identifier '#x' is not allowed in property names (4:12)
2 | #x = 1;
3 | m() {
> 4 | const {#x: x} = this;
@@ -328,7 +328,7 @@ Cause: [5:10-5:11]: Unexpected token: 'PrivateField'"
`;
exports[`for-lhs.js format[oxc] 1`] = `
"Unexpected token (5:11)
"Private identifier '#x' is not allowed in property names (5:11)
3 | m() {
4 | let x;
> 5 | for ({#x: x} of [this]);
@@ -403,7 +403,7 @@ Cause: [4:16-4:17]: Unexpected token: 'PrivateField'"
`;
exports[`nested-bindings.js format[oxc] 1`] = `
"Unexpected token (4:17)
"Private identifier '#x' is not allowed in property names (4:17)
2 | #x = 1;
3 | m() {
> 4 | const {x: { #x: [x] }, y: [...{ #x: y }]} = this;
@@ -473,7 +473,7 @@ Cause: [4:11-4:12]: Unexpected token: 'PrivateField'"
`;
exports[`valid-multiple-bindings.js format[oxc] 1`] = `
"Unexpected token (4:12)
"Private identifier '#x' is not allowed in property names (4:12)
2 | #x = 1;
3 | m() {
> 4 | const {#x: x1, #x: x2 = x1 } = this;
@@ -136,6 +136,16 @@ class A {
================================================================================
`;
exports[`declare-readonly-field-initializer-w-annotation.ts format[oxc-ts] 1`] = `
"Initializers are not allowed in ambient contexts. (2:34)
1 | class A {
> 2 | declare readonly bar: string = "test";
| ^^^^^^
3 | declare baz: string = "test";
4 | }
5 |"
`;
exports[`dunder.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
+5 -1
View File
@@ -1 +1,5 @@
runFormatTest(import.meta, ["typescript"]);
runFormatTest(import.meta, ["typescript"], {
errors: {
"oxc-ts": ["declare-readonly-field-initializer-w-annotation.ts"],
},
});
@@ -31,6 +31,17 @@ declare class D {
================================================================================
`;
exports[`declare_class_fields.ts format[oxc-ts] 1`] = `
"Initializers are not allowed in ambient contexts. (4:19)
2 | class C extends B {declare p: 256 | 1000;}
3 | class D {
> 4 | declare field = "field";
| ^^^^^^^
5 | }
6 | declare class D {
7 | field = "field";"
`;
exports[`declare_enum.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -125,6 +136,17 @@ declare module m {
================================================================================
`;
exports[`declare_module.ts format[oxc-ts] 1`] = `
"Initializers are not allowed in ambient contexts. (3:13)
1 | declare module m {
2 | class C {
> 3 | field = "field";
| ^^^^^^^
4 | }
5 | }
6 |"
`;
exports[`declare_namespace.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -146,6 +168,17 @@ declare namespace m {
================================================================================
`;
exports[`declare_namespace.ts format[oxc-ts] 1`] = `
"Initializers are not allowed in ambient contexts. (3:13)
1 | declare namespace m {
2 | class C {
> 3 | field = "field";
| ^^^^^^^
4 | }
5 | }
6 |"
`;
exports[`declare_var.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -1 +1,9 @@
runFormatTest(import.meta, ["typescript"]);
runFormatTest(import.meta, ["typescript"], {
errors: {
"oxc-ts": [
"declare_class_fields.ts",
"declare_module.ts",
"declare_namespace.ts",
],
},
});