@effect/tsgo 0.13.1 → 0.14.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 +1 -0
- package/dist/effect-tsgo.js +25 -4
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -108,6 +108,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
108
108
|
<tr><td><code>redundantMapError</code></td><td>💡</td><td></td><td>Suggests hoisting a repeated trailing Effect.mapError from every yield in an Effect generator</td><td>✓</td><td>✓</td></tr>
|
|
109
109
|
<tr><td><code>redundantOrDie</code></td><td>💡</td><td></td><td>Suggests hoisting a repeated trailing Effect.orDie from every yield in an Effect generator</td><td>✓</td><td>✓</td></tr>
|
|
110
110
|
<tr><td><code>redundantSchemaTagIdentifier</code></td><td>💡</td><td>🔧</td><td>Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest</td><td>✓</td><td>✓</td></tr>
|
|
111
|
+
<tr><td><code>schemaNumber</code></td><td>💡</td><td>🔧</td><td>Suggests Schema.Finite and Schema.FiniteFromString instead of Schema.Number APIs when describing domain numbers</td><td></td><td>✓</td></tr>
|
|
111
112
|
<tr><td><code>schemaStructWithTag</code></td><td>💡</td><td>🔧</td><td>Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field</td><td>✓</td><td>✓</td></tr>
|
|
112
113
|
<tr><td><code>schemaUnionOfLiterals</code></td><td>➖</td><td>🔧</td><td>Suggests combining multiple Schema.Literal calls in Schema.Union into a single Schema.Literal</td><td>✓</td><td></td></tr>
|
|
113
114
|
<tr><td><code>serviceNotAsClass</code></td><td>➖</td><td>🔧</td><td>Warns when Context.Service is used as a variable instead of a class declaration</td><td></td><td>✓</td></tr>
|
package/dist/effect-tsgo.js
CHANGED
|
@@ -199259,7 +199259,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
|
|
|
199259
199259
|
//#endregion
|
|
199260
199260
|
//#region package.json
|
|
199261
199261
|
var name = "@effect/tsgo";
|
|
199262
|
-
var version = "0.
|
|
199262
|
+
var version = "0.14.0";
|
|
199263
199263
|
|
|
199264
199264
|
//#endregion
|
|
199265
199265
|
//#region src/setup/consts.ts
|
|
@@ -200618,7 +200618,7 @@ var rules = [
|
|
|
200618
200618
|
"supportedEffect": ["v3"],
|
|
200619
200619
|
"codes": [377037],
|
|
200620
200620
|
"preview": {
|
|
200621
|
-
"sourceText": "import * as Effect from \"effect/Effect\"\nimport * as Schema from \"effect/Schema\"\n\nconst Person = Schema.Struct({ name: Schema.String, age: Schema.
|
|
200621
|
+
"sourceText": "import * as Effect from \"effect/Effect\"\nimport * as Schema from \"effect/Schema\"\n\nconst Person = Schema.Struct({ name: Schema.String, age: Schema.Finite })\n\nexport const preview = Effect.gen(function*() {\n const input = yield* Effect.succeed({ name: \"Ada\", age: 1 })\n return Schema.decodeSync(Person)(input)\n})\n",
|
|
200622
200622
|
"diagnostics": [{
|
|
200623
200623
|
"start": 276,
|
|
200624
200624
|
"end": 293,
|
|
@@ -201196,7 +201196,7 @@ var rules = [
|
|
|
201196
201196
|
"supportedEffect": ["v3", "v4"],
|
|
201197
201197
|
"codes": [377050],
|
|
201198
201198
|
"preview": {
|
|
201199
|
-
"sourceText": "import { identity, Schema } from \"effect\"\n\nconst User = Schema.Struct({ id: Schema.
|
|
201199
|
+
"sourceText": "import { identity, Schema } from \"effect\"\n\nconst User = Schema.Struct({ id: Schema.Finite })\nexport const preview = identity(identity(Schema.decodeEffect(User)({ id: 1 })))\n",
|
|
201200
201200
|
"diagnostics": [{
|
|
201201
201201
|
"start": 116,
|
|
201202
201202
|
"end": 172,
|
|
@@ -201323,6 +201323,27 @@ var rules = [
|
|
|
201323
201323
|
}]
|
|
201324
201324
|
}
|
|
201325
201325
|
},
|
|
201326
|
+
{
|
|
201327
|
+
"name": "schemaNumber",
|
|
201328
|
+
"group": "style",
|
|
201329
|
+
"description": "Suggests Schema.Finite and Schema.FiniteFromString instead of Schema.Number APIs when describing domain numbers",
|
|
201330
|
+
"defaultSeverity": "suggestion",
|
|
201331
|
+
"fixable": true,
|
|
201332
|
+
"supportedEffect": ["v4"],
|
|
201333
|
+
"codes": [377098],
|
|
201334
|
+
"preview": {
|
|
201335
|
+
"sourceText": "\nimport { Schema } from \"effect\"\n\nexport const User = Schema.Struct({\n age: Schema.Number,\n score: Schema.NumberFromString\n})\n",
|
|
201336
|
+
"diagnostics": [{
|
|
201337
|
+
"start": 84,
|
|
201338
|
+
"end": 90,
|
|
201339
|
+
"text": "This Schema number API accepts `NaN`, `Infinity`, and `-Infinity`. Use `Schema.Finite` for finite domain numbers. If non-finite values are intentional, disable this diagnostic for that line. effect(schemaNumber)"
|
|
201340
|
+
}, {
|
|
201341
|
+
"start": 108,
|
|
201342
|
+
"end": 124,
|
|
201343
|
+
"text": "This Schema number API accepts `NaN`, `Infinity`, and `-Infinity`. Use `Schema.FiniteFromString` for finite domain numbers. If non-finite values are intentional, disable this diagnostic for that line. effect(schemaNumber)"
|
|
201344
|
+
}]
|
|
201345
|
+
}
|
|
201346
|
+
},
|
|
201326
201347
|
{
|
|
201327
201348
|
"name": "schemaStructWithTag",
|
|
201328
201349
|
"group": "style",
|
|
@@ -201489,7 +201510,7 @@ var rules = [
|
|
|
201489
201510
|
"supportedEffect": ["v3", "v4"],
|
|
201490
201511
|
"codes": [377090],
|
|
201491
201512
|
"preview": {
|
|
201492
|
-
"sourceText": "import { Schema } from \"effect\"\n\nexport namespace UsersRepo {\n export const User = Schema.Struct({ id: Schema.
|
|
201513
|
+
"sourceText": "import { Schema } from \"effect\"\n\nexport namespace UsersRepo {\n export const User = Schema.Struct({ id: Schema.Finite })\n export type User = typeof User.Type\n}\n\nexport const preview: typeof UsersRepo.User.Type = { id: 1 }\n",
|
|
201493
201514
|
"diagnostics": [{
|
|
201494
201515
|
"start": 184,
|
|
201495
201516
|
"end": 210,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@effect/tsgo-win32-x64": "0.
|
|
26
|
-
"@effect/tsgo-win32-arm64": "0.
|
|
27
|
-
"@effect/tsgo-linux-x64": "0.
|
|
28
|
-
"@effect/tsgo-linux-arm64": "0.
|
|
29
|
-
"@effect/tsgo-linux-arm": "0.
|
|
30
|
-
"@effect/tsgo-darwin-x64": "0.
|
|
31
|
-
"@effect/tsgo-darwin-arm64": "0.
|
|
25
|
+
"@effect/tsgo-win32-x64": "0.14.0",
|
|
26
|
+
"@effect/tsgo-win32-arm64": "0.14.0",
|
|
27
|
+
"@effect/tsgo-linux-x64": "0.14.0",
|
|
28
|
+
"@effect/tsgo-linux-arm64": "0.14.0",
|
|
29
|
+
"@effect/tsgo-linux-arm": "0.14.0",
|
|
30
|
+
"@effect/tsgo-darwin-x64": "0.14.0",
|
|
31
|
+
"@effect/tsgo-darwin-arm64": "0.14.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@effect/platform-node": "^4.0.0-beta.66",
|