@effect/tsgo 0.69.0 → 0.73.2

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
@@ -5,13 +5,13 @@ A wrapper for both [TSRS](https://github.com/oxc-project/tsrs) and [TypeScript-G
5
5
  <!-- supported-components:start -->
6
6
  ## Supported Package Versions
7
7
 
8
- The following target package versions are supported by `@effect/tsgo@0.69.0`:
8
+ The following target package versions are supported by `@effect/tsgo@0.73.2`:
9
9
 
10
10
  | Component | Supported versions |
11
11
  |---|---|
12
- | TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261112.1` |
13
- | tsrs | `0.25.0-ts7.1.0-beta` |
14
- | Oxlint | `1.91.0`, `1.92.0`, `1.93.0` |
12
+ | TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261118.1` |
13
+ | tsrs | `7.1.0-beta.tsrs2`, `7.1.0-beta.tsrs3` |
14
+ | Oxlint | `1.91.0`, `1.92.0`, `1.93.0`, `1.94.0` |
15
15
  | oxlint-tsgolint | `7.0.2005`, `7.0.2006`, `7.0.2007` |
16
16
  <!-- supported-components:end -->
17
17
 
@@ -52,9 +52,10 @@ effect-tsgo --tsrs-lint=latest vp lint # with a tsrs version or tag
52
52
 
53
53
  Every argument after the tool is passed through unchanged, so the commands work as drop-in replacements in `package.json` scripts and editor settings that launch `tsc`.
54
54
 
55
- - `tsc` and `tsrs` run the requested version or tag; without one they run the build of the installed `typescript`/`@typescript/native` (>= 7) or `tsrs` version when this release ships it, and otherwise the latest supported version. They do not require TypeScript or tsrs to be installed.
56
- - `oxlint` runs the CLI of the installed `oxlint` package (installed directly or through `vite-plus`) with the Effect-patched native binding and, when `oxlint-tsgolint` is installed, the Effect-patched `tsgolint` of the installed versions. It does not accept a version.
57
- - `vp` runs the CLI of the installed `vite-plus` package, so that the Oxlint it starts (for `vp check`, `vp lint`, and scripts run through `vp run`) uses the Effect-patched binding and `tsgolint` of the oxlint version vite-plus resolves. It does not accept a version.
55
+ - `tsc` and `tsrs` run the requested version or tag; without one they run the build of the installed `typescript`/`@typescript/native` (>= 7) or `tsrs` (installed directly or through `vite-plus`) version when this release ships it, and otherwise the latest supported version. They do not require TypeScript or tsrs to be installed.
56
+ - `oxlint` runs the CLI of the installed `oxlint` package (installed directly or through `vite-plus`) with the Effect-patched native binding and, when `oxlint-tsgolint` is installed, the Effect-patched `tsgolint` of the installed versions. Without `oxlint-tsgolint` but with `tsrs` installed, the type-aware rules run on the Effect-patched build of that `tsrs` version. It does not accept a version.
57
+ - `vp` runs the CLI of the installed `vite-plus` package, so that the Oxlint it starts (for `vp check`, `vp lint`, and scripts run through `vp run`) uses the Effect-patched binding and type-aware linter of the versions vite-plus resolves: `tsgolint` up to Vite+ 1.6, and from Vite+ 1.7.0, which lints with its own `tsrs`, the Effect-patched build of that `tsrs` version. It does not accept a version.
58
+ - `oxlint` and `vp` also set `TSRS_BINARY` to the Effect-patched build of the installed `tsrs` version when this release ships it, so every `tsrs` started through tsrs's launcher under them, such as `vp exec tsrs`, is the patched one.
58
59
  - `--tsrs-lint[=<version|tag>]`, in front of `oxlint` or `vp`, runs Oxlint's type-aware rules, including the Effect ones, on the Effect-patched `tsrs` (`tsrs --lint`, tsrs's port of tsgolint) instead of the patched `tsgolint`; `oxlint-tsgolint` does not need to be installed. The tsrs version is picked as for `effect-tsgo tsrs`: the requested version or tag, else the installed `tsrs` version when this release ships it, else the latest supported one. tsrs does not support tsgolint's Go profiling variables (`OXLINT_TSGOLINT_TRACE`, `OXLINT_TSGOLINT_CPU`, `OXLINT_TSGOLINT_HEAP`, `OXLINT_TSGOLINT_ALLOCS`).
59
60
  - `oxlint` and `vp` work under Node.js and Bun: they preload `@effect/tsgo/oxlint-bridge` through `NODE_OPTIONS` and `BUN_OPTIONS`, in front of any options already set there, so every process they start loads the patched Oxlint binding in place of the stock one and every other native addon unchanged.
60
61
  - As with `patch`, the packaged `tsrs` and `oxlint` builds do not support Linux musl.
@@ -159,6 +160,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
159
160
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-over-json.md"><code>preferSchemaOverJson</code></a></td><td>Deprecated: use globalJsonInEffect and globalJson instead. Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify inside Effect code</td></tr>
160
161
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env.md"><code>processEnv</code></a></td><td>Warns when reading process.env outside Effect generators instead of using Effect Config</td></tr>
161
162
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env-in-effect.md"><code>processEnvInEffect</code></a></td><td>Warns when reading process.env inside Effect generators instead of using Effect Config</td></tr>
163
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/promise-all-in-effect.md"><code>promiseAllInEffect</code></a></td><td>Warns when Promise.all or Promise.allSettled fans out over an array inside Effect code instead of Effect.forEach or Effect.all with a concurrency option</td></tr>
164
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/promise-race-in-effect.md"><code>promiseRaceInEffect</code></a></td><td>Warns when Promise.race or Promise.any races a list of promises inside Effect code, leaving the losing promises running</td></tr>
162
165
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-sync.md"><code>schemaSync</code></a></td><td>Suggests Effect-based Schema decoding and encoding instead of synchronous methods</td></tr>
163
166
  <tr><td colspan="2"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
