@effect/tsgo 0.62.0 → 0.64.1

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/schema.json CHANGED
@@ -1564,6 +1564,28 @@
1564
1564
  },
1565
1565
  "type": "array"
1566
1566
  },
1567
+ "brandedSchemaClasses": {
1568
+ "default": [
1569
+ "Class",
1570
+ "TaggedClass",
1571
+ "Error",
1572
+ "TaggedError",
1573
+ "Opaque"
1574
+ ],
1575
+ "description": "Schema class kinds that get a nominal brand, used by schemaClassMissingBrand and the Schema class completions.",
1576
+ "items": {
1577
+ "enum": [
1578
+ "Class",
1579
+ "TaggedClass",
1580
+ "Error",
1581
+ "TaggedError",
1582
+ "Opaque"
1583
+ ],
1584
+ "type": "string"
1585
+ },
1586
+ "type": "array",
1587
+ "uniqueItems": true
1588
+ },
1567
1589
  "completions": {
1568
1590
  "default": true,
1569
1591
  "description": "Controls Effect completions.",
@@ -2432,12 +2454,12 @@
2432
2454
  "cryptoRandomUUID": {
2433
2455
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2434
2456
  "default": "off",
2435
- "description": "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Crypto module"
2457
+ "description": "Warns when using crypto.randomUUID() outside Effect generators instead of SecureRandom from effect/crypto"
2436
2458
  },
2437
2459
  "cryptoRandomUUIDInEffect": {
2438
2460
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2439
2461
  "default": "off",
2440
- "description": "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Crypto module"
2462
+ "description": "Warns when using crypto.randomUUID() inside Effect generators instead of SecureRandom from effect/crypto"
2441
2463
  },
2442
2464
  "deterministicKeys": {
2443
2465
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
@@ -2499,11 +2521,21 @@
2499
2521
  "default": "suggestion",
2500
2522
  "description": "Suggests Effect.yieldNow for cooperative yielding instead of sleeping for zero duration"
2501
2523
  },
2524
+ "effectSucceedWithUndefined": {
2525
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2526
+ "default": "suggestion",
2527
+ "description": "Suggests using Effect.undefined instead of Effect.succeed(undefined) or Effect.succeed(void 0)"
2528
+ },
2502
2529
  "effectSucceedWithVoid": {
2503
2530
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2504
2531
  "default": "suggestion",
2505
2532
  "description": "Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)"
2506
2533
  },
2534
+ "effectTryWithoutCatch": {
2535
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2536
+ "default": "off",
2537
+ "description": "Reports Effect.try and Effect.tryPromise calls without a catch handler, whose failures surface as a generic unknown error"
2538
+ },
2507
2539
  "errorPayloadShadowsName": {
2508
2540
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2509
2541
  "default": "suggestion",
@@ -2519,6 +2551,11 @@
2519
2551
  "default": "off",
2520
2552
  "description": "Warns when a class directly extends the native Error class"
2521
2553
  },
2554
+ "failCauseToConstructor": {
2555
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2556
+ "default": "suggestion",
2557
+ "description": "Suggests Effect.fail/die/failSync/dieSync instead of failCause/failCauseSync wrapping a single Cause.fail/die"
2558
+ },
2522
2559
  "flatMapConditionalToFilterOrFail": {
2523
2560
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2524
2561
  "default": "suggestion",
@@ -2599,6 +2636,16 @@
2599
2636
  "default": "off",
2600
2637
  "description": "Warns when using the global fetch function inside Effect generators instead of the Effect HTTP client"
2601
2638
  },
2639
+ "globalJson": {
2640
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2641
+ "default": "off",
2642
+ "description": "Warns when using JSON.parse or JSON.stringify outside Effect generators instead of Effect Schema"
2643
+ },
2644
+ "globalJsonInEffect": {
2645
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2646
+ "default": "off",
2647
+ "description": "Warns when using JSON.parse or JSON.stringify inside Effect generators instead of Effect Schema"
2648
+ },
2602
2649
  "globalRandom": {
2603
2650
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2604
2651
  "default": "off",
@@ -2644,16 +2691,36 @@
2644
2691
  "default": "suggestion",
2645
2692
  "description": "Detects implementation services leaked in service methods"
2646
2693
  },
2694
+ "manualMetricTapToTrack": {
2695
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2696
+ "default": "suggestion",
2697
+ "description": "Suggests Effect.trackSuccesses/trackErrors/trackDefects when an Effect.tap/tapError/tapDefect only updates a metric"
2698
+ },
2647
2699
  "mapConstToAs": {
2648
2700
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2649
2701
  "default": "suggestion",
2650
2702
  "description": "Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant"
2651
2703
  },
2704
+ "mapMapErrorToMapBoth": {
2705
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2706
+ "default": "off",
2707
+ "description": "Suggests Effect.mapBoth when Effect.map and Effect.mapError are adjacent steps of a piping flow"
2708
+ },
2709
+ "mapSomeCatchNoSuchElement": {
2710
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2711
+ "default": "suggestion",
2712
+ "description": "Suggests Effect.catchNoSuchElement instead of wrapping successes in Option.some and catching NoSuchElementError into Option.none"
2713
+ },
2652
2714
  "mapSomeToAsSome": {
2653
2715
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2654
2716
  "default": "suggestion",
2655
2717
  "description": "Suggests using Effect.asSome instead of Effect.map when the mapper only wraps the success value with Option.some"
2656
2718
  },
2719
+ "matchBooleanToIsSuccess": {
2720
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2721
+ "default": "suggestion",
2722
+ "description": "Suggests Effect.isSuccess or Effect.isFailure when Effect.match or Effect.matchEager folds to complementary boolean literals"
2723
+ },
2657
2724
  "matchEffectToMapBoth": {
2658
2725
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2659
2726
  "default": "suggestion",
@@ -2792,7 +2859,7 @@
2792
2859
  "preferSchemaOverJson": {
2793
2860
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2794
2861
  "default": "off",
2795
- "description": "Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify"
2862
+ "description": "Deprecated: use globalJsonInEffect and globalJson instead. Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify inside Effect code"
2796
2863
  },
2797
2864
  "preferSchemaTaggedError": {
2798
2865
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
@@ -2839,6 +2906,11 @@
2839
2906
  "default": "suggestion",
2840
2907
  "description": "Suggests providing inline Layer.succeed and Layer.effect services directly"
2841
2908
  },
2909
+ "provideMergeAllToArray": {
2910
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2911
+ "default": "off",
2912
+ "description": "Suggests passing an array of layers to Effect.provide instead of wrapping them in Layer.mergeAll"
2913
+ },
2842
2914
  "raceFirstWithSleepToTimeout": {
2843
2915
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2844
2916
  "default": "suggestion",
@@ -2859,6 +2931,11 @@
2859
2931
  "default": "suggestion",
2860
2932
  "description": "Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest"
2861
2933
  },
2934
+ "resultMatchToFromResult": {
2935
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2936
+ "default": "suggestion",
2937
+ "description": "Suggests Effect.fromResult when Result.match or a Result guard conditional only converts Success to Effect.succeed and Failure to Effect.fail"
2938
+ },
2862
2939
  "returnEffectInGen": {
2863
2940
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2864
2941
  "default": "suggestion",
@@ -2939,6 +3016,11 @@
2939
3016
  "default": "off",
2940
3017
  "description": "Warns when using Effect.provide with layers outside of application entry points"
2941
3018
  },
3019
+ "suspendFailToFailSync": {
3020
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
3021
+ "default": "suggestion",
3022
+ "description": "Suggests Effect.failSync/dieSync instead of Effect.suspend wrapping a single Effect.fail/die"
3023
+ },
2942
3024
  "syncToSucceed": {
2943
3025
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2944
3026
  "default": "suggestion",
@@ -2954,6 +3036,11 @@
2954
3036
  "default": "suggestion",
2955
3037
  "description": "Discourages try/catch in Effect generators in favor of Effect error handling"
2956
3038
  },
3039
+ "typeUnionToSchemaUnion": {
3040
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
3041
+ "default": "off",
3042
+ "description": "Suggests composing unions of Schema .Type/.Encoded types with Schema.Union and deriving the type from it"
3043
+ },
2957
3044
  "unknownInEffectCatch": {
2958
3045
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2959
3046
  "default": "warning",
@@ -2998,6 +3085,11 @@
2998
3085
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2999
3086
  "default": "warning",
3000
3087
  "description": "Warns when using an API marked @stability unstable"
3088
+ },
3089
+ "yieldInCallArgument": {
3090
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
3091
+ "default": "off",
3092
+ "description": "Suggests yielding into a const before a call instead of passing a yield* directly as a call or new argument in Effect generators"
3001
3093
  }
3002
3094
  },
3003
3095
  "type": "object"
@@ -3075,6 +3167,28 @@
3075
3167
  },
