@effect/tsgo 0.51.1 → 0.52.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 +11 -7
- package/dist/effect-tsgo.cjs +1950 -711
- package/lib/getExePath.js +5 -2
- package/oxlint-presets/correctness.json +1 -0
- package/oxlint-presets/effect-native.json +2 -0
- package/oxlint-presets/index.js +12 -0
- package/oxlint-presets/recommended.json +3 -0
- package/oxlint-presets/strict.json +3 -0
- package/oxlint-presets/style.json +3 -0
- package/oxlint-schema.json +18 -0
- package/package.json +11 -11
- package/schema.json +31 -11
package/README.md
CHANGED
|
@@ -38,13 +38,13 @@ When running in dedicated diagnostics mode, the Effect diagnostics can be emitte
|
|
|
38
38
|
<!-- supported-components:start -->
|
|
39
39
|
## Supported Package Versions
|
|
40
40
|
|
|
41
|
-
The following target package versions are supported by `@effect/tsgo@0.
|
|
41
|
+
The following target package versions are supported by `@effect/tsgo@0.52.0`:
|
|
42
42
|
|
|
43
43
|
| Component | Supported versions |
|
|
44
44
|
|---|---|
|
|
45
|
-
| TypeScript | `7.0.2`, `7.1.0-dev.
|
|
45
|
+
| TypeScript | `7.0.2`, `7.1.0-dev.20261012.1` |
|
|
46
46
|
| Oxlint | `1.83.0`, `1.85.0`, `1.86.0`, `1.87.0` |
|
|
47
|
-
| oxlint-tsgolint | `7.0.2001`, `7.0.2003` |
|
|
47
|
+
| oxlint-tsgolint | `7.0.2001`, `7.0.2003`, `7.0.2004` |
|
|
48
48
|
<!-- supported-components:end -->
|
|
49
49
|
|
|
50
50
|
## Diagnostic Status
|
|
@@ -77,6 +77,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
77
77
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/outdated-api.md"><code>outdatedApi</code></a></td><td>Detects usage of APIs that have been removed or renamed in Effect v4</td></tr>
|
|
78
78
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/overridden-schema-constructor.md"><code>overriddenSchemaConstructor</code></a></td><td>Prevents overriding constructors in Schema classes which breaks decoding behavior</td></tr>
|
|
79
79
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/promise-in-effect-success.md"><code>promiseInEffectSuccess</code></a></td><td>Detects Promise types in Effect success channels where they are not awaited</td></tr>
|
|
80
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-class-missing-brand.md"><code>schemaClassMissingBrand</code></a></td><td>Warns when Schema classes, errors, or Opaque classes omit the brand type argument</td></tr>
|
|
80
81
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-literal-non-finite.md"><code>schemaLiteralNonFinite</code></a></td><td>Reports statically known non-finite numbers passed to Schema literal constructors</td></tr>
|
|
81
82
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-opaque-instance-member.md"><code>schemaOpaqueInstanceMember</code></a></td><td>Disallows instance members in classes extending Schema.Opaque</td></tr>
|
|
82
83
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unsafe-effect-type-assertion.md"><code>unsafeEffectTypeAssertion</code></a></td><td>Detects unsafe type assertions that narrow Effect, Stream, or Layer error or requirements channels</td></tr>
|
|
@@ -121,6 +122,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
121
122
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/instance-of-schema.md"><code>instanceOfSchema</code></a></td><td>Suggests using Schema.is instead of instanceof for Effect Schema types</td></tr>
|
|
122
123
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/new-promise.md"><code>newPromise</code></a></td><td>Warns when constructing promises with new Promise instead of using Effect APIs</td></tr>
|
|
123
124
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/node-builtin-import.md"><code>nodeBuiltinImport</code></a></td><td>Warns when importing Node.js built-in modules that have Effect-native counterparts</td></tr>
|
|
125
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-array.md"><code>preferEffectArray</code></a></td><td>Suggests Effect Array APIs for native array member references, with semantic caveats</td></tr>
|
|
126
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-record.md"><code>preferEffectRecord</code></a></td><td>Suggests Effect Record APIs for native Object member references, with semantic caveats</td></tr>
|
|
124
127
|
<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>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td></tr>
|
|
125
128
|
<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>
|
|
126
129
|
<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>
|
|
@@ -133,7 +136,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
133
136
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-chain-to-first-success-of.md"><code>catchChainToFirstSuccessOf</code></a></td><td>Suggests Effect.firstSuccessOf for consecutive error-independent Effect.catch fallbacks when the error type is preserved</td></tr>
|
|
134
137
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-conditional-refail-to-catch-if.md"><code>catchConditionalRefailToCatchIf</code></a></td><td>Suggests Effect.catchIf, Effect.catchCauseIf, or Effect.catchTag for conditional catch handlers that re-fail their untouched input</td></tr>
|
|
135
138
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-die-to-or-die.md"><code>catchDieToOrDie</code></a></td><td>Suggests using Effect.orDie instead of Effect.catch or Effect.catchAll with an identity-forwarding Effect.die handler</td></tr>
|
|
136
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-if-tag-to-catch-tag.md"><code>catchIfTagToCatchTag</code></a></td><td>Suggests Effect.catchTag instead of Effect.catchIf with a
|
|
139
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-if-tag-to-catch-tag.md"><code>catchIfTagToCatchTag</code></a></td><td>Suggests Effect.catchTag instead of Effect.catchIf with a _tag equality or Predicate.isTagged predicate</td></tr>
|
|
137
140
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-refail-to-tap-error.md"><code>catchRefailToTapError</code></a></td><td>Suggests Effect.tapError for catch handlers that sequence an effect and then re-fail the original error</td></tr>
|
|
138
141
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-tag-to-catch-reason.md"><code>catchTagToCatchReason</code></a></td><td>Suggests Effect.catchReason or Effect.catchReasons for handlers that re-fail unmatched reason._tag branches</td></tr>
|
|
139
142
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-to-ignore.md"><code>catchToIgnore</code></a></td><td>Suggests using Effect.ignore or Effect.ignoreCause instead of Effect.catch/catchCause returning Effect.void</td></tr>
|
|
@@ -143,10 +146,12 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
143
146
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-fn-opportunity.md"><code>effectFnOpportunity</code></a></td><td>Suggests using Effect.fn for functions that return an Effect</td></tr>
|
|
144
147
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-map-flatten.md"><code>effectMapFlatten</code></a></td><td>Suggests using Effect.flatMap instead of Effect.map followed by Effect.flatten in piping flows</td></tr>
|
|
145
148
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-map-void.md"><code>effectMapVoid</code></a></td><td>Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})</td></tr>
|
|
149
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-sleep-zero-to-yield-now.md"><code>effectSleepZeroToYieldNow</code></a></td><td>Suggests Effect.yieldNow for cooperative yielding instead of sleeping for zero duration</td></tr>
|
|
146
150
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-succeed-with-void.md"><code>effectSucceedWithVoid</code></a></td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td></tr>
|
|
147
151
|
<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>
|
|
148
152
|
<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>
|
|
149
153
|
<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>
|
|
154
|
+
<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>
|
|
150
155
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-some-to-as-some.md"><code>mapSomeToAsSome</code></a></td><td>Suggests using Effect.asSome instead of Effect.map when the mapper only wraps the success value with Option.some</td></tr>
|
|
151
156
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-map-both.md"><code>matchEffectToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.matchEffect only transforms the failure and success channels</td></tr>
|
|
152
157
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-match.md"><code>matchEffectToMatch</code></a></td><td>Suggests Effect.match or Effect.matchCause when both Effect.matchEffect handlers only return Effect.succeed</td></tr>
|
|
@@ -157,6 +162,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
157
162
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/nested-effect-gen-yield.md"><code>nestedEffectGenYield</code></a></td><td>Warns when yielding a nested bare Effect.gen inside an existing Effect generator context</td></tr>
|
|
158
163
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/new-schema-class.md"><code>newSchemaClass</code></a></td><td>Suggests using Schema make instead of new for Schema classes</td></tr>
|
|
159
164
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/option-match-to-from-option.md"><code>optionMatchToFromOption</code></a></td><td>Suggests Effect.fromOption when Option.match or an Option tag conditional only converts Some to Effect.succeed and None to Effect.fail</td></tr>
|
|
165
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-tagged-error.md"><code>preferSchemaTaggedError</code></a></td><td>Suggests using Schema.TaggedError instead of Data.TaggedError</td></tr>
|
|
160
166
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-type-property.md"><code>preferSchemaTypeProperty</code></a></td><td>Disallows Schema.Schema.Type<typeof X> in favor of typeof X.Type</td></tr>
|
|
161
167
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-succeed-some-or-none.md"><code>preferSucceedSomeOrNone</code></a></td><td>Suggests using Effect.succeedNone or Effect.succeedSome instead of wrapping Option.none or Option.some with Effect.succeed</td></tr>
|
|
162
168
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-typed-schema-decoder.md"><code>preferTypedSchemaDecoder</code></a></td><td>Suggests typed Schema decoders when the input is assignable to the schema's Encoded type</td></tr>
|
|
@@ -239,7 +245,7 @@ Effect-tsgo is a **superset** of the official [TypeScript-Go](https://github.com
|
|
|
239
245
|
|
|
240
246
|
Each release of `effect-tsgo` is built against the versioned components recorded in `_packages/tsgo/upstream.json`. The Nix flake consumes the TypeScript `next` tag directly. When upstream `tsgo` releases new features or fixes, `effect-tsgo` will adopt them in a subsequent release after validating compatibility with the Effect diagnostics layer.
|
|
241
247
|
|
|
242
|
-
The npm compiler binaries load their TypeScript standard libraries from `lib.*.d.ts` files beside the executable.
|
|
248
|
+
The npm compiler binaries load their TypeScript standard libraries from `lib.*.d.ts` files beside the executable. Each platform package ships the compiler for the latest TypeScript version as `lib/tsc` and other versions under `artifacts/typescript/<version>/`, each with its library files. If you relocate the executable returned by `effect-tsgo get-exe-path`, copy its library files into the same destination directory.
|
|
243
249
|
|
|
244
250
|
### When to Upgrade
|
|
245
251
|
|
|
@@ -265,8 +271,6 @@ The npm compiler binaries load their TypeScript standard libraries from `lib.*.d
|
|
|
265
271
|
"quickinfo": true,
|
|
266
272
|
// Controls Effect completions. (default: true)
|
|
267
273
|
"completions": true,
|
|
268
|
-
// Enables additional debug-only Effect language service output. (default: false)
|
|
269
|
-
"debug": false,
|
|
270
274
|
// Controls Effect goto references support. (default: true)
|
|
271
275
|
"goto": true,
|
|
272
276
|
// Controls Effect rename helpers. (default: true)
|