164
167
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/acquire-release-disposable.md"><code>acquireReleaseDisposable</code></a></td><td>Suggests Effect.acquireDisposable when Effect.acquireRelease only invokes the acquired resource&#39;s disposal protocol</td></tr>
@@ -185,8 +188,11 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
185
188
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-conditional-to-filter-or-fail.md"><code>flatMapConditionalToFilterOrFail</code></a></td><td>Suggests Effect.filterOrFail or Effect.filterOrElse when Effect.flatMap conditionally passes its input through with Effect.succeed</td></tr>
186
189
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-identity-to-flatten.md"><code>flatMapIdentityToFlatten</code></a></td><td>Suggests Effect.flatten instead of Effect.flatMap when the callback is Effect&#39;s identity export referenced directly or an unannotated function returning its parameter</td></tr>
187
190
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-ignored-param-to-and-then.md"><code>flatMapIgnoredParamToAndThen</code></a></td><td>Suggests using Effect.andThen instead of Effect.flatMap when a zero-parameter callback returns an existing Effect value</td></tr>
191
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-map-to-zip-with.md"><code>flatMapMapToZipWith</code></a></td><td>Suggests Effect.zipWith when Effect.flatMap only maps an independent effect with its parameter</td></tr>
192
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-provide-service-to-provide-service-effect.md"><code>flatMapProvideServiceToProvideServiceEffect</code></a></td><td>Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService</td></tr>
188
193
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-to-map.md"><code>flatMapToMap</code></a></td><td>Suggests using Effect.map instead of Effect.flatMap when the callback only wraps its result with Effect.succeed</td></tr>
189
194
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-to-tap.md"><code>flatMapToTap</code></a></td><td>Suggests Effect.tap when a flatMap or andThen callback runs an effect and returns its unchanged parameter</td></tr>
195
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/for-loop-push-to-for-each.md"><code>forLoopPushToForEach</code></a></td><td>Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator</td></tr>
190
196
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/manual-metric-tap-to-track.md"><code>manualMetricTapToTrack</code></a></td><td>Suggests Effect.trackSuccesses/trackErrors/trackDefects when an Effect.tap/tapError/tapDefect only updates a metric</td></tr>
191
197
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-const-to-as.md"><code>mapConstToAs</code></a></td><td>Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant</td></tr>
192
198
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-map-error-to-map-both.md"><code>mapMapErrorToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.map and Effect.mapError are adjacent steps of a piping flow</td></tr>
@@ -57911,7 +57911,7 @@ const runWith = (command, config) => {
57911
57911
  //#endregion
57912
57912
  //#region package.json
57913
57913
  var name = "@effect/tsgo";
57914
- var version = "0.69.0";
57914
+ var version = "0.73.2";
57915
57915
 
57916
57916
  //#endregion
57917
57917
  //#region src/metadata.json
@@ -57980,6 +57980,8 @@ var presets$1 = [
57980
57980
  "flatMapConditionalToFilterOrFail": "suggestion",
57981
57981
  "flatMapIdentityToFlatten": "suggestion",
57982
57982
  "flatMapIgnoredParamToAndThen": "suggestion",
57983
+ "flatMapMapToZipWith": "suggestion",
57984
+ "flatMapProvideServiceToProvideServiceEffect": "suggestion",
57983
57985
  "flatMapToMap": "suggestion",
57984
57986
  "flatMapToTap": "suggestion",
57985
57987
  "floatingEffect": "error",
@@ -58084,6 +58086,8 @@ var presets$1 = [
58084
58086
  "flatMapConditionalToFilterOrFail": "error",
58085
58087
  "flatMapIdentityToFlatten": "error",
58086
58088
  "flatMapIgnoredParamToAndThen": "error",
58089
+ "flatMapMapToZipWith": "error",
58090
+ "flatMapProvideServiceToProvideServiceEffect": "error",
58087
58091
  "flatMapToMap": "error",
58088
58092
  "flatMapToTap": "error",
58089
58093
  "floatingEffect": "error",
@@ -58239,6 +58243,8 @@ var presets$1 = [
58239
58243
  "preferEffectString": "warning",
58240
58244
  "processEnv": "warning",
58241
58245
  "processEnvInEffect": "warning",
58246
+ "promiseAllInEffect": "warning",
58247
+ "promiseRaceInEffect": "warning",
58242
58248
  "schemaSync": "warning"
58243
58249
  }
58244
58250
  },
@@ -58270,8 +58276,11 @@ var presets$1 = [
58270
58276
  "flatMapConditionalToFilterOrFail": "warning",
58271
58277
  "flatMapIdentityToFlatten": "warning",
58272
58278
  "flatMapIgnoredParamToAndThen": "warning",
58279
+ "flatMapMapToZipWith": "warning",
58280
+ "flatMapProvideServiceToProvideServiceEffect": "warning",
58273
58281
  "flatMapToMap": "warning",
58274
58282
  "flatMapToTap": "warning",
58283
+ "forLoopPushToForEach": "warning",
58275
58284
  "manualMetricTapToTrack": "warning",
58276
58285
  "mapConstToAs": "warning",
58277
58286
  "mapMapErrorToMapBoth": "warning",
@@ -59596,6 +59605,40 @@ var rules = [
59596
59605
  }]
59597
59606
  }
59598
59607
  },
59608
+ {
59609
+ "name": "promiseAllInEffect",
59610
+ "group": "effectNative",
59611
+ "description": "Warns when Promise.all or Promise.allSettled fans out over an array inside Effect code instead of Effect.forEach or Effect.all with a concurrency option",
59612
+ "defaultSeverity": "off",
59613
+ "fixable": true,
59614
+ "supportedEffect": ["v3", "v4"],
59615
+ "codes": [377198],
59616
+ "preview": {
59617
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const ids: ReadonlyArray<string>\ndeclare const fetchUser: (id: string) => Promise<{ readonly name: string }>\n\nexport const users = Effect.tryPromise(() => Promise.all(ids.map((id) => fetchUser(id))))\n",
59618
+ "diagnostics": [{
59619
+ "start": 196,
59620
+ "end": 207,
59621
+ "text": "`Promise.all` starts every promise at once with no concurrency bound, and they keep running when the fiber is interrupted. Use `Effect.forEach` with a concurrency option instead. effect(promiseAllInEffect)"
59622
+ }]
59623
+ }
59624
+ },
59625
+ {
59626
+ "name": "promiseRaceInEffect",
59627
+ "group": "effectNative",
59628
+ "description": "Warns when Promise.race or Promise.any races a list of promises inside Effect code, leaving the losing promises running",
59629
+ "defaultSeverity": "off",
59630
+ "fixable": true,
59631
+ "supportedEffect": ["v3", "v4"],
59632
+ "codes": [377212, 377213],
59633
+ "preview": {
59634
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const mirrors: ReadonlyArray<string>\ndeclare const download: (url: string) => Promise<Uint8Array>\n\nexport const preview = Effect.tryPromise(() => Promise.any(mirrors.map((url) => download(url))))\n",
59635
+ "diagnostics": [{
59636
+ "start": 187,
59637
+ "end": 198,
59638
+ "text": "This Effect code races promises with `Promise.any`; the losing promises keep running and are not interrupted. Use `Effect.raceAll` over Effect values instead. effect(promiseRaceInEffect)"
59639
+ }]
59640
+ }
59641
+ },
59599
59642
  {
59600
59643
  "name": "schemaSync",
59601
59644
  "group": "effectNative",
@@ -60021,6 +60064,40 @@ var rules = [
60021
60064
  }]
60022
60065
  }
60023
60066
  },