3076
3168
  "type": "array"
3077
3169
  },
3170
+ "brandedSchemaClasses": {
3171
+ "default": [
3172
+ "Class",
3173
+ "TaggedClass",
3174
+ "Error",
3175
+ "TaggedError",
3176
+ "Opaque"
3177
+ ],
3178
+ "description": "Schema class kinds that get a nominal brand, used by schemaClassMissingBrand and the Schema class completions.",
3179
+ "items": {
3180
+ "enum": [
3181
+ "Class",
3182
+ "TaggedClass",
3183
+ "Error",
3184
+ "TaggedError",
3185
+ "Opaque"
3186
+ ],
3187
+ "type": "string"
3188
+ },
3189
+ "type": "array",
3190
+ "uniqueItems": true
3191
+ },
3078
3192
  "completions": {
3079
3193
  "default": true,
3080
3194
  "description": "Controls Effect completions.",
@@ -3298,6 +3412,21 @@
3298
3412
  },
3299
3413
  "type": "array"
3300
3414
  },
3415
+ "brandedSchemaClasses": {
3416
+ "description": "Scoped override for the Schema class kinds that get a nominal brand.",
3417
+ "items": {
3418
+ "enum": [
3419
+ "Class",
3420
+ "TaggedClass",
3421
+ "Error",
3422
+ "TaggedError",
3423
+ "Opaque"
3424
+ ],
3425
+ "type": "string"
3426
+ },
3427
+ "type": "array",
3428
+ "uniqueItems": true
3429
+ },
3301
3430
  "diagnosticSeverity": {
3302
3431
  "$ref": "#/definitions/effectLanguageServicePluginDiagnosticSeverityDefinition",
3303
3432
  "description": "Severity overrides applied when this override matches."