@effect/tsgo 0.54.1 → 0.55.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
@@ -38,7 +38,7 @@ 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.54.1`:
41
+ The following target package versions are supported by `@effect/tsgo@0.55.0`:
42
42
 
43
43
  | Component | Supported versions |
44
44
  |---|---|
@@ -126,6 +126,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
126
126
  <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>
127
127
  <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>
128
128
  <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>
129
+ <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>
129
130
  <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>
130
131
  <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>
131
132
  <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>
@@ -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.54.1";
52740
+ var version = "0.55.0";
52741
52741
 
52742
52742
  //#endregion
52743
52743
  //#region src/metadata.json
@@ -53037,6 +53037,7 @@ var presets$1 = [
53037
53037
  "nodeBuiltinImport": "warning",
53038
53038
  "preferEffectArray": "warning",
53039
53039
  "preferEffectRecord": "warning",
53040
+ "preferEffectString": "warning",
53040
53041
  "preferSchemaOverJson": "warning",
53041
53042
  "processEnv": "warning",
53042
53043
  "processEnvInEffect": "warning",
@@ -54260,6 +54261,23 @@ var rules = [
54260
54261
  }]
54261
54262
  }
54262
54263
  },
54264
+ {
54265
+ "name": "preferEffectString",
54266
+ "group": "effectNative",
54267
+ "description": "Suggests Effect String APIs for native String method invocations, with semantic caveats",
54268
+ "defaultSeverity": "off",
54269
+ "fixable": false,
54270
+ "supportedEffect": ["v3", "v4"],
54271
+ "codes": [377150],
54272
+ "preview": {
54273
+ "sourceText": "import * as Str from \"effect/String\"\n\nconst email = \"alice@example.com\"\nexport const native = email.indexOf(\"@\")\nexport const preferred = Str.indexOf(\"@\")(email)\n",
54274
+ "diagnostics": [{
54275
+ "start": 100,
54276
+ "end": 107,
54277
+ "text": "Consider effect/String.indexOf instead of native String.indexOf. Returns Option<number>, with None replacing -1; there is no position parameter. effect(preferEffectString)"
54278
+ }]
54279
+ }
54280
+ },
54263
54281
  {
54264
54282
  "name": "preferSchemaOverJson",
54265
54283
  "group": "effectNative",
@@ -26,6 +26,7 @@
26
26
  "effecttsgo/node-builtin-import": "warn",
27
27
  "effecttsgo/prefer-effect-array": "warn",
28
28
  "effecttsgo/prefer-effect-record": "warn",
29
+ "effecttsgo/prefer-effect-string": "warn",
29
30
  "effecttsgo/prefer-schema-over-json": "warn",
30
31
  "effecttsgo/process-env": "warn",
31
32
  "effecttsgo/process-env-in-effect": "warn",
@@ -96,6 +96,7 @@ export const effectNative = {
96
96
  "effecttsgo/node-builtin-import": "warn",
97
97
  "effecttsgo/prefer-effect-array": "warn",
98
98
  "effecttsgo/prefer-effect-record": "warn",
99
+ "effecttsgo/prefer-effect-string": "warn",
99
100
  "effecttsgo/prefer-schema-over-json": "warn",
100
101
  "effecttsgo/process-env": "warn",
101
102
  "effecttsgo/process-env-in-effect": "warn",
@@ -2491,6 +2491,9 @@
2491
2491
  "effecttsgo/prefer-effect-record": {
2492
2492
  "$ref": "#/definitions/RuleNoConfig"
2493
2493
  },
2494
+ "effecttsgo/prefer-effect-string": {
2495
+ "$ref": "#/definitions/RuleNoConfig"
2496
+ },
2494
2497
  "effecttsgo/prefer-namespace-import": {
2495
2498
  "$ref": "#/definitions/RuleNoConfig"
2496
2499
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.54.1",
3
+ "version": "0.55.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-arm64": "0.54.1",
45
- "@effect/tsgo-win32-x64": "0.54.1",
46
- "@effect/tsgo-linux-x64": "0.54.1",
47
- "@effect/tsgo-linux-arm64": "0.54.1",
48
- "@effect/tsgo-linux-arm": "0.54.1",
49
- "@effect/tsgo-darwin-x64": "0.54.1",
50
- "@effect/tsgo-darwin-arm64": "0.54.1"
44
+ "@effect/tsgo-win32-x64": "0.55.0",
45
+ "@effect/tsgo-win32-arm64": "0.55.0",
46
+ "@effect/tsgo-linux-x64": "0.55.0",
47
+ "@effect/tsgo-linux-arm64": "0.55.0",
48
+ "@effect/tsgo-linux-arm": "0.55.0",
49
+ "@effect/tsgo-darwin-x64": "0.55.0",
50
+ "@effect/tsgo-darwin-arm64": "0.55.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@effect/platform-node": "^4.0.2",
package/schema.json CHANGED
@@ -2728,6 +2728,11 @@
2728
2728
  "default": "off",
2729
2729
  "description": "Suggests Effect Record APIs for native Object member references, with semantic caveats"
2730
2730
  },
2731
+ "preferEffectString": {
2732
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2733
+ "default": "off",
2734
+ "description": "Suggests Effect String APIs for native String method invocations, with semantic caveats"
2735
+ },
2731
2736
  "preferNamespaceImport": {
2732
2737
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2733
2738
  "default": "off",