@effect/tsgo 0.74.3 → 0.75.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 +7 -6
- package/dist/effect-tsgo.cjs +34 -16
- package/oxlint-presets/effect-native.json +1 -0
- package/oxlint-presets/index.js +1 -0
- package/oxlint-schema.json +3 -0
- package/package.json +8 -8
- package/schema.json +8 -3
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@ 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.
|
|
8
|
+
The following target package versions are supported by `@effect/tsgo@0.75.0`:
|
|
9
9
|
|
|
10
10
|
| Component | Supported versions |
|
|
11
11
|
|---|---|
|
|
12
|
-
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.
|
|
13
|
-
| tsrs | `7.1.0-beta.tsrs2`, `7.1.0-beta.tsrs4`, `7.1.0-beta.tsrs7` |
|
|
14
|
-
| Oxlint | `1.
|
|
15
|
-
| oxlint-tsgolint | `7.0.
|
|
12
|
+
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261202.1` |
|
|
13
|
+
| tsrs | `7.1.0-beta.tsrs2`, `7.1.0-beta.tsrs4`, `7.1.0-beta.tsrs7`, `7.1.0-beta.tsrs9` |
|
|
14
|
+
| Oxlint | `1.94.0`, `1.95.0`, `1.96.0` |
|
|
15
|
+
| oxlint-tsgolint | `7.0.2009` |
|
|
16
16
|
<!-- supported-components:end -->
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
@@ -155,6 +155,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
155
155
|
<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>
|
|
156
156
|
<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>
|
|
157
157
|
<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>
|
|
158
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-number.md"><code>preferEffectNumber</code></a></td><td>Suggests effect/Number APIs for hand-written numeric code: clamp, round, sums and products, steps, comparators, range checks and safe division</td></tr>
|
|
158
159
|
<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>
|
|
159
160
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-effect-string.md"><code>preferEffectString</code></a></td><td>Suggests Effect String APIs for native String method invocations, with semantic caveats</td></tr>
|
|
160
161
|
<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>
|
|
@@ -375,7 +376,7 @@ The npm compiler binaries load their TypeScript standard libraries from `lib.*.d
|
|
|
375
376
|
],
|
|
376
377
|
// Enables matching constructors with @effect-identifier annotations. (default: false)
|
|
377
378
|
"extendedKeyDetection": false,
|
|
378
|
-
// Minimum number of contiguous
|
|
379
|
+
// Minimum number of contiguous nested calls (unary, curried, data-first or data-last) to trigger missedPipeableOpportunity. (default: 2)
|
|
379
380
|
"pipeableMinArgCount": 2,
|
|
380
381
|
// Unstable APIs allowed by package/module subtree or package/module#export name. (default: [])
|
|
381
382
|
"allowedUnstableApis": [],
|
package/dist/effect-tsgo.cjs
CHANGED
|
@@ -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.
|
|
57914
|
+
var version = "0.75.0";
|
|
57915
57915
|
|
|
57916
57916
|
//#endregion
|
|
57917
57917
|
//#region src/metadata.json
|
|
@@ -58239,6 +58239,7 @@ var presets$1 = [
|
|
|
58239
58239
|
"newPromise": "warning",
|
|
58240
58240
|
"nodeBuiltinImport": "warning",
|
|
58241
58241
|
"preferEffectArray": "warning",
|
|
58242
|
+
"preferEffectNumber": "warning",
|
|
58242
58243
|
"preferEffectRecord": "warning",
|
|
58243
58244
|
"preferEffectString": "warning",
|
|
58244
58245
|
"processEnv": "warning",
|
|
@@ -59520,6 +59521,23 @@ var rules = [
|
|
|
59520
59521
|
}]
|
|
59521
59522
|
}
|
|
59522
59523
|
},
|
|
59524
|
+
{
|
|
59525
|
+
"name": "preferEffectNumber",
|
|
59526
|
+
"group": "effectNative",
|
|
59527
|
+
"description": "Suggests effect/Number APIs for hand-written numeric code: clamp, round, sums and products, steps, comparators, range checks and safe division",
|
|
59528
|
+
"defaultSeverity": "off",
|
|
59529
|
+
"fixable": true,
|
|
59530
|
+
"supportedEffect": ["v3", "v4"],
|
|
59531
|
+
"codes": [377230],
|
|
59532
|
+
"preview": {
|
|
59533
|
+
"sourceText": "import * as Num from \"effect/Number\"\n\ndeclare const percent: number\nexport const native = Math.min(100, Math.max(0, percent))\nexport const preferred = Num.clamp(percent, { minimum: 0, maximum: 100 })\n",
|
|
59534
|
+
"diagnostics": [{
|
|
59535
|
+
"start": 90,
|
|
59536
|
+
"end": 125,
|
|
59537
|
+
"text": "Consider effect/Number.clamp instead of nested min and max calls. It takes the value and a { minimum, maximum } range; a NaN value is clamped to the minimum, while nested Math.min and Math.max return NaN. effect(preferEffectNumber)"
|
|
59538
|
+
}]
|
|
59539
|
+
}
|
|
59540
|
+
},
|
|
59523
59541
|
{
|
|
59524
59542
|
"name": "preferEffectRecord",
|
|
59525
59543
|
"group": "effectNative",
|
|
@@ -61041,11 +61059,11 @@ var tags = {
|
|
|
61041
61059
|
"typescript": {
|
|
61042
61060
|
"latest": "7.0.2",
|
|
61043
61061
|
"beta": "7.1.0-beta",
|
|
61044
|
-
"next": "7.1.0-dev.
|
|
61062
|
+
"next": "7.1.0-dev.20261202.1"
|
|
61045
61063
|
},
|
|
61046
61064
|
"oxlint": { "latest": "1.96.0" },
|
|
61047
61065
|
"oxlint-tsgolint": { "latest": "7.0.2009" },
|
|
61048
|
-
"tsrs": { "latest": "7.1.0-beta.
|
|
61066
|
+
"tsrs": { "latest": "7.1.0-beta.tsrs9" }
|
|
61049
61067
|
};
|
|
61050
61068
|
var components = {
|
|
61051
61069
|
"typescript": {
|
|
@@ -61057,23 +61075,16 @@ var components = {
|
|
|
61057
61075
|
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a",
|
|
61058
61076
|
"provider": "typescript"
|
|
61059
61077
|
},
|
|
61060
|
-
"7.1.0-dev.
|
|
61061
|
-
"gitHead": "
|
|
61078
|
+
"7.1.0-dev.20261202.1": {
|
|
61079
|
+
"gitHead": "23091b541b898c22c9695f72b417bdb631261c37",
|
|
61062
61080
|
"provider": "typescript"
|
|
61063
61081
|
}
|
|
61064
61082
|
},
|
|
61065
|
-
"oxlint-tsgolint": {
|
|
61066
|
-
"
|
|
61067
|
-
|
|
61068
|
-
|
|
61069
|
-
},
|
|
61070
|
-
"7.0.2009": {
|
|
61071
|
-
"gitHead": "dd617d51d187882176a4e8cc7b9efdcd2a0d9e5e",
|
|
61072
|
-
"dependencies": { "typescript": "7.0.2" }
|
|
61073
|
-
}
|
|
61074
|
-
},
|
|
61083
|
+
"oxlint-tsgolint": { "7.0.2009": {
|
|
61084
|
+
"gitHead": "dd617d51d187882176a4e8cc7b9efdcd2a0d9e5e",
|
|
61085
|
+
"dependencies": { "typescript": "7.0.2" }
|
|
61086
|
+
} },
|
|
61075
61087
|
"oxlint": {
|
|
61076
|
-
"1.93.0": { "gitHead": "7d8e1f4953a694e9705117f674933925142ed457" },
|
|
61077
61088
|
"1.94.0": { "gitHead": "229b69bf10a9c876f84287123fdf9d5e0747c96b" },
|
|
61078
61089
|
"1.95.0": { "gitHead": "846e62abbbf7c646844a4b8729210dbe2317f5c7" },
|
|
61079
61090
|
"1.96.0": { "gitHead": "0601085d91bc88dc2427cac98de5947d074a9ca7" }
|
|
@@ -61099,6 +61110,13 @@ var components = {
|
|
|
61099
61110
|
"version": "7.1.0-beta",
|
|
61100
61111
|
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
|
|
61101
61112
|
}
|
|
61113
|
+
},
|
|
61114
|
+
"7.1.0-beta.tsrs9": {
|
|
61115
|
+
"gitHead": "982472047384ee68363d543cdfdb4a3b9c407f95",
|
|
61116
|
+
"typescript": {
|
|
61117
|
+
"version": "7.1.0-beta",
|
|
61118
|
+
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
|
|
61119
|
+
}
|
|
61102
61120
|
}
|
|
61103
61121
|
}
|
|
61104
61122
|
};
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"effecttsgo/new-promise": "warn",
|
|
28
28
|
"effecttsgo/node-builtin-import": "warn",
|
|
29
29
|
"effecttsgo/prefer-effect-array": "warn",
|
|
30
|
+
"effecttsgo/prefer-effect-number": "warn",
|
|
30
31
|
"effecttsgo/prefer-effect-record": "warn",
|
|
31
32
|
"effecttsgo/prefer-effect-string": "warn",
|
|
32
33
|
"effecttsgo/process-env": "warn",
|
package/oxlint-presets/index.js
CHANGED
|
@@ -98,6 +98,7 @@ export const effectNative = {
|
|
|
98
98
|
"effecttsgo/new-promise": "warn",
|
|
99
99
|
"effecttsgo/node-builtin-import": "warn",
|
|
100
100
|
"effecttsgo/prefer-effect-array": "warn",
|
|
101
|
+
"effecttsgo/prefer-effect-number": "warn",
|
|
101
102
|
"effecttsgo/prefer-effect-record": "warn",
|
|
102
103
|
"effecttsgo/prefer-effect-string": "warn",
|
|
103
104
|
"effecttsgo/process-env": "warn",
|
package/oxlint-schema.json
CHANGED
|
@@ -2605,6 +2605,9 @@
|
|
|
2605
2605
|
"effecttsgo/prefer-effect-array": {
|
|
2606
2606
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2607
2607
|
},
|
|
2608
|
+
"effecttsgo/prefer-effect-number": {
|
|
2609
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2610
|
+
},
|
|
2608
2611
|
"effecttsgo/prefer-effect-record": {
|
|
2609
2612
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2610
2613
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
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.
|
|
46
|
-
"@effect/tsgo-win32-arm64": "0.
|
|
47
|
-
"@effect/tsgo-linux-x64": "0.
|
|
48
|
-
"@effect/tsgo-linux-arm64": "0.
|
|
49
|
-
"@effect/tsgo-linux-arm": "0.
|
|
50
|
-
"@effect/tsgo-darwin-x64": "0.
|
|
51
|
-
"@effect/tsgo-darwin-arm64": "0.
|
|
45
|
+
"@effect/tsgo-win32-x64": "0.75.0",
|
|
46
|
+
"@effect/tsgo-win32-arm64": "0.75.0",
|
|
47
|
+
"@effect/tsgo-linux-x64": "0.75.0",
|
|
48
|
+
"@effect/tsgo-linux-arm64": "0.75.0",
|
|
49
|
+
"@effect/tsgo-linux-arm": "0.75.0",
|
|
50
|
+
"@effect/tsgo-darwin-x64": "0.75.0",
|
|
51
|
+
"@effect/tsgo-darwin-arm64": "0.75.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@effect/platform-node": "^4.1.2",
|
package/schema.json
CHANGED
|
@@ -1725,7 +1725,7 @@
|
|
|
1725
1725
|
},
|
|
1726
1726
|
"pipeableMinArgCount": {
|
|
1727
1727
|
"default": 2,
|
|
1728
|
-
"description": "Minimum number of contiguous
|
|
1728
|
+
"description": "Minimum number of contiguous nested calls (unary, curried, data-first or data-last) to trigger missedPipeableOpportunity.",
|
|
1729
1729
|
"minimum": 1,
|
|
1730
1730
|
"type": "integer"
|
|
1731
1731
|
},
|
|
@@ -2874,6 +2874,11 @@
|
|
|
2874
2874
|
"default": "off",
|
|
2875
2875
|
"description": "Suggests Effect Array APIs for native array member references, with semantic caveats"
|
|
2876
2876
|
},
|
|
2877
|
+
"preferEffectNumber": {
|
|
2878
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2879
|
+
"default": "off",
|
|
2880
|
+
"description": "Suggests effect/Number APIs for hand-written numeric code: clamp, round, sums and products, steps, comparators, range checks and safe division"
|
|
2881
|
+
},
|
|
2877
2882
|
"preferEffectRecord": {
|
|
2878
2883
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2879
2884
|
"default": "off",
|
|
@@ -3369,7 +3374,7 @@
|
|
|
3369
3374
|
},
|
|
3370
3375
|
"pipeableMinArgCount": {
|
|
3371
3376
|
"default": 2,
|
|
3372
|
-
"description": "Minimum number of contiguous
|
|
3377
|
+
"description": "Minimum number of contiguous nested calls (unary, curried, data-first or data-last) to trigger missedPipeableOpportunity.",
|
|
3373
3378
|
"minimum": 1,
|
|
3374
3379
|
"type": "integer"
|
|
3375
3380
|
},
|
|
@@ -3520,7 +3525,7 @@
|
|
|
3520
3525
|
"type": "array"
|
|
3521
3526
|
},
|
|
3522
3527
|
"pipeableMinArgCount": {
|
|
3523
|
-
"description": "Minimum number of contiguous
|
|
3528
|
+
"description": "Minimum number of contiguous nested calls (unary, curried, data-first or data-last) to trigger missedPipeableOpportunity.",
|
|
3524
3529
|
"minimum": 1,
|
|
3525
3530
|
"type": "integer"
|
|
3526
3531
|
},
|