60067
+ {
60068
+ "name": "flatMapMapToZipWith",
60069
+ "group": "style",
60070
+ "description": "Suggests Effect.zipWith when Effect.flatMap only maps an independent effect with its parameter",
60071
+ "defaultSeverity": "suggestion",
60072
+ "fixable": true,
60073
+ "supportedEffect": ["v3", "v4"],
60074
+ "codes": [377218],
60075
+ "preview": {
60076
+ "sourceText": "import { Effect } from \"effect\"\n\n// The quick fix rewrites this to Effect.zipWith(getUser, getConfig, (user, config) => `${user.name} (${config.locale})`).\n// Notes:\n// - The rule stays silent when the inner effect uses the outer result (e.g. `loadProfile(user.id)`),\n// because the second effect depends on the first and zipWith does not apply.\n// - When the combiner is exactly `[user, config]`, the fix suggests Effect.zip(getUser, getConfig).\n// - The rule stays silent when the mapper returns the outer value unchanged, because flatMapToTap covers that.\n\ndeclare const getUser: Effect.Effect<{ readonly name: string }>\ndeclare const getConfig: Effect.Effect<{ readonly locale: string }>\n\nexport const greeting = Effect.flatMap(getUser, (user) =>\n Effect.map(getConfig, (config) => `${user.name} (${config.locale})`))\n",
60077
+ "diagnostics": [{
60078
+ "start": 719,
60079
+ "end": 733,
60080
+ "text": "`Effect.zipWith` combines these two independent effects directly instead of `Effect.flatMap` nesting an `Effect.map` over an effect that does not use the outer result. effect(flatMapMapToZipWith)"
60081
+ }]
60082
+ }
60083
+ },
60084
+ {
60085
+ "name": "flatMapProvideServiceToProvideServiceEffect",
60086
+ "group": "style",
60087
+ "description": "Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService",
60088
+ "defaultSeverity": "suggestion",
60089
+ "fixable": true,
60090
+ "supportedEffect": ["v3", "v4"],
60091
+ "codes": [377194],
60092
+ "preview": {
60093
+ "sourceText": "import { Context, Effect } from \"effect\"\n\n// The quick fix rewrites this to Effect.provideServiceEffect(program, Database, makeConnection).\n// Notes:\n// - After the fix, `program` is evaluated once when the expression is built, not on every run of the callback.\n// - The Effect.gen form (`const conn = yield* makeConnection; return yield* Effect.provideService(program, Database, conn)`)\n// is deliberately not reported.\n// - On Effect v3, data-first `Effect.andThen(acquire, callback)` is not reported, since its overloads do not form a dual.\n\ninterface DatabaseConnection {\n readonly query: (sql: string) => Effect.Effect<string>\n}\n\nconst Database = Context.Service<DatabaseConnection>(\"Database\")\n\ndeclare const makeConnection: Effect.Effect<DatabaseConnection>\n\nconst program = Effect.gen(function*() {\n const db = yield* Effect.service(Database)\n return yield* db.query(\"SELECT * FROM users\")\n})\n\nexport const runWithDatabase = makeConnection.pipe(\n Effect.flatMap((conn) => Effect.provideService(program, Database, conn))\n)\n",
60094
+ "diagnostics": [{
60095
+ "start": 961,
60096
+ "end": 975,
60097
+ "text": "`Effect.provideServiceEffect` provides this service from the acquiring effect directly instead of `Effect.flatMap` forwarding its parameter to `Effect.provideService`. effect(flatMapProvideServiceToProvideServiceEffect)"
60098
+ }]
60099
+ }
60100
+ },
60024
60101
  {
60025
60102
  "name": "flatMapToMap",
60026
60103
  "group": "style",
@@ -60055,6 +60132,23 @@ var rules = [
60055
60132
  }]
60056
60133
  }
60057
60134
  },
