@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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -0
  3. package/THIRD_PARTY_NOTICES.md +49 -0
  4. package/bin/oxc-tsrx +2 -0
  5. package/bin/oxc-tsrx-fmt +2 -0
  6. package/bin/oxc-tsrx-lint +2 -0
  7. package/bin/oxc-tsrx-lsp +2 -0
  8. package/bin/oxfmt +2 -0
  9. package/bin/oxlint +2 -0
  10. package/dist/bin/oxc-tsrx-fmt.js +13 -0
  11. package/dist/bin/oxc-tsrx-lint.js +13 -0
  12. package/dist/bin/oxc-tsrx-lsp.js +13 -0
  13. package/dist/bin/oxc-tsrx.js +115 -0
  14. package/dist/bin/oxfmt.js +24 -0
  15. package/dist/bin/oxlint.js +33 -0
  16. package/dist/canonical-command.d.ts +50 -0
  17. package/dist/canonical-command.js +196 -0
  18. package/dist/compat.d.ts +149 -0
  19. package/dist/compat.js +1615 -0
  20. package/dist/editor-resolution.js +508 -0
  21. package/dist/format-cli.js +276 -0
  22. package/dist/format-invocation.js +97 -0
  23. package/dist/format.d.ts +1 -0
  24. package/dist/format.js +56 -0
  25. package/dist/index.d.ts +8 -0
  26. package/dist/index.js +16 -0
  27. package/dist/lint-cli.js +487 -0
  28. package/dist/lint-invocation.js +192 -0
  29. package/dist/lint-js-plugins.js +819 -0
  30. package/dist/lint-plugins-dev.d.ts +1 -0
  31. package/dist/lint-plugins-dev.js +2 -0
  32. package/dist/lint-prestart.js +16 -0
  33. package/dist/lint.d.ts +1 -0
  34. package/dist/lint.js +2 -0
  35. package/dist/native-targets.js +76 -0
  36. package/dist/oxlint-lsp-multiplexer.js +622 -0
  37. package/dist/package-binary.js +29 -0
  38. package/dist/parser.d.ts +216 -0
  39. package/dist/parser.js +557 -0
  40. package/dist/process.js +88 -0
  41. package/dist/provider-resolve.d.ts +160 -0
  42. package/dist/provider-resolve.js +471 -0
  43. package/dist/providers-report.js +49 -0
  44. package/dist/runtime.js +323 -0
  45. package/dist/spawn-command.d.ts +20 -0
  46. package/dist/spawn-command.js +87 -0
  47. package/dist/tsrx-core-compat/facade.js +1184 -0
  48. package/dist/tsrx-core-compat/index.d.ts +6 -0
  49. package/dist/tsrx-core-compat/index.js +9 -0
  50. package/dist/tsrx-core-compat/style.js +525 -0
  51. package/dist/tsrx-core-compat/types/estree.d.ts +20 -0
  52. package/dist/tsrx-core-compat/types/index.d.ts +50 -0
  53. package/dist/tsrx-transfer.js +352 -0
  54. package/package.json +144 -5
@@ -0,0 +1 @@
1
+ export * from 'oxlint-current/plugins-dev';
@@ -0,0 +1,2 @@
1
+ export * from "oxlint-current/plugins-dev";
2
+ export {};
@@ -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,2 @@
1
+ import { defineConfig } from "oxlint-current";
2
+ export { defineConfig };
@@ -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 };