@effect/tsgo 0.56.0 → 0.57.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/README.md CHANGED
@@ -23,6 +23,19 @@ This will guide you through the installation process, which includes:
23
23
  > [!NOTE]
24
24
  > At the moment, you still need a native TypeScript install alongside `@effect/tsgo`: `typescript` >= 7 (e.g. `typescript@latest` or `typescript@next`) or an alias such as `@typescript/native`. `effect-tsgo patch` tries `typescript`, then `@typescript/native`, and accepts `--typescript-package <name>` to try a custom package name first.
25
25
 
26
+ ### Experimental: patch your installed tsrs
27
+
28
+ If you use [tsrs](https://github.com/oxc-project/tsrs), the Rust port of TypeScript-Go, `effect-tsgo patch --tsrs` patches it too: it swaps the binary of your installed `tsrs` package (`node_modules/@tsrs/<platform>/tsrs`) for an experimental Effect-patched build of the same tsrs version, so `tsrs` reports the Effect diagnostics. Your TypeScript install is patched as usual; use `effect-tsgo patch --no-typescript --tsrs` to patch only tsrs.
29
+
30
+ ```sh
31
+ npm i -D tsrs@<version>
32
+ effect-tsgo patch --tsrs # e.g. in the prepare script
33
+ npx tsrs --noEmit # now with Effect diagnostics
34
+ effect-tsgo unpatch --tsrs # restores tsrs's original binary
35
+ ```
36
+
37
+ The patched build is available for macOS arm64 and Linux x64/arm64 (glibc), for the tsrs versions this `@effect/tsgo` release supports. A tsrs version or platform (such as Linux musl) without a patched build makes `patch --tsrs` fail with the reason, or skip tsrs with `--skip-missing`.
38
+
26
39
  ## LSP-based linter
27
40
 
28
41
  The Effect LSP doubles as a tool to perform type-aware linting of Effect code, and ships as well a way to emit additional Oxlint Type Aware rules.
@@ -38,13 +51,13 @@ When running in dedicated diagnostics mode, the Effect diagnostics can be emitte
38
51
  <!-- supported-components:start -->
39
52
  ## Supported Package Versions
40
53
 
41
- The following target package versions are supported by `@effect/tsgo@0.56.0`:
54
+ The following target package versions are supported by `@effect/tsgo@0.57.0`:
42
55
 
43
56
  | Component | Supported versions |
44
57
  |---|---|
45
- | TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261020.3` |
58
+ | TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20260929`, `7.1.0-dev.20261023.1` |
46
59
  | Oxlint | `1.87.0`, `1.88.0`, `1.89.0` |
47
- | oxlint-tsgolint | `7.0.2003`, `7.0.2004` |
60
+ | oxlint-tsgolint | `7.0.2004`, `7.0.2005` |
48
61
  <!-- supported-components:end -->
49
62
 
50
63
  ## Diagnostic Status
@@ -52737,7 +52737,7 @@ const runWith = (command, config) => {
52737
52737
  //#endregion
52738
52738
  //#region package.json
52739
52739
  var name = "@effect/tsgo";
52740
- var version = "0.56.0";
52740
+ var version = "0.57.0";
52741
52741
 
52742
52742
  //#endregion
52743
52743
  //#region src/metadata.json
@@ -55390,10 +55390,11 @@ var tags = {
55390
55390
  "typescript": {
55391
55391
  "latest": "7.0.2",
55392
55392
  "beta": "7.1.0-beta",
55393
- "next": "7.1.0-dev.20261020.3"
55393
+ "next": "7.1.0-dev.20261023.1"
55394
55394
  },
55395
55395
  "oxlint": { "latest": "1.89.0" },
55396
- "oxlint-tsgolint": { "latest": "7.0.2004" }
55396
+ "oxlint-tsgolint": { "latest": "7.0.2005" },
55397
+ "tsrs": { "latest": "0.18.0-ts7.1.0-dev.20260929" }
55397
55398
  };
55398
55399
  var components = {
55399
55400
  "typescript": {
@@ -55403,29 +55404,39 @@ var components = {
55403
55404
  },
55404
55405
  "7.1.0-beta": {
55405
55406
  "gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a",
55406
- "provider": "typescript",
55407
- "shims": "typescript-beta"
55407
+ "provider": "typescript"
55408
+ },
55409
+ "7.1.0-dev.20260929": {
55410
+ "gitHead": "b85298b6a81f772d080b0455de0ca9d744cd6fd6",
55411
+ "provider": "typescript"
55408
55412
  },
55409
- "7.1.0-dev.20261020.3": {
55410
- "gitHead": "28534d7609062699a68b1b66e2367f8d95dbf290",
55413
+ "7.1.0-dev.20261023.1": {
55414
+ "gitHead": "a91e93821feafd081641f9f5d161eba626d0b2ce",
55411
55415
  "provider": "typescript"
55412
55416
  }
55413
55417
  },
55414
55418
  "oxlint-tsgolint": {
55415
- "7.0.2003": {
55416
- "gitHead": "eb9339115edde6811ca94c3433adf69ea9852880",
55417
- "dependencies": { "typescript": "7.0.2" }
55418
- },
55419
55419
  "7.0.2004": {
55420
55420
  "gitHead": "a61289117febcb1a60cf3bc75ef2b6bbccc4b665",
55421
55421
  "dependencies": { "typescript": "7.0.2" }
55422
+ },
55423
+ "7.0.2005": {
55424
+ "gitHead": "4ebf80fd2b166cba4890c6896220fec4a1462b29",
55425
+ "dependencies": { "typescript": "7.0.2" }
55422
55426
  }
55423
55427
  },
55424
55428
  "oxlint": {
55425
55429
  "1.87.0": { "gitHead": "2bd08ebe8f36fcf1954a675ffdeb4c6d0129f609" },
55426
55430
  "1.88.0": { "gitHead": "6941b4ed45ead21c45bc2164cb80a180eed85b43" },
55427
55431
  "1.89.0": { "gitHead": "07ed78f4abde4020ca7919381ffea4da8616b78a" }
55428
- }
55432
+ },
55433
+ "tsrs": { "0.18.0-ts7.1.0-dev.20260929": {
55434
+ "gitHead": "5f92808bc92bb97b06212153ab73d28d551c0b9b",
55435
+ "typescript": {
55436
+ "version": "7.1.0-dev.20260929",
55437
+ "gitHead": "b85298b6a81f772d080b0455de0ca9d744cd6fd6"
55438
+ }
55439
+ } }
55429
55440
  };
55430
55441
 
55431
55442
  //#endregion
@@ -55486,6 +55497,17 @@ const experimentalOxlintTarget = (platform, arch, glibc) => {
55486
55497
  tsgolintExecutable: platform === "win32" ? "tsgolint.exe" : "tsgolint"
55487
55498
  };
55488
55499
  };
55500
+ const tsrsTargets = [
55501
+ "darwin-arm64",
55502
+ "linux-x64-gnu",
55503
+ "linux-x64-musl",
55504
+ "linux-arm64-gnu",
55505
+ "linux-arm64-musl"
55506
+ ];
55507
+ const tsrsTarget = (platform, arch, glibc) => {
55508
+ const target = platform === "linux" ? `${platform}-${arch}-${glibc ? "gnu" : "musl"}` : `${platform}-${arch}`;
55509
+ return tsrsTargets.includes(target) ? target : void 0;
55510
+ };
55489
55511
  const discoverTypeScript = (cwdRequire, preferredPackage) => gen(function* () {
55490
55512
  const path = yield* Path$2;
55491
55513
  const packageNames = preferredPackage === void 0 || preferredPackage === "" ? defaultTypescriptPackageNames$1 : Array.from(new Set([preferredPackage, ...defaultTypescriptPackageNames$1]));
@@ -55541,6 +55563,22 @@ const discoverOxlint = (cwdRequire) => gen(function* () {
55541
55563
  }
55542
55564
  return discovered;
55543
55565
  });
55566
+ const discoverTsrs = (cwdRequire) => gen(function* () {
55567
+ const path = yield* Path$2;
55568
+ const tsrs = yield* optionally(readPackage(cwdRequire, "tsrs"));
55569
+ if (tsrs === void 0) return [];
55570
+ const target = tsrsTarget(process.platform, process.arch, isGlibc());
55571
+ if (target === void 0) return [];
55572
+ const platformPackageName = `@tsrs/${target}`;
55573
+ const platformPackage = yield* optionally(readPackage(node_module.createRequire(tsrs.packageJsonPath), platformPackageName));
55574
+ if (platformPackage === void 0) return [];
55575
+ return [{
55576
+ component: "tsrs",
55577
+ packageName: platformPackageName,
55578
+ packageVersion: platformPackage.version,
55579
+ binaryPath: path.join(path.dirname(platformPackage.packageJsonPath), "tsrs")
55580
+ }];
55581
+ });
55544
55582
  const discoverVitePlusOxlint = (cwdRequire) => gen(function* () {
55545
55583
  const vitePlus = yield* optionally(readPackage(cwdRequire, "vite-plus"));
55546
55584
  if (vitePlus === void 0) return [];
@@ -55552,10 +55590,12 @@ const discoverBinaries = (cwd, preferredTypescriptPackage) => gen(function* () {
55552
55590
  const typescript = yield* discoverTypeScript(cwdRequire, preferredTypescriptPackage);
55553
55591
  const oxlint = yield* discoverOxlint(cwdRequire);
55554
55592
  const vitePlusOxlint = yield* discoverVitePlusOxlint(cwdRequire);
55593
+ const tsrs = yield* discoverTsrs(cwdRequire);
55555
55594
  const discovered = [...new Map([
55556
55595
  ...typescript,
55557
55596
  ...oxlint,
55558
- ...vitePlusOxlint
55597
+ ...vitePlusOxlint,
55598
+ ...tsrs
55559
55599
  ].map((binary) => [binary.binaryPath, binary])).values()];
55560
55600
  return yield* forEach$1(discovered, (binary) => hashFile(binary.binaryPath).pipe(map$5((fileHash) => ({
55561
55601
  ...binary,
@@ -55564,7 +55604,7 @@ const discoverBinaries = (cwd, preferredTypescriptPackage) => gen(function* () {
55564
55604
  });
55565
55605
  const selectComponents = (binaries, components) => binaries.filter((binary) => components.has(binary.component));
55566
55606
  const requireComponents = (binaries, components) => gen(function* () {
55567
- for (const component of components) if (!binaries.some((binary) => binary.component === component)) return yield* new DiscoveryError({ reason: `Unable to discover an installed ${component} binary.` });
55607
+ for (const component of components) if (!binaries.some((binary) => binary.component === component)) return yield* new DiscoveryError({ reason: component === "tsrs" ? `Unable to discover an installed tsrs binary. Install the tsrs package; its binary is published for ${tsrsTargets.join(", ")}.` : `Unable to discover an installed ${component} binary.` });
55568
55608
  return binaries;
55569
55609
  });
55570
55610
 
@@ -55644,6 +55684,11 @@ const resolvePlatformPackage = (target) => gen(function* () {
55644
55684
  });
55645
55685
  return { packageDir: path.dirname(packageJsonPath) };
55646
55686
  });
55687
+ const tsrsReplacementTargets = [
55688
+ "darwin-arm64",
55689
+ "linux-x64-gnu",
55690
+ "linux-arm64-gnu"
55691
+ ];
55647
55692
  const packagedArtifactPath = (packageDir, target) => gen(function* () {
55648
55693
  const path = yield* Path$2;
55649
55694
  const fileName = path.basename(target.binaryPath);
@@ -55653,7 +55698,7 @@ const resolveReplacement = (target) => gen(function* () {
55653
55698
  const fs = yield* FileSystem;
55654
55699
  if (target.component !== "typescript" && process.platform === "linux" && !isGlibc()) return yield* new ReplacementUnavailableError({
55655
55700
  target,
55656
- reason: "Linux musl is not supported by the packaged Oxlint integration."
55701
+ reason: target.component === "tsrs" ? `Linux musl is not supported by the packaged tsrs integration; it is built for ${tsrsReplacementTargets.join(", ")}.` : "Linux musl is not supported by the packaged Oxlint integration."
55657
55702
  });
55658
55703
  if (target.component === "oxlint-dts") return yield* resolveOxlintDeclarations(target);
55659
55704
  const replacementPath = yield* packagedArtifactPath((yield* resolvePlatformPackage(target)).packageDir, target);
@@ -204818,9 +204863,10 @@ var IntegrationSelectionError = class extends TaggedError$1("IntegrationSelectio
204818
204863
  };
204819
204864
  const integrationFlags = {
204820
204865
  typescript: Boolean$1("typescript").pipe(withDefault(true), withDescription$1("Include the native TypeScript-Go integration")),
204821
- oxlint: Boolean$1("oxlint").pipe(withDefault(false), withDescription$1("Include the experimental Oxlint integration"))
204866
+ oxlint: Boolean$1("oxlint").pipe(withDefault(false), withDescription$1("Include the experimental Oxlint integration")),
204867
+ tsrs: Boolean$1("tsrs").pipe(withDefault(false), withDescription$1("Include the experimental tsrs integration (the installed tsrs package's binary)"))
204822
204868
  };
204823
- const ensureIntegrationSelected = (typescript, oxlint) => typescript || oxlint ? void_$1 : fail$2(new IntegrationSelectionError({ reason: "Select at least one integration to manage." }));
204869
+ const ensureIntegrationSelected = (typescript, oxlint, tsrs = false) => typescript || oxlint || tsrs ? void_$1 : fail$2(new IntegrationSelectionError({ reason: "Select at least one integration to manage." }));
204824
204870
 
204825
204871
  //#endregion
204826
204872
  //#region src/cli/presets.ts
@@ -205097,13 +205143,14 @@ var ChmodBinaryError = class extends TaggedError$1("ChmodBinaryError") {
205097
205143
  return `Failed to set executable permissions on ${this.targetPath}.`;
205098
205144
  }
205099
205145
  };
205100
- const selectedComponents = (typescript, oxlint) => {
205146
+ const selectedComponents = (typescript, oxlint, tsrs) => {
205101
205147
  const components = /* @__PURE__ */ new Set();
205102
205148
  if (typescript) components.add("typescript");
205103
205149
  if (oxlint) {
205104
205150
  components.add("oxlint");
205105
205151
  components.add("oxlint-tsgolint");
205106
205152
  }
205153
+ if (tsrs) components.add("tsrs");
205107
205154
  return components;
205108
205155
  };
205109
205156
  const discoverSelected = (components, preferredTypescriptPackage) => gen(function* () {
@@ -205116,10 +205163,10 @@ const patchCommand = make("patch", {
205116
205163
  force: Boolean$1("force").pipe(withDefault(false), withDescription$1("Deprecated compatibility flag; replacements are selected by package version")),
205117
205164
  skipMissing: Boolean$1("skip-missing").pipe(withDefault(false), withDescription$1("Skip selected integrations without a matching packaged replacement")),
205118
205165
  typescriptPackage: typescriptPackageFlag
205119
- }).pipe(withDescription("Patch the selected Effect integrations"), withHandler(({ oxlint, skipMissing, typescript, typescriptPackage }) => scoped(gen(function* () {
205120
- yield* ensureIntegrationSelected(typescript, oxlint);
205166
+ }).pipe(withDescription("Patch the selected Effect integrations"), withHandler(({ oxlint, skipMissing, tsrs, typescript, typescriptPackage }) => scoped(gen(function* () {
205167
+ yield* ensureIntegrationSelected(typescript, oxlint, tsrs);
205121
205168
  if (!typescript && isSome(typescriptPackage)) return yield* new IntegrationSelectionError({ reason: "--typescript-package requires the TypeScript integration." });
205122
- const components = selectedComponents(typescript, oxlint);
205169
+ const components = selectedComponents(typescript, oxlint, tsrs);
205123
205170
  const result = yield* patch({
205124
205171
  cwd: process.cwd(),
205125
205172
  components,
@@ -205132,10 +205179,10 @@ const patchCommand = make("patch", {
205132
205179
  const unpatchCommand = make("unpatch", {
205133
205180
  ...integrationFlags,
205134
205181
  typescriptPackage: typescriptPackageFlag
205135
- }).pipe(withDescription("Unpatch and restore the selected integrations"), withHandler(({ oxlint, typescript, typescriptPackage }) => gen(function* () {
205136
- yield* ensureIntegrationSelected(typescript, oxlint);
205182
+ }).pipe(withDescription("Unpatch and restore the selected integrations"), withHandler(({ oxlint, tsrs, typescript, typescriptPackage }) => gen(function* () {
205183
+ yield* ensureIntegrationSelected(typescript, oxlint, tsrs);
205137
205184
  if (!typescript && isSome(typescriptPackage)) return yield* new IntegrationSelectionError({ reason: "--typescript-package requires the TypeScript integration." });
205138
- const components = selectedComponents(typescript, oxlint);
205185
+ const components = selectedComponents(typescript, oxlint, tsrs);
205139
205186
  const result = yield* unpatch({
205140
205187
  cwd: process.cwd(),
205141
205188
  components,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.56.0",
3
+ "version": "0.57.0",
4
4
  "type": "module",
5
5
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
6
6
  "license": "MIT",
@@ -41,13 +41,13 @@
41
41
  "schema.json"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@effect/tsgo-win32-x64": "0.56.0",
45
- "@effect/tsgo-win32-arm64": "0.56.0",
46
- "@effect/tsgo-linux-x64": "0.56.0",
47
- "@effect/tsgo-linux-arm64": "0.56.0",
48
- "@effect/tsgo-linux-arm": "0.56.0",
49
- "@effect/tsgo-darwin-x64": "0.56.0",
50
- "@effect/tsgo-darwin-arm64": "0.56.0"
44
+ "@effect/tsgo-win32-arm64": "0.57.0",
45
+ "@effect/tsgo-linux-x64": "0.57.0",
46
+ "@effect/tsgo-linux-arm64": "0.57.0",
47
+ "@effect/tsgo-linux-arm": "0.57.0",
48
+ "@effect/tsgo-darwin-x64": "0.57.0",
49
+ "@effect/tsgo-win32-x64": "0.57.0",
50
+ "@effect/tsgo-darwin-arm64": "0.57.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@effect/platform-node": "^4.0.2",