oxc-parser 0.81.0 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/deserialize/js.js +2 -49
- package/generated/deserialize/ts.js +2 -49
- package/package.json +18 -18
|
@@ -1874,58 +1874,11 @@ function deserializeTSTypeQuery(pos) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
|
|
1876
1876
|
function deserializeTSImportType(pos) {
|
|
1877
|
-
let qualifier = deserializeOptionTSImportTypeQualifier(pos + 32);
|
|
1878
|
-
if (qualifier !== null) {
|
|
1879
|
-
if (qualifier.type === 'IdentifierName') {
|
|
1880
|
-
qualifier = {
|
|
1881
|
-
type: 'Identifier',
|
|
1882
|
-
decorators: [],
|
|
1883
|
-
name: qualifier.name,
|
|
1884
|
-
optional: false,
|
|
1885
|
-
typeAnnotation: null,
|
|
1886
|
-
start: qualifier.start,
|
|
1887
|
-
end: qualifier.end,
|
|
1888
|
-
};
|
|
1889
|
-
} else if (qualifier.type === 'TSImportTypeQualifiedName') {
|
|
1890
|
-
// Convert TSImportTypeQualifiedName to TSQualifiedName
|
|
1891
|
-
const convertQualifier = (q) => {
|
|
1892
|
-
if (q.type === 'IdentifierName') {
|
|
1893
|
-
return {
|
|
1894
|
-
type: 'Identifier',
|
|
1895
|
-
decorators: [],
|
|
1896
|
-
name: q.name,
|
|
1897
|
-
optional: false,
|
|
1898
|
-
typeAnnotation: null,
|
|
1899
|
-
start: q.start,
|
|
1900
|
-
end: q.end,
|
|
1901
|
-
};
|
|
1902
|
-
} else if (q.type === 'TSImportTypeQualifiedName') {
|
|
1903
|
-
return {
|
|
1904
|
-
type: 'TSQualifiedName',
|
|
1905
|
-
left: convertQualifier(q.left),
|
|
1906
|
-
right: {
|
|
1907
|
-
type: 'Identifier',
|
|
1908
|
-
decorators: [],
|
|
1909
|
-
name: q.right.name,
|
|
1910
|
-
optional: false,
|
|
1911
|
-
typeAnnotation: null,
|
|
1912
|
-
start: q.right.start,
|
|
1913
|
-
end: q.right.end,
|
|
1914
|
-
},
|
|
1915
|
-
start: q.start,
|
|
1916
|
-
end: q.end,
|
|
1917
|
-
};
|
|
1918
|
-
}
|
|
1919
|
-
return q;
|
|
1920
|
-
};
|
|
1921
|
-
qualifier = convertQualifier(qualifier);
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
1877
|
return {
|
|
1925
1878
|
type: 'TSImportType',
|
|
1926
1879
|
argument: deserializeTSType(pos + 8),
|
|
1927
1880
|
options: deserializeOptionBoxObjectExpression(pos + 24),
|
|
1928
|
-
qualifier,
|
|
1881
|
+
qualifier: deserializeOptionTSImportTypeQualifier(pos + 32),
|
|
1929
1882
|
typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 48),
|
|
1930
1883
|
start: deserializeU32(pos),
|
|
1931
1884
|
end: deserializeU32(pos + 4),
|
|
@@ -1934,7 +1887,7 @@ function deserializeTSImportType(pos) {
|
|
|
1934
1887
|
|
|
1935
1888
|
function deserializeTSImportTypeQualifiedName(pos) {
|
|
1936
1889
|
return {
|
|
1937
|
-
type: '
|
|
1890
|
+
type: 'TSQualifiedName',
|
|
1938
1891
|
left: deserializeTSImportTypeQualifier(pos + 8),
|
|
1939
1892
|
right: deserializeIdentifierName(pos + 24),
|
|
1940
1893
|
start: deserializeU32(pos),
|
|
@@ -2005,58 +2005,11 @@ function deserializeTSTypeQuery(pos) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
|
|
2007
2007
|
function deserializeTSImportType(pos) {
|
|
2008
|
-
let qualifier = deserializeOptionTSImportTypeQualifier(pos + 32);
|
|
2009
|
-
if (qualifier !== null) {
|
|
2010
|
-
if (qualifier.type === 'IdentifierName') {
|
|
2011
|
-
qualifier = {
|
|
2012
|
-
type: 'Identifier',
|
|
2013
|
-
decorators: [],
|
|
2014
|
-
name: qualifier.name,
|
|
2015
|
-
optional: false,
|
|
2016
|
-
typeAnnotation: null,
|
|
2017
|
-
start: qualifier.start,
|
|
2018
|
-
end: qualifier.end,
|
|
2019
|
-
};
|
|
2020
|
-
} else if (qualifier.type === 'TSImportTypeQualifiedName') {
|
|
2021
|
-
// Convert TSImportTypeQualifiedName to TSQualifiedName
|
|
2022
|
-
const convertQualifier = (q) => {
|
|
2023
|
-
if (q.type === 'IdentifierName') {
|
|
2024
|
-
return {
|
|
2025
|
-
type: 'Identifier',
|
|
2026
|
-
decorators: [],
|
|
2027
|
-
name: q.name,
|
|
2028
|
-
optional: false,
|
|
2029
|
-
typeAnnotation: null,
|
|
2030
|
-
start: q.start,
|
|
2031
|
-
end: q.end,
|
|
2032
|
-
};
|
|
2033
|
-
} else if (q.type === 'TSImportTypeQualifiedName') {
|
|
2034
|
-
return {
|
|
2035
|
-
type: 'TSQualifiedName',
|
|
2036
|
-
left: convertQualifier(q.left),
|
|
2037
|
-
right: {
|
|
2038
|
-
type: 'Identifier',
|
|
2039
|
-
decorators: [],
|
|
2040
|
-
name: q.right.name,
|
|
2041
|
-
optional: false,
|
|
2042
|
-
typeAnnotation: null,
|
|
2043
|
-
start: q.right.start,
|
|
2044
|
-
end: q.right.end,
|
|
2045
|
-
},
|
|
2046
|
-
start: q.start,
|
|
2047
|
-
end: q.end,
|
|
2048
|
-
};
|
|
2049
|
-
}
|
|
2050
|
-
return q;
|
|
2051
|
-
};
|
|
2052
|
-
qualifier = convertQualifier(qualifier);
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
2008
|
return {
|
|
2056
2009
|
type: 'TSImportType',
|
|
2057
2010
|
argument: deserializeTSType(pos + 8),
|
|
2058
2011
|
options: deserializeOptionBoxObjectExpression(pos + 24),
|
|
2059
|
-
qualifier,
|
|
2012
|
+
qualifier: deserializeOptionTSImportTypeQualifier(pos + 32),
|
|
2060
2013
|
typeArguments: deserializeOptionBoxTSTypeParameterInstantiation(pos + 48),
|
|
2061
2014
|
start: deserializeU32(pos),
|
|
2062
2015
|
end: deserializeU32(pos + 4),
|
|
@@ -2065,7 +2018,7 @@ function deserializeTSImportType(pos) {
|
|
|
2065
2018
|
|
|
2066
2019
|
function deserializeTSImportTypeQualifiedName(pos) {
|
|
2067
2020
|
return {
|
|
2068
|
-
type: '
|
|
2021
|
+
type: 'TSQualifiedName',
|
|
2069
2022
|
left: deserializeTSImportTypeQualifier(pos + 8),
|
|
2070
2023
|
right: deserializeIdentifierName(pos + 24),
|
|
2071
2024
|
start: deserializeU32(pos),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxc-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"browser": "wasm.mjs",
|
|
6
6
|
"engines": {
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@oxc-project/types": "^0.
|
|
53
|
+
"@oxc-project/types": "^0.82.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@codspeed/vitest-plugin": "^4.0.0",
|
|
57
|
-
"@napi-rs/wasm-runtime": "
|
|
57
|
+
"@napi-rs/wasm-runtime": "1.0.0",
|
|
58
58
|
"@vitest/browser": "3.2.4",
|
|
59
59
|
"esbuild": "^0.25.0",
|
|
60
60
|
"playwright": "^1.51.0",
|
|
@@ -90,21 +90,21 @@
|
|
|
90
90
|
"dtsHeaderFile": "header.js"
|
|
91
91
|
},
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@oxc-parser/binding-win32-x64-msvc": "0.
|
|
94
|
-
"@oxc-parser/binding-win32-arm64-msvc": "0.
|
|
95
|
-
"@oxc-parser/binding-linux-x64-gnu": "0.
|
|
96
|
-
"@oxc-parser/binding-linux-x64-musl": "0.
|
|
97
|
-
"@oxc-parser/binding-freebsd-x64": "0.
|
|
98
|
-
"@oxc-parser/binding-linux-arm64-gnu": "0.
|
|
99
|
-
"@oxc-parser/binding-linux-arm64-musl": "0.
|
|
100
|
-
"@oxc-parser/binding-linux-arm-gnueabihf": "0.
|
|
101
|
-
"@oxc-parser/binding-linux-arm-musleabihf": "0.
|
|
102
|
-
"@oxc-parser/binding-linux-s390x-gnu": "0.
|
|
103
|
-
"@oxc-parser/binding-linux-riscv64-gnu": "0.
|
|
104
|
-
"@oxc-parser/binding-darwin-x64": "0.
|
|
105
|
-
"@oxc-parser/binding-darwin-arm64": "0.
|
|
106
|
-
"@oxc-parser/binding-android-arm64": "0.
|
|
107
|
-
"@oxc-parser/binding-wasm32-wasi": "0.
|
|
93
|
+
"@oxc-parser/binding-win32-x64-msvc": "0.82.0",
|
|
94
|
+
"@oxc-parser/binding-win32-arm64-msvc": "0.82.0",
|
|
95
|
+
"@oxc-parser/binding-linux-x64-gnu": "0.82.0",
|
|
96
|
+
"@oxc-parser/binding-linux-x64-musl": "0.82.0",
|
|
97
|
+
"@oxc-parser/binding-freebsd-x64": "0.82.0",
|
|
98
|
+
"@oxc-parser/binding-linux-arm64-gnu": "0.82.0",
|
|
99
|
+
"@oxc-parser/binding-linux-arm64-musl": "0.82.0",
|
|
100
|
+
"@oxc-parser/binding-linux-arm-gnueabihf": "0.82.0",
|
|
101
|
+
"@oxc-parser/binding-linux-arm-musleabihf": "0.82.0",
|
|
102
|
+
"@oxc-parser/binding-linux-s390x-gnu": "0.82.0",
|
|
103
|
+
"@oxc-parser/binding-linux-riscv64-gnu": "0.82.0",
|
|
104
|
+
"@oxc-parser/binding-darwin-x64": "0.82.0",
|
|
105
|
+
"@oxc-parser/binding-darwin-arm64": "0.82.0",
|
|
106
|
+
"@oxc-parser/binding-android-arm64": "0.82.0",
|
|
107
|
+
"@oxc-parser/binding-wasm32-wasi": "0.82.0"
|
|
108
108
|
},
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build-dev": "napi build --platform --js bindings.js",
|