@tsrx/oxc 0.0.0-trusted-publishing-bootstrap → 0.8.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/LICENSE +21 -0
- package/README.md +141 -0
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/bin/oxc-tsrx +2 -0
- package/bin/oxc-tsrx-fmt +2 -0
- package/bin/oxc-tsrx-lint +2 -0
- package/bin/oxc-tsrx-lsp +2 -0
- package/bin/oxfmt +2 -0
- package/bin/oxlint +2 -0
- package/dist/bin/oxc-tsrx-fmt.js +13 -0
- package/dist/bin/oxc-tsrx-lint.js +13 -0
- package/dist/bin/oxc-tsrx-lsp.js +13 -0
- package/dist/bin/oxc-tsrx.js +115 -0
- package/dist/bin/oxfmt.js +24 -0
- package/dist/bin/oxlint.js +33 -0
- package/dist/canonical-command.d.ts +50 -0
- package/dist/canonical-command.js +196 -0
- package/dist/compat.d.ts +149 -0
- package/dist/compat.js +1615 -0
- package/dist/editor-resolution.js +508 -0
- package/dist/format-cli.js +276 -0
- package/dist/format-invocation.js +97 -0
- package/dist/format.d.ts +1 -0
- package/dist/format.js +56 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +16 -0
- package/dist/lint-cli.js +487 -0
- package/dist/lint-invocation.js +192 -0
- package/dist/lint-js-plugins.js +819 -0
- package/dist/lint-plugins-dev.d.ts +1 -0
- package/dist/lint-plugins-dev.js +2 -0
- package/dist/lint-prestart.js +16 -0
- package/dist/lint.d.ts +1 -0
- package/dist/lint.js +2 -0
- package/dist/native-targets.js +76 -0
- package/dist/oxlint-lsp-multiplexer.js +622 -0
- package/dist/package-binary.js +29 -0
- package/dist/parser.d.ts +216 -0
- package/dist/parser.js +557 -0
- package/dist/process.js +88 -0
- package/dist/provider-resolve.d.ts +160 -0
- package/dist/provider-resolve.js +471 -0
- package/dist/providers-report.js +49 -0
- package/dist/runtime.js +323 -0
- package/dist/spawn-command.d.ts +20 -0
- package/dist/spawn-command.js +87 -0
- package/dist/tsrx-core-compat/facade.js +1184 -0
- package/dist/tsrx-core-compat/index.d.ts +6 -0
- package/dist/tsrx-core-compat/index.js +9 -0
- package/dist/tsrx-core-compat/style.js +525 -0
- package/dist/tsrx-core-compat/types/estree.d.ts +20 -0
- package/dist/tsrx-core-compat/types/index.d.ts +50 -0
- package/dist/tsrx-transfer.js +352 -0
- package/package.json +144 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'oxlint-current/plugins-dev';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { resolvePackageBinary } from "./package-binary.js";
|
|
2
|
+
import { runCaptured } from "./process.js";
|
|
3
|
+
//#region src/lint-prestart.ts
|
|
4
|
+
function startCanonicalOxlint(args, cwd = process.cwd(), env = process.env) {
|
|
5
|
+
const binary = resolvePackageBinary("oxlint-current", "oxlint", import.meta.url);
|
|
6
|
+
return {
|
|
7
|
+
args,
|
|
8
|
+
binary,
|
|
9
|
+
result: runCaptured(process.execPath, [binary, ...args], {
|
|
10
|
+
cwd,
|
|
11
|
+
env
|
|
12
|
+
})
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { startCanonicalOxlint };
|
package/dist/lint.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'oxlint-current';
|
package/dist/lint.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/native-targets.ts
|
|
2
|
+
const NATIVE_TARGETS = Object.freeze([
|
|
3
|
+
Object.freeze({
|
|
4
|
+
target: "aarch64-apple-darwin",
|
|
5
|
+
packageSuffix: "darwin-arm64",
|
|
6
|
+
os: "darwin",
|
|
7
|
+
cpu: "arm64",
|
|
8
|
+
vscodeTarget: "darwin-arm64"
|
|
9
|
+
}),
|
|
10
|
+
Object.freeze({
|
|
11
|
+
target: "x86_64-apple-darwin",
|
|
12
|
+
packageSuffix: "darwin-x64",
|
|
13
|
+
os: "darwin",
|
|
14
|
+
cpu: "x64",
|
|
15
|
+
vscodeTarget: "darwin-x64"
|
|
16
|
+
}),
|
|
17
|
+
Object.freeze({
|
|
18
|
+
target: "aarch64-unknown-linux-gnu",
|
|
19
|
+
packageSuffix: "linux-arm64-gnu",
|
|
20
|
+
os: "linux",
|
|
21
|
+
cpu: "arm64",
|
|
22
|
+
libc: "glibc",
|
|
23
|
+
vscodeTarget: "linux-arm64"
|
|
24
|
+
}),
|
|
25
|
+
Object.freeze({
|
|
26
|
+
target: "x86_64-unknown-linux-gnu",
|
|
27
|
+
packageSuffix: "linux-x64-gnu",
|
|
28
|
+
os: "linux",
|
|
29
|
+
cpu: "x64",
|
|
30
|
+
libc: "glibc",
|
|
31
|
+
vscodeTarget: "linux-x64"
|
|
32
|
+
}),
|
|
33
|
+
Object.freeze({
|
|
34
|
+
target: "aarch64-unknown-linux-musl",
|
|
35
|
+
packageSuffix: "linux-arm64-musl",
|
|
36
|
+
os: "linux",
|
|
37
|
+
cpu: "arm64",
|
|
38
|
+
libc: "musl",
|
|
39
|
+
vscodeTarget: "alpine-arm64"
|
|
40
|
+
}),
|
|
41
|
+
Object.freeze({
|
|
42
|
+
target: "x86_64-unknown-linux-musl",
|
|
43
|
+
packageSuffix: "linux-x64-musl",
|
|
44
|
+
os: "linux",
|
|
45
|
+
cpu: "x64",
|
|
46
|
+
libc: "musl",
|
|
47
|
+
vscodeTarget: "alpine-x64"
|
|
48
|
+
}),
|
|
49
|
+
Object.freeze({
|
|
50
|
+
target: "aarch64-pc-windows-msvc",
|
|
51
|
+
packageSuffix: "win32-arm64-msvc",
|
|
52
|
+
os: "win32",
|
|
53
|
+
cpu: "arm64",
|
|
54
|
+
vscodeTarget: "win32-arm64"
|
|
55
|
+
}),
|
|
56
|
+
Object.freeze({
|
|
57
|
+
target: "x86_64-pc-windows-msvc",
|
|
58
|
+
packageSuffix: "win32-x64-msvc",
|
|
59
|
+
os: "win32",
|
|
60
|
+
cpu: "x64",
|
|
61
|
+
vscodeTarget: "win32-x64"
|
|
62
|
+
})
|
|
63
|
+
]);
|
|
64
|
+
function nativeTargetForHost(os, cpu, libc = void 0) {
|
|
65
|
+
const target = NATIVE_TARGETS.find((candidate) => candidate.os === os && candidate.cpu === cpu && (candidate.os !== "linux" || candidate.libc === libc));
|
|
66
|
+
if (target === void 0) {
|
|
67
|
+
const identity = `${os}-${cpu}${libc ? `-${libc}` : ""}`;
|
|
68
|
+
throw new RangeError(`OXC for TSRX has no native package for ${identity}`);
|
|
69
|
+
}
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
function nativePackageName(target) {
|
|
73
|
+
return `@tsrx/oxc-${target.packageSuffix}`;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { NATIVE_TARGETS, nativePackageName, nativeTargetForHost };
|