60135
+ {
60136
+ "name": "forLoopPushToForEach",
60137
+ "group": "style",
60138
+ "description": "Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator",
60139
+ "defaultSeverity": "off",
60140
+ "fixable": true,
60141
+ "supportedEffect": ["v3", "v4"],
60142
+ "codes": [377170],
60143
+ "preview": {
60144
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const items: ReadonlyArray<number>\ndeclare const processItem: (item: number) => Effect.Effect<string>\n\nexport const program = Effect.gen(function*() {\n const results = []\n for (const item of items) {\n results.push(yield* processItem(item))\n }\n return results\n})\n",
60145
+ "diagnostics": [{
60146
+ "start": 215,
60147
+ "end": 289,
60148
+ "text": "`Effect.forEach` expresses this for-of loop that pushes yielded results into an accumulator more directly, and makes ordering and concurrency explicit. effect(forLoopPushToForEach)"
60149
+ }]
60150
+ }
60151
+ },
60058
60152
  {
60059
60153
  "name": "manualMetricTapToTrack",
60060
60154
  "group": "style",
@@ -60929,11 +61023,11 @@ var tags = {
60929
61023
  "typescript": {
60930
61024
  "latest": "7.0.2",
60931
61025
  "beta": "7.1.0-beta",
60932
- "next": "7.1.0-dev.20261112.1"
61026
+ "next": "7.1.0-dev.20261118.1"
60933
61027
  },
60934
- "oxlint": { "latest": "1.93.0" },
61028
+ "oxlint": { "latest": "1.94.0" },
60935
61029
  "oxlint-tsgolint": { "latest": "7.0.2007" },
60936
- "tsrs": { "latest": "0.25.0-ts7.1.0-beta" }
61030
+ "tsrs": { "latest": "7.1.0-beta.tsrs3" }
60937
61031
  };
60938
61032
  var components = {
60939
61033
  "typescript": {
@@ -60945,8 +61039,8 @@ var components = {
60945
61039
  "gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a",
60946
61040
  "provider": "typescript"
60947
61041
  },
60948
- "7.1.0-dev.20261112.1": {
60949
- "gitHead": "ad24728023c52ef6a92a278046cdb69621048365",
61042
+ "7.1.0-dev.20261118.1": {
61043
+ "gitHead": "e086ad3b8205668290a81baed890c536047003db",
60950
61044
  "provider": "typescript"
60951
61045
  }
60952
61046
  },
@@ -60967,15 +61061,25 @@ var components = {
60967
61061
  "oxlint": {
60968
61062
  "1.91.0": { "gitHead": "f3fcdcc61b08e9880476279ba21a363967940fa4" },
60969
61063
  "1.92.0": { "gitHead": "29daf901a1ea6b0a7a56c2b9d488bd2850d0abd4" },
60970
- "1.93.0": { "gitHead": "7d8e1f4953a694e9705117f674933925142ed457" }
61064
+ "1.93.0": { "gitHead": "7d8e1f4953a694e9705117f674933925142ed457" },
61065
+ "1.94.0": { "gitHead": "229b69bf10a9c876f84287123fdf9d5e0747c96b" }
60971
61066
  },
60972
- "tsrs": { "0.25.0-ts7.1.0-beta": {
60973
- "gitHead": "0f82b670e4ff861840b1315f8610816229e73e3a",
60974
- "typescript": {
60975
- "version": "7.1.0-beta",
60976
- "gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
61067
+ "tsrs": {
61068
+ "7.1.0-beta.tsrs2": {
61069
+ "gitHead": "b12862d0636c21a98d53d01c6b29570ef5f604e7",
61070
+ "typescript": {
61071
+ "version": "7.1.0-beta",
61072
+ "gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
61073
+ }
61074
+ },
61075
+ "7.1.0-beta.tsrs3": {
61076
+ "gitHead": "eba9b2b796ef5e4a80b793e0b94b72bc7d4a9c05",
61077
+ "typescript": {
61078
+ "version": "7.1.0-beta",
61079
+ "gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
61080
+ }
60977
61081
  }
60978
- } }
61082
+ }
60979
61083
  };
60980
61084
 
60981
61085
  //#endregion
@@ -61126,24 +61230,18 @@ const discoverTsrs = (cwdRequire) => gen(function* () {
61126
61230
  binaryPath: path.join(path.dirname(platformPackage.packageJsonPath), tsrsExecutableName(process.platform))
61127
61231
  }];
61128
61232
  });
61129
- const discoverVitePlusOxlint = (cwdRequire) => gen(function* () {
61233
+ const packageScopes = (cwd) => gen(function* () {
61234
+ const path = yield* Path$2;
61235
+ const cwdRequire = node_module.createRequire(path.join(cwd, "noop.js"));
61130
61236
  const vitePlus = yield* optionally(readPackage(cwdRequire, "vite-plus"));
61131
- if (vitePlus === void 0) return [];
61132
- return yield* discoverOxlint(node_module.createRequire(vitePlus.packageJsonPath));
61237
+ return vitePlus === void 0 ? [cwdRequire] : [cwdRequire, node_module.createRequire(vitePlus.packageJsonPath)];
61133
61238
  });
61134
61239
  const discoverBinaries = (cwd, preferredTypescriptPackage) => gen(function* () {
61135
- const path = yield* Path$2;
61136
- const cwdRequire = node_module.createRequire(path.join(cwd, "noop.js"));
61137
- const typescript = yield* discoverTypeScript(cwdRequire, preferredTypescriptPackage);
61138
- const oxlint = yield* discoverOxlint(cwdRequire);
61139
- const vitePlusOxlint = yield* discoverVitePlusOxlint(cwdRequire);
61140
- const tsrs = yield* discoverTsrs(cwdRequire);
61141
- const discovered = [...new Map([
61142
- ...typescript,
61143
- ...oxlint,
61144
- ...vitePlusOxlint,
61145
- ...tsrs
61146
- ].map((binary) => [binary.binaryPath, binary])).values()];
61240
+ const scopes = yield* packageScopes(cwd);
61241
+ const typescript = yield* discoverTypeScript(scopes[0], preferredTypescriptPackage);
61242
+ const scoped = yield* forEach$1(scopes, (require) => zipWith(discoverOxlint(require), discoverTsrs(require), (oxlint, tsrs) => [...oxlint, ...tsrs]));
61243
+ const located = [...typescript, ...scoped.flat()];
61244
+ const discovered = [...new Map(located.map((binary) => [binary.binaryPath, binary])).values()];
61147
61245
  return yield* forEach$1(discovered, (binary) => hashFile(binary.binaryPath).pipe(map$2((fileHash) => ({
61148
61246
  ...binary,
61149
61247
  fileHash
@@ -61456,9 +61554,11 @@ const applyPlan = (plan) => gen(function* () {
61456
61554
  });
61457
61555
  const discoverSelected$1 = (cwd, components, preferredTypescriptPackage) => gen(function* () {
61458
61556
  const discovered = yield* discoverBinaries(cwd, preferredTypescriptPackage);
61459
- const selectedComponents = new Set(components);
61460
- if (selectedComponents.has("oxlint")) selectedComponents.add("oxlint-dts");
61461
- return yield* requireComponents(selectComponents(discovered, selectedComponents), selectedComponents);
61557
+ const required = new Set(components);
61558
+ if (required.has("oxlint")) required.add("oxlint-dts");
61559
+ const selected = new Set(required);
61560
+ if (selected.has("oxlint")) selected.add("oxlint-tsgolint");
61561
+ return yield* requireComponents(selectComponents(discovered, selected), required);
61462
61562
  });
61463
61563
  const changedTargets = (targets, skipped) => {
61464
61564
  const skippedPaths = new Set(skipped.map(({ target }) => target.binaryPath));
@@ -208662,7 +208762,13 @@ const getPatchCommand = (integrations) => {
208662
208762
  const typescript = integrations.includes("typescript");
208663
208763
  const oxlint = integrations.includes("oxlint");
208664
208764
  if (!typescript && !oxlint) return void 0;
208665
- return `effect-tsgo patch ${typescript ? "--typescript" : "--no-typescript"} ${oxlint ? "--oxlint" : "--no-oxlint"}`;
208765
+ return `effect-tsgo patch ${typescript ? "--typescript" : "--no-typescript"} ${oxlint ? "--oxlint" : "--no-oxlint"}${integrations.includes("tsrs") ? " --tsrs" : ""}`;
208766
+ };
208767
+ const vitePlusLintsWithTsrs = (spec) => {
208768
+ const match = /(\d+)\.(\d+)\.(\d+)/.exec(spec);
208769
+ if (match === null) return false;
208770
+ const major = Number(match[1]);
208771
+ return major > 1 || major === 1 && Number(match[2]) >= 7;
208666
208772
  };
208667
208773
  const splitCommands = (script) => {
208668
208774
  const ranges = [];
@@ -208813,7 +208919,8 @@ const updatePatchCommand = (script, integrations) => {
208813
208919
  const whitespaceStart = suffix.slice(0, relativeStart).search(/\s+$/);
208814
208920
  suffix = suffix.slice(0, whitespaceStart < 0 ? relativeStart : whitespaceStart) + suffix.slice(relativeEnd);
208815
208921
  }
208816
- updated = updated.slice(0, match.patchEnd) + flags + suffix + updated.slice(match.end);
208922
+ const matchFlags = /(?:^|\s)--tsrs(?:\s|$)/.test(suffix) ? flags.replace(/ --tsrs$/, "") : flags;
208923
+ updated = updated.slice(0, match.patchEnd) + matchFlags + suffix + updated.slice(match.end);
208817
208924
  }
208818
208925
  return {
208819
208926
  script: updated,
@@ -210279,7 +210386,7 @@ const create = (assessment, context, options) => gen(function* () {
210279
210386
  }) : assessment.packageJson.oxlintTsgolintVersion,
210280
210387
  prepareScript: true,
210281
210388
  managePrepareScript: true,
210282
- integrations
210389
+ integrations: useOxlint && exists$1(assessment.packageJson.vitePlusVersion, (dependency) => vitePlusLintsWithTsrs(dependency.version)) ? [...integrations.filter((integration) => integration !== "tsrs"), "tsrs"] : integrations.filter((integration) => integration !== "tsrs")
210283
210390
  },
210284
210391
  tsconfig: {
210285
210392
  schemaPath: useTypescript ? some(relativeSchemaPath.startsWith(".") ? relativeSchemaPath : `./${relativeSchemaPath}`) : none(),
@@ -210421,6 +210528,13 @@ const integrationFlags = {
210421
210528
  oxlint: Boolean$1("oxlint").pipe(withDefault(false), withDescription$1("Include the experimental Oxlint integration")),
210422
210529
  tsrs: Boolean$1("tsrs").pipe(withDefault(false), withDescription$1("Include the experimental tsrs integration (the installed tsrs package's binary)"))
210423
210530
  };
210531
+ const selectedComponents = (typescript, oxlint, tsrs) => {
210532
+ const components = /* @__PURE__ */ new Set();
210533
+ if (typescript) components.add("typescript");
210534
+ if (oxlint) components.add("oxlint");
210535
+ if (tsrs) components.add("tsrs");
210536
+ return components;
210537
+ };
210424
210538
  const ensureIntegrationSelected = (typescript, oxlint, tsrs = false) => typescript || oxlint || tsrs ? void_$1 : fail$5(new IntegrationSelectionError({ reason: "Select at least one integration to manage." }));
210425
210539
 
210426
210540
  //#endregion
@@ -210559,8 +210673,12 @@ const installedTypescriptVersion = (context) => gen(function* () {
210559
210673
  if (installed !== void 0 && isNativeTypescriptVersion$1(installed.version)) return installed.version;
210560
210674
  }
210561
210675
  });
210562
- const installedTsrsVersion = (context) => gen(function* () {
210563
- return (yield* findInstalledPackage(yield* projectRequire(context), "tsrs").pipe(mapError(toProxyError)))?.version;
210676
+ const installedTsrsVersion = (context, vitePlusFirst = false) => gen(function* () {
210677
+ const scopes = yield* packageScopes(context.cwd).pipe(mapError(toProxyError));
210678
+ for (const require of vitePlusFirst ? [...scopes].reverse() : scopes) {
210679
+ const installed = yield* findInstalledPackage(require, "tsrs").pipe(mapError(toProxyError));
210680
+ if (installed !== void 0) return installed.version;
210681
+ }
210564
210682
  });
210565
210683
  const requireArtifact = (artifactPath) => gen(function* () {
210566
210684
  if (!(yield* (yield* FileSystem).exists(artifactPath).pipe(mapError(toProxyError)))) return yield* new ProxyError({ reason: `Missing packaged artifact ${artifactPath}.` });
@@ -210587,12 +210705,26 @@ const resolveTsc = (context, invocation) => gen(function* () {
210587
210705
  };
210588
210706
  });
210589
210707
  const packagedTsrs = (context, requested) => gen(function* () {
210708
+ return yield* packagedTsrsBuild(context, yield* selectVersion("tsrs", "tsrs", requested, requested === void 0 ? yield* installedTsrsVersion(context) : void 0));
210709
+ });
210710
+ const packagedInstalledTsrs = (context, version) => gen(function* () {
210711
+ const versions = supportedVersions("tsrs");
210712
+ if (!versions.includes(version)) return yield* new UnsupportedProxyVersionError({
210713
+ packageName: "tsrs",
210714
+ version,
210715
+ source: "installed",
210716
+ supportedVersions: versions,
210717
+ tags: {}
210718
+ });
210719
+ return yield* packagedTsrsBuild(context, version);
210720
+ });
210721
+ const packagedTsrsBuild = (context, version) => gen(function* () {
210590
210722
  const fs = yield* FileSystem;
210591
210723
  const path = yield* Path$2;
210592
210724
  if (context.platform === "linux" && !context.isGlibc()) return yield* new ProxyError({ reason: `Linux musl is not supported by the packaged tsrs integration; it is built for ${tsrsReplacementTargets.join(", ")}.` });
210593
210725
  const target = tsrsTarget(context.platform, context.arch, true);
210594
210726
  if (target === void 0 || !tsrsReplacementTargets.includes(target)) return yield* new ProxyError({ reason: `The packaged tsrs integration is not available for ${context.platform}-${context.arch}; it is built for ${tsrsReplacementTargets.join(", ")}.` });
210595
- const executable = yield* requireArtifact(yield* tsrsExecutable(context, yield* selectVersion("tsrs", "tsrs", requested, requested === void 0 ? yield* installedTsrsVersion(context) : void 0)));
210727
+ const executable = yield* requireArtifact(yield* tsrsExecutable(context, version));
210596
210728
  const libraryPath = path.join(path.dirname(executable), "lib.d.ts");
210597
210729
  if (!(yield* fs.exists(libraryPath).pipe(mapError(toProxyError)))) return yield* new ProxyError({ reason: `Missing ${libraryPath}: tsrs needs its lib*.d.ts files next to the packaged binary ${executable}. Reinstall @effect/tsgo-${context.platform}-${context.arch}.` });
210598
210730
  yield* ensureExecutable(executable, context.platform);
@@ -210607,12 +210739,8 @@ const resolveTsrs = (context, invocation) => gen(function* () {
210607
210739
  };
210608
210740
  });
210609
210741
  const findOxlintInstallation = (cwd) => gen(function* () {
210610
- const path = yield* Path$2;
210611
210742
  const find = (require, packageName) => findInstalledPackage(require, packageName).pipe(mapError(toProxyError));
210612
- const cwdRequire = node_module.createRequire(path.join(cwd, "noop.js"));
210613
- const vitePlus = yield* find(cwdRequire, "vite-plus");
210614
- const scopes = [cwdRequire, ...vitePlus === void 0 ? [] : [node_module.createRequire(vitePlus.packageJsonPath)]];
210615
- for (const require of scopes) {
210743
+ for (const require of yield* packageScopes(cwd).pipe(mapError(toProxyError))) {
210616
210744
  const oxlint = yield* find(require, "oxlint");
210617
210745
  if (oxlint !== void 0) return {
210618
210746
  oxlint,
@@ -210654,15 +210782,22 @@ const packagedTsrsLint = (context, selection) => gen(function* () {
210654
210782
  executable: yield* packagedTsrs(context, selection.version)
210655
210783
  };
210656
210784
  });
210657
- const oxlintArtifacts = (context, installation, tsrsLint) => gen(function* () {
210785
+ const oxlintArtifacts = (context, installation, tsrsLint, installedTsrs = void 0) => gen(function* () {
210658
210786
  const target = yield* try_({
210659
210787
  try: () => experimentalOxlintTarget(context.platform, context.arch, context.platform === "linux" && context.isGlibc()),
210660
210788
  catch: (error) => new ProxyError({ reason: error instanceof Error ? error.message : String(error) })
210661
210789
  });
210662
210790
  const oxlintVersion = yield* supportedInstalledVersion("oxlint", installation.oxlint);
210791
+ const binding = yield* requireArtifact(yield* packagedComponentPath(context.packageDirectory, "oxlint", oxlintVersion, target.oxlintBinding));
210792
+ const tsrsIsLinter = tsrsLint === void 0 && installation.tsgolint === void 0 && installedTsrs !== void 0;
210793
+ const tsrsBinary = installedTsrs === void 0 ? void 0 : tsrsIsLinter ? yield* packagedInstalledTsrs(context, installedTsrs) : yield* packagedInstalledTsrs(context, installedTsrs).pipe(orElseSucceed(() => void 0));
210663
210794
  return {
210664
- binding: yield* requireArtifact(yield* packagedComponentPath(context.packageDirectory, "oxlint", oxlintVersion, target.oxlintBinding)),
210665
- linter: tsrsLint === void 0 ? yield* packagedTsgolint(context, installation, target) : yield* packagedTsrsLint(context, tsrsLint)
210795
+ binding,
210796
+ linter: tsrsLint !== void 0 ? yield* packagedTsrsLint(context, tsrsLint) : tsrsIsLinter ? {
210797
+ kind: "tsrs",
210798
+ executable: tsrsBinary
210799
+ } : yield* packagedTsgolint(context, installation, target),
210800
+ tsrsBinary
210666
210801
  };
210667
210802
  });
210668
210803
  const preloadPath = (bridge, platform) => {
@@ -210685,11 +210820,12 @@ const oxlintBridgeEnv = (context, artifacts) => gen(function* () {
210685
210820
  ...linterEnv(context.env, artifacts.linter),
210686
210821
  NODE_OPTIONS: prependOption(context.env.NODE_OPTIONS, `--require "${preload}"`, preload),
210687
210822
  BUN_OPTIONS: prependOption(context.env.BUN_OPTIONS, `"--preload=${preload}"`, preload),
210688
- EFFECT_TSGO_OXLINT_BINDING: artifacts.binding
210823
+ EFFECT_TSGO_OXLINT_BINDING: artifacts.binding,
210824
+ ...artifacts.tsrsBinary === void 0 ? {} : { TSRS_BINARY: artifacts.tsrsBinary }
210689
210825
  };
210690
210826
  });
210691
210827
  const oxlintCommand = (context, args, installation, tsrsLint = void 0) => gen(function* () {
210692
- const artifacts = yield* oxlintArtifacts(context, installation, tsrsLint);
210828
+ const artifacts = yield* oxlintArtifacts(context, installation, tsrsLint, yield* installedTsrsVersion(context));
210693
210829
  return {
210694
210830
  file: context.execPath,
210695
210831
  args: [yield* oxlintBinPath(installation.oxlint), ...args],
@@ -210714,7 +210850,7 @@ const resolveVitePlus = (context, invocation) => gen(function* () {
210714
210850
  if (vitePlus === void 0) return yield* new ProxyError({ reason: `Unable to resolve vite-plus from ${context.cwd}. Install vite-plus in the project.` });
210715
210851
  const installation = yield* findOxlintInstallation(context.cwd);
210716
210852
  if (installation === void 0) return yield* new ProxyError({ reason: `Unable to resolve the oxlint package of vite-plus from ${context.cwd}.` });
210717
- const artifacts = yield* oxlintArtifacts(context, installation, invocation.tsrsLint);
210853
+ const artifacts = yield* oxlintArtifacts(context, installation, invocation.tsrsLint, yield* installedTsrsVersion(context, true));
210718
210854
  return {
210719
210855
  file: context.execPath,
210720
210856
  args: [yield* packageBinPath(vitePlus, "vp"), ...invocation.args],
@@ -211034,16 +211170,6 @@ var ChmodBinaryError = class extends TaggedError$1("ChmodBinaryError") {
211034
211170
  return `Failed to set executable permissions on ${this.targetPath}.`;
211035
211171
  }
211036
211172
  };
211037
- const selectedComponents = (typescript, oxlint, tsrs) => {
211038
- const components = /* @__PURE__ */ new Set();
211039
- if (typescript) components.add("typescript");
211040
- if (oxlint) {
211041
- components.add("oxlint");
211042
- components.add("oxlint-tsgolint");
211043
- }
211044
- if (tsrs) components.add("tsrs");
211045
- return components;
211046
- };
211047
211173
  const discoverSelected = (components, preferredTypescriptPackage) => gen(function* () {
211048
211174
  return yield* requireComponents(selectComponents(yield* discoverBinaries(process.cwd(), preferredTypescriptPackage), components), components);
211049
211175
  });
@@ -31,6 +31,8 @@
31
31
  "effecttsgo/prefer-effect-string": "warn",
32
32
  "effecttsgo/process-env": "warn",
33
33
  "effecttsgo/process-env-in-effect": "warn",
34
+ "effecttsgo/promise-all-in-effect": "warn",
35
+ "effecttsgo/promise-race-in-effect": "warn",
34
36
  "effecttsgo/schema-sync": "warn"
35
37
  }
36
38
  }
@@ -102,6 +102,8 @@ export const effectNative = {
102
102
  "effecttsgo/prefer-effect-string": "warn",
103
103
  "effecttsgo/process-env": "warn",
104
104
  "effecttsgo/process-env-in-effect": "warn",
105
+ "effecttsgo/promise-all-in-effect": "warn",
106
+ "effecttsgo/promise-race-in-effect": "warn",
105
107
  "effecttsgo/schema-sync": "warn"
106
108
  }
107
109
  }
@@ -159,6 +161,8 @@ export const recommended = {
159
161
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
160
162
  "effecttsgo/flat-map-identity-to-flatten": "warn",
161
163
  "effecttsgo/flat-map-ignored-param-to-and-then": "warn",
164
+ "effecttsgo/flat-map-map-to-zip-with": "warn",
165
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
162
166
  "effecttsgo/flat-map-to-map": "warn",
163
167
  "effecttsgo/flat-map-to-tap": "warn",
164
168
  "effecttsgo/floating-effect": "error",
@@ -268,6 +272,8 @@ export const strict = {
268
272
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
269
273
  "effecttsgo/flat-map-identity-to-flatten": "error",
270
274
  "effecttsgo/flat-map-ignored-param-to-and-then": "error",
275
+ "effecttsgo/flat-map-map-to-zip-with": "error",
276
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "error",
271
277
  "effecttsgo/flat-map-to-map": "error",
272
278
  "effecttsgo/flat-map-to-tap": "error",
273
279
  "effecttsgo/floating-effect": "error",
@@ -368,8 +374,11 @@ export const style = {
368
374
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
369
375
  "effecttsgo/flat-map-identity-to-flatten": "warn",
370
376
  "effecttsgo/flat-map-ignored-param-to-and-then": "warn",
377
+ "effecttsgo/flat-map-map-to-zip-with": "warn",
378
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
371
379
  "effecttsgo/flat-map-to-map": "warn",
372
380
  "effecttsgo/flat-map-to-tap": "warn",
381
+ "effecttsgo/for-loop-push-to-for-each": "warn",
373
382
  "effecttsgo/manual-metric-tap-to-track": "warn",
374
383
  "effecttsgo/map-const-to-as": "warn",
375
384
  "effecttsgo/map-map-error-to-map-both": "warn",
@@ -39,6 +39,8 @@
39
39
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
40
40
  "effecttsgo/flat-map-identity-to-flatten": "warn",
41
41
  "effecttsgo/flat-map-ignored-param-to-and-then": "warn",
42
+ "effecttsgo/flat-map-map-to-zip-with": "warn",
43
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
42
44
  "effecttsgo/flat-map-to-map": "warn",
43
45
  "effecttsgo/flat-map-to-tap": "warn",
44
46
  "effecttsgo/floating-effect": "error",
@@ -39,6 +39,8 @@
39
39
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
40
40
  "effecttsgo/flat-map-identity-to-flatten": "error",
41
41
  "effecttsgo/flat-map-ignored-param-to-and-then": "error",
42
+ "effecttsgo/flat-map-map-to-zip-with": "error",
43
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "error",
42
44
  "effecttsgo/flat-map-to-map": "error",
43
45
  "effecttsgo/flat-map-to-tap": "error",
44
46
  "effecttsgo/floating-effect": "error",
@@ -30,8 +30,11 @@
30
30
  "effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
31
31
  "effecttsgo/flat-map-identity-to-flatten": "warn",
32
32
  "effecttsgo/flat-map-ignored-param-to-and-then": "warn",
33
+ "effecttsgo/flat-map-map-to-zip-with": "warn",
34
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
33
35
  "effecttsgo/flat-map-to-map": "warn",
34
36
  "effecttsgo/flat-map-to-tap": "warn",
37
+ "effecttsgo/for-loop-push-to-for-each": "warn",
35
38
  "effecttsgo/manual-metric-tap-to-track": "warn",
36
39
  "effecttsgo/map-const-to-as": "warn",
37
40
  "effecttsgo/map-map-error-to-map-both": "warn",
@@ -1209,6 +1209,40 @@
1209
1209
  },
1210
1210
  "type": "object"
1211
1211
  },
1212
+ "ChecksConditionals": {
1213
+ "anyOf": [
1214
+ {
1215
+ "type": "boolean"
1216
+ },
1217
+ {
1218
+ "$ref": "#/definitions/ChecksConditionalsOptions"
1219
+ }
1220
+ ]
1221
+ },
1222
+ "ChecksConditionalsFlagUnions": {
1223
+ "enum": [
1224
+ "none",
1225
+ "strict",
1226
+ "all"
1227
+ ],
1228
+ "type": "string"
1229
+ },
1230
+ "ChecksConditionalsOptions": {
1231
+ "additionalProperties": false,
1232
+ "properties": {
1233
+ "flagUnions": {
1234
+ "allOf": [
1235
+ {
1236
+ "$ref": "#/definitions/ChecksConditionalsFlagUnions"
1237
+ }
1238
+ ],
1239
+ "default": "none",
1240
+ "description": "Controls which union types are reported in conditionals.\n- `\"none\"` only reports values that are always Promise-like.\n- `\"strict\"` also reports unions where the non-Promise types match the awaited Promise types,\nsuch as `Promise\u003cnumber\u003e | number`.\n- `\"all\"` reports any union containing a Promise-like type.",
1241
+ "markdownDescription": "Controls which union types are reported in conditionals.\n- `\"none\"` only reports values that are always Promise-like.\n- `\"strict\"` also reports unions where the non-Promise types match the awaited Promise types,\nsuch as `Promise\u003cnumber\u003e | number`.\n- `\"all\"` reports any union containing a Promise-like type."
1242
+ }
1243
+ },
1244
+ "type": "object"
1245
+ },
1212
1246
  "ChecksVoidReturn": {
1213
1247
  "anyOf": [
1214
1248
  {
@@ -2391,6 +2425,12 @@
2391
2425
  "effecttsgo/flat-map-ignored-param-to-and-then": {
2392
2426
  "$ref": "#/definitions/RuleNoConfig"
2393
2427
  },
2428
+ "effecttsgo/flat-map-map-to-zip-with": {
2429
+ "$ref": "#/definitions/RuleNoConfig"
2430
+ },
2431
+ "effecttsgo/flat-map-provide-service-to-provide-service-effect": {
2432
+ "$ref": "#/definitions/RuleNoConfig"
2433
+ },
2394
2434
  "effecttsgo/flat-map-to-map": {
2395
2435
  "$ref": "#/definitions/RuleNoConfig"
2396
2436
  },
@@ -2403,6 +2443,9 @@
2403
2443
  "effecttsgo/floating-effect-in-vitest": {
2404
2444
  "$ref": "#/definitions/RuleNoConfig"
2405
2445
  },
2446
+ "effecttsgo/for-loop-push-to-for-each": {
2447
+ "$ref": "#/definitions/RuleNoConfig"
2448
+ },
2406
2449
  "effecttsgo/generic-effect-services": {
2407
2450
  "$ref": "#/definitions/RuleNoConfig"
2408
2451
  },
@@ -2595,9 +2638,15 @@
2595
2638
  "effecttsgo/process-env-in-effect": {
2596
2639
  "$ref": "#/definitions/RuleNoConfig"
2597
2640
  },
2641
+ "effecttsgo/promise-all-in-effect": {
2642
+ "$ref": "#/definitions/RuleNoConfig"
2643
+ },
2598
2644
  "effecttsgo/promise-in-effect-success": {
2599
2645
  "$ref": "#/definitions/RuleNoConfig"
2600
2646
  },
2647
+ "effecttsgo/promise-race-in-effect": {
2648
+ "$ref": "#/definitions/RuleNoConfig"
2649
+ },
2601
2650
  "effecttsgo/provide-layer-succeed-to-provide-service": {
2602
2651
  "$ref": "#/definitions/RuleNoConfig"
2603
2652
  },
@@ -15293,10 +15342,14 @@
15293
15342
  "additionalProperties": false,
15294
15343
  "properties": {
15295
15344
  "checksConditionals": {
15345
+ "allOf": [
15346
+ {
15347
+ "$ref": "#/definitions/ChecksConditionals"
15348
+ }
15349
+ ],
15296
15350
  "default": true,
15297
- "description": "Whether to check if Promises are used in conditionals.\nWhen true, disallows using Promises in conditions where a boolean is expected.",
15298
- "markdownDescription": "Whether to check if Promises are used in conditionals.\nWhen true, disallows using Promises in conditions where a boolean is expected.",
15299
- "type": "boolean"
15351
+ "description": "Whether to check if Promises are used in conditionals.\nCan be a boolean to enable/disable the check, or an object to control union types.",
15352
+ "markdownDescription": "Whether to check if Promises are used in conditionals.\nCan be a boolean to enable/disable the check, or an object to control union types."
15300
15353
  },
15301
15354
  "checksSpreads": {
15302
15355
  "default": true,
@@ -17516,8 +17569,8 @@
17516
17569
  "type": "boolean"
17517
17570
  },
17518
17571
  "typeCheck": {
17519
- "description": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
17520
- "markdownDescription": "Enable experimental type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
17572
+ "description": "Enable type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
17573
+ "markdownDescription": "Enable type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
17521
17574
  "type": "boolean"
17522
17575
  }
17523
17576
  },
@@ -17541,8 +17594,8 @@
17541
17594
  "$ref": "#/definitions/GlobSet"
17542
17595
  }
17543
17596
  ],
17544
- "description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`",
17545
- "markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`"
17597
+ "description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\nExample: `[ \"*.generated.ts\", \"fixtures/**\" ]`",
17598
+ "markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\nExample: `[ \"*.generated.ts\", \"fixtures/**\" ]`"
17546
17599
  },
17547
17600
  "files": {
17548
17601
  "allOf": [
@@ -17550,8 +17603,8 @@
17550
17603
  "$ref": "#/definitions/GlobSet"
17551
17604
  }
17552
17605
  ],
17553
- "description": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`",
17554
- "markdownDescription": "A list of glob patterns to override.\n\n## Example\n`[ \"*.test.ts\", \"*.spec.ts\" ]`"
17606
+ "description": "A list of glob patterns to override.\n\nExample: `[ \"*.test.ts\", \"*.spec.ts\" ]`",
17607
+ "markdownDescription": "A list of glob patterns to override.\n\nExample: `[ \"*.test.ts\", \"*.spec.ts\" ]`"
17555
17608
  },
17556
17609
  "globals": {
17557
17610
  "allOf": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.69.0",
3
+ "version": "0.73.2",
4
4
  "type": "module",
5
5
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
6
6
  "license": "MIT",
@@ -42,13 +42,13 @@
42
42
  "schema.json"
43
43
  ],
44
44
  "optionalDependencies": {
45
- "@effect/tsgo-win32-x64": "0.69.0",
46
- "@effect/tsgo-win32-arm64": "0.69.0",
47
- "@effect/tsgo-linux-x64": "0.69.0",
48
- "@effect/tsgo-linux-arm64": "0.69.0",
49
- "@effect/tsgo-linux-arm": "0.69.0",
50
- "@effect/tsgo-darwin-x64": "0.69.0",
51
- "@effect/tsgo-darwin-arm64": "0.69.0"
45
+ "@effect/tsgo-win32-x64": "0.73.2",
46
+ "@effect/tsgo-win32-arm64": "0.73.2",
47
+ "@effect/tsgo-linux-x64": "0.73.2",
48
+ "@effect/tsgo-linux-arm64": "0.73.2",
49
+ "@effect/tsgo-linux-arm": "0.73.2",
50
+ "@effect/tsgo-darwin-x64": "0.73.2",
51
+ "@effect/tsgo-darwin-arm64": "0.73.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@effect/platform-node": "^4.1.2",
package/schema.json CHANGED
@@ -39,6 +39,9 @@
39
39
  "$ref": "#/definitions/referencesDefinition"
40
40
  }
41
41
  ]
42
+ },
43
+ {
44
+ "$ref": "#/definitions/referencesDefinition"
42
45
  }
43
46
  ],
44
47
  "allowTrailingCommas": true,
@@ -2571,6 +2574,16 @@
2571
2574
  "default": "suggestion",
2572
2575
  "description": "Suggests using Effect.andThen instead of Effect.flatMap when a zero-parameter callback returns an existing Effect value"
2573
2576
  },
2577
+ "flatMapMapToZipWith": {
2578
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2579
+ "default": "suggestion",
2580
+ "description": "Suggests Effect.zipWith when Effect.flatMap only maps an independent effect with its parameter"
2581
+ },
2582
+ "flatMapProvideServiceToProvideServiceEffect": {
2583
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2584
+ "default": "suggestion",
2585
+ "description": "Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService"
2586
+ },
2574
2587
  "flatMapToMap": {
2575
2588
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2576
2589
  "default": "suggestion",
@@ -2591,6 +2604,11 @@
2591
2604
  "default": "error",
2592
2605
  "description": "Detects Effects returned from non-Effect-aware Vitest callbacks"
2593
2606
  },
2607
+ "forLoopPushToForEach": {
2608
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2609
+ "default": "off",
2610
+ "description": "Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator"
2611
+ },
2594
2612
  "genericEffectServices": {
2595
2613
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2596
2614
  "default": "warning",
@@ -2911,11 +2929,21 @@
2911
2929
  "default": "off",
2912
2930
  "description": "Warns when reading process.env inside Effect generators instead of using Effect Config"
2913
2931
  },
2932
+ "promiseAllInEffect": {
2933
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2934
+ "default": "off",
2935
+ "description": "Warns when Promise.all or Promise.allSettled fans out over an array inside Effect code instead of Effect.forEach or Effect.all with a concurrency option"
2936
+ },
2914
2937
  "promiseInEffectSuccess": {
2915
2938
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2916
2939
  "default": "warning",
2917
2940
  "description": "Detects Promise types in Effect success channels where they are not awaited"
2918
2941
  },
2942
+ "promiseRaceInEffect": {
2943
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2944
+ "default": "off",
2945
+ "description": "Warns when Promise.race or Promise.any races a list of promises inside Effect code, leaving the losing promises running"
2946
+ },
2919
2947
  "provideLayerSucceedToProvideService": {
2920
2948
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2921
2949
  "default": "suggestion",
@@ -3614,6 +3642,9 @@
3614
3642
  "type": "string"
3615
3643
  }
3616
3644
  },
3645
+ "required": [
3646
+ "path"
3647
+ ],
3617
3648
  "type": "object"
3618
3649
  },
3619
3650
  "markdownDescription": "Referenced projects. Requires TypeScript version 3.0 or later.\n\n---\n\nProject references are a way to structure your TypeScript programs into smaller pieces.\nUsing Project References can greatly improve build and editor interaction times, enforce logical separation between components, and organize your code in new and improved ways.\n\nYou can read more about how references works in the [Project References](https://typescriptlang.org/docs/handbook/project-references.html) section of the handbook",