@effect/language-service 0.76.0 → 0.77.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/cli.js +1240 -312
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +850 -20
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +882 -25
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +850 -20
- package/transform.js.map +1 -1
package/transform.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(transform_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(transform_exports);
|
|
26
26
|
|
|
27
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
27
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Pipeable.js
|
|
28
28
|
var pipeArguments = (self, args3) => {
|
|
29
29
|
switch (args3.length) {
|
|
30
30
|
case 0:
|
|
@@ -57,7 +57,7 @@ var pipeArguments = (self, args3) => {
|
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
60
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Function.js
|
|
61
61
|
var dual = function(arity, body) {
|
|
62
62
|
if (typeof arity === "function") {
|
|
63
63
|
return function() {
|
|
@@ -105,7 +105,7 @@ function pipe(a, ...args3) {
|
|
|
105
105
|
return pipeArguments(a, args3);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
108
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/internal/equal.js
|
|
109
109
|
var getAllObjectKeys = (obj) => {
|
|
110
110
|
const keys2 = new Set(Reflect.ownKeys(obj));
|
|
111
111
|
if (obj.constructor === Object) return keys2;
|
|
@@ -128,7 +128,7 @@ var getAllObjectKeys = (obj) => {
|
|
|
128
128
|
};
|
|
129
129
|
var byReferenceInstances = /* @__PURE__ */ new WeakSet();
|
|
130
130
|
|
|
131
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
131
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Predicate.js
|
|
132
132
|
function isString(input) {
|
|
133
133
|
return typeof input === "string";
|
|
134
134
|
}
|
|
@@ -149,7 +149,7 @@ function isObjectKeyword(input) {
|
|
|
149
149
|
}
|
|
150
150
|
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObjectKeyword(self) && property in self);
|
|
151
151
|
|
|
152
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
152
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Hash.js
|
|
153
153
|
var symbol = "~effect/interfaces/Hash";
|
|
154
154
|
var hash = (self) => {
|
|
155
155
|
switch (typeof self) {
|
|
@@ -268,7 +268,7 @@ function withVisitedTracking(obj, fn2) {
|
|
|
268
268
|
return result;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
271
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Equal.js
|
|
272
272
|
var symbol2 = "~effect/interfaces/Equal";
|
|
273
273
|
function equals() {
|
|
274
274
|
if (arguments.length === 1) {
|
|
@@ -430,7 +430,7 @@ var compareSets = /* @__PURE__ */ makeCompareSet(compareBoth);
|
|
|
430
430
|
var isEqual = (u) => hasProperty(u, symbol2);
|
|
431
431
|
var asEquivalence = () => equals;
|
|
432
432
|
|
|
433
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
433
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Redactable.js
|
|
434
434
|
var symbolRedactable = /* @__PURE__ */ Symbol.for("~effect/Inspectable/redactable");
|
|
435
435
|
var isRedactable = (u) => hasProperty(u, symbolRedactable);
|
|
436
436
|
function redact(u) {
|
|
@@ -449,7 +449,7 @@ var emptyServiceMap = {
|
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
|
|
452
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
452
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Formatter.js
|
|
453
453
|
function format(input, options) {
|
|
454
454
|
const space = options?.space ?? 0;
|
|
455
455
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
@@ -528,7 +528,7 @@ function safeToString(input) {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
531
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Inspectable.js
|
|
532
532
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
533
533
|
var toJson = (input) => {
|
|
534
534
|
try {
|
|
@@ -572,7 +572,7 @@ var Class = class {
|
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
574
|
|
|
575
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
575
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Utils.js
|
|
576
576
|
var GenKindTypeId = "~effect/Utils/GenKind";
|
|
577
577
|
var GenKindImpl = class {
|
|
578
578
|
value;
|
|
@@ -640,7 +640,7 @@ var internalCall = isNotOptimizedAway ? standard[InternalTypeId] : forced[Intern
|
|
|
640
640
|
var genConstructor = function* () {
|
|
641
641
|
}.constructor;
|
|
642
642
|
|
|
643
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
643
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/internal/core.js
|
|
644
644
|
var EffectTypeId = `~effect/Effect`;
|
|
645
645
|
var ExitTypeId = `~effect/Exit`;
|
|
646
646
|
var effectVariance = {
|
|
@@ -987,7 +987,7 @@ var DoneVoid = {
|
|
|
987
987
|
value: void 0
|
|
988
988
|
};
|
|
989
989
|
|
|
990
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
990
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/internal/option.js
|
|
991
991
|
var TypeId = "~effect/data/Option";
|
|
992
992
|
var CommonProto = {
|
|
993
993
|
[TypeId]: {
|
|
@@ -1052,7 +1052,7 @@ var some = (value) => {
|
|
|
1052
1052
|
return a;
|
|
1053
1053
|
};
|
|
1054
1054
|
|
|
1055
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1055
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/internal/result.js
|
|
1056
1056
|
var TypeId2 = "~effect/data/Result";
|
|
1057
1057
|
var CommonProto2 = {
|
|
1058
1058
|
[TypeId2]: {
|
|
@@ -1123,13 +1123,13 @@ var succeed = (success) => {
|
|
|
1123
1123
|
return a;
|
|
1124
1124
|
};
|
|
1125
1125
|
|
|
1126
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1126
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Order.js
|
|
1127
1127
|
function make(compare) {
|
|
1128
1128
|
return (self, that) => self === that ? 0 : compare(self, that);
|
|
1129
1129
|
}
|
|
1130
1130
|
var String2 = /* @__PURE__ */ make((self, that) => self < that ? -1 : 1);
|
|
1131
1131
|
|
|
1132
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1132
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Option.js
|
|
1133
1133
|
var none2 = () => none;
|
|
1134
1134
|
var some2 = some;
|
|
1135
1135
|
var isNone2 = isNone;
|
|
@@ -1139,7 +1139,7 @@ var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : se
|
|
|
1139
1139
|
var fromNullishOr = (a) => a == null ? none2() : some2(a);
|
|
1140
1140
|
var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
|
|
1141
1141
|
|
|
1142
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1142
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Result.js
|
|
1143
1143
|
var succeed2 = succeed;
|
|
1144
1144
|
var fail2 = fail;
|
|
1145
1145
|
var isFailure2 = isFailure;
|
|
@@ -1147,7 +1147,7 @@ var isSuccess2 = isSuccess;
|
|
|
1147
1147
|
var map = /* @__PURE__ */ dual(2, (self, f) => isSuccess2(self) ? succeed2(f(self.success)) : fail2(self.failure));
|
|
1148
1148
|
var getOrElse2 = /* @__PURE__ */ dual(2, (self, onFailure) => isFailure2(self) ? onFailure(self.failure) : self.success);
|
|
1149
1149
|
|
|
1150
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1150
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Filter.js
|
|
1151
1151
|
var apply = (filter2, input, ...args3) => {
|
|
1152
1152
|
const result = filter2(input, ...args3);
|
|
1153
1153
|
if (result === true) return succeed2(input);
|
|
@@ -1155,10 +1155,10 @@ var apply = (filter2, input, ...args3) => {
|
|
|
1155
1155
|
return result;
|
|
1156
1156
|
};
|
|
1157
1157
|
|
|
1158
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1158
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/internal/array.js
|
|
1159
1159
|
var isArrayNonEmpty = (self) => self.length > 0;
|
|
1160
1160
|
|
|
1161
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1161
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Record.js
|
|
1162
1162
|
var map2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
1163
1163
|
const out = {
|
|
1164
1164
|
...self
|
|
@@ -1170,7 +1170,7 @@ var map2 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
|
1170
1170
|
});
|
|
1171
1171
|
var keys = (self) => Object.keys(self);
|
|
1172
1172
|
|
|
1173
|
-
// ../../node_modules/.pnpm/effect@4.0.0-beta.
|
|
1173
|
+
// ../../node_modules/.pnpm/effect@4.0.0-beta.14/node_modules/effect/dist/Array.js
|
|
1174
1174
|
var Array2 = globalThis.Array;
|
|
1175
1175
|
var fromIterable = (collection) => Array2.isArray(collection) ? collection : Array2.from(collection);
|
|
1176
1176
|
var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
|
|
@@ -4604,6 +4604,73 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
4604
4604
|
"TypeParser.extendsEffectSqlModelClass",
|
|
4605
4605
|
(atLocation) => atLocation
|
|
4606
4606
|
);
|
|
4607
|
+
const isEffectSchemaModelTypeSourceFile = cachedBy(
|
|
4608
|
+
fn("TypeParser.isEffectSchemaModelTypeSourceFile")(function* (sourceFile) {
|
|
4609
|
+
const moduleSymbol = typeChecker.getSymbolAtLocation(sourceFile);
|
|
4610
|
+
if (!moduleSymbol) return yield* typeParserIssue("Node has no symbol", void 0, sourceFile);
|
|
4611
|
+
const classSymbol = typeChecker.tryGetMemberInModuleExports("Class", moduleSymbol);
|
|
4612
|
+
if (!classSymbol) return yield* typeParserIssue("Model's Class type not found", void 0, sourceFile);
|
|
4613
|
+
const generatedSymbol = typeChecker.tryGetMemberInModuleExports("Generated", moduleSymbol);
|
|
4614
|
+
if (!generatedSymbol) {
|
|
4615
|
+
return yield* typeParserIssue("Model's Generated type not found", void 0, sourceFile);
|
|
4616
|
+
}
|
|
4617
|
+
const fieldOptionSymbol = typeChecker.tryGetMemberInModuleExports("FieldOption", moduleSymbol);
|
|
4618
|
+
if (!fieldOptionSymbol) {
|
|
4619
|
+
return yield* typeParserIssue("Model's FieldOption type not found", void 0, sourceFile);
|
|
4620
|
+
}
|
|
4621
|
+
return sourceFile;
|
|
4622
|
+
}),
|
|
4623
|
+
"TypeParser.isEffectSchemaModelTypeSourceFile",
|
|
4624
|
+
(sourceFile) => sourceFile
|
|
4625
|
+
);
|
|
4626
|
+
const isNodeReferenceToEffectSchemaModelModuleApi = (memberName) => cachedBy(
|
|
4627
|
+
fn("TypeParser.isNodeReferenceToEffectSchemaModelModuleApi")(function* (node) {
|
|
4628
|
+
return yield* isNodeReferenceToExportOfPackageModule(
|
|
4629
|
+
node,
|
|
4630
|
+
"effect",
|
|
4631
|
+
isEffectSchemaModelTypeSourceFile,
|
|
4632
|
+
memberName
|
|
4633
|
+
);
|
|
4634
|
+
}),
|
|
4635
|
+
`TypeParser.isNodeReferenceToEffectSchemaModelModuleApi(${memberName})`,
|
|
4636
|
+
(node) => node
|
|
4637
|
+
);
|
|
4638
|
+
const extendsEffectSchemaModelClass = cachedBy(
|
|
4639
|
+
fn("TypeParser.extendsEffectSchemaModelClass")(function* (atLocation) {
|
|
4640
|
+
if (!atLocation.name) {
|
|
4641
|
+
return yield* typeParserIssue("Class has no name", void 0, atLocation);
|
|
4642
|
+
}
|
|
4643
|
+
const heritageClauses = atLocation.heritageClauses;
|
|
4644
|
+
if (!heritageClauses) {
|
|
4645
|
+
return yield* typeParserIssue("Class has no heritage clauses", void 0, atLocation);
|
|
4646
|
+
}
|
|
4647
|
+
for (const heritageClause of heritageClauses) {
|
|
4648
|
+
for (const typeX of heritageClause.types) {
|
|
4649
|
+
if (ts.isExpressionWithTypeArguments(typeX)) {
|
|
4650
|
+
const expression = typeX.expression;
|
|
4651
|
+
if (ts.isCallExpression(expression)) {
|
|
4652
|
+
const schemaCall = expression.expression;
|
|
4653
|
+
if (ts.isCallExpression(schemaCall) && schemaCall.typeArguments && schemaCall.typeArguments.length > 0) {
|
|
4654
|
+
const isEffectSchemaModelModuleApi = yield* pipe(
|
|
4655
|
+
isNodeReferenceToEffectSchemaModelModuleApi("Class")(schemaCall.expression),
|
|
4656
|
+
orUndefined
|
|
4657
|
+
);
|
|
4658
|
+
if (isEffectSchemaModelModuleApi) {
|
|
4659
|
+
return {
|
|
4660
|
+
className: atLocation.name,
|
|
4661
|
+
selfTypeNode: schemaCall.typeArguments[0]
|
|
4662
|
+
};
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
}
|
|
4666
|
+
}
|
|
4667
|
+
}
|
|
4668
|
+
}
|
|
4669
|
+
return yield* typeParserIssue("Class does not extend effect's Model.Class", void 0, atLocation);
|
|
4670
|
+
}),
|
|
4671
|
+
"TypeParser.extendsEffectSchemaModelClass",
|
|
4672
|
+
(atLocation) => atLocation
|
|
4673
|
+
);
|
|
4607
4674
|
const isEffectLayerTypeSourceFile = cachedBy(
|
|
4608
4675
|
fn("TypeParser.isEffectLayerTypeSourceFile")(function* (sourceFile) {
|
|
4609
4676
|
const moduleSymbol = typeChecker.getSymbolAtLocation(sourceFile);
|
|
@@ -4976,6 +5043,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
4976
5043
|
isNodeReferenceToEffectDataModuleApi,
|
|
4977
5044
|
isNodeReferenceToEffectContextModuleApi,
|
|
4978
5045
|
isNodeReferenceToEffectSqlModelModuleApi,
|
|
5046
|
+
isNodeReferenceToEffectSchemaModelModuleApi,
|
|
4979
5047
|
isNodeReferenceToEffectLayerModuleApi,
|
|
4980
5048
|
isNodeReferenceToEffectSchemaParserModuleApi,
|
|
4981
5049
|
isServiceMapTypeSourceFile,
|
|
@@ -5013,6 +5081,7 @@ function make2(ts, tsUtils, typeChecker, typeCheckerUtils, program) {
|
|
|
5013
5081
|
extendsSchemaTaggedRequest,
|
|
5014
5082
|
extendsSchemaRequestClass,
|
|
5015
5083
|
extendsEffectSqlModelClass,
|
|
5084
|
+
extendsEffectSchemaModelClass,
|
|
5016
5085
|
lazyExpression,
|
|
5017
5086
|
emptyFunction,
|
|
5018
5087
|
pipingFlows,
|
|
@@ -5303,6 +5372,7 @@ var classSelfMismatch = createDiagnostic({
|
|
|
5303
5372
|
)
|
|
5304
5373
|
),
|
|
5305
5374
|
orElse2(() => typeParser.extendsEffectSqlModelClass(node)),
|
|
5375
|
+
orElse2(() => typeParser.extendsEffectSchemaModelClass(node)),
|
|
5306
5376
|
orElse2(() => void_)
|
|
5307
5377
|
);
|
|
5308
5378
|
if (result) {
|
|
@@ -7761,6 +7831,765 @@ var nonObjectEffectServiceType = createDiagnostic({
|
|
|
7761
7831
|
})
|
|
7762
7832
|
});
|
|
7763
7833
|
|
|
7834
|
+
// src/diagnostics/outdatedApi.db.ts
|
|
7835
|
+
var asUnchanged = {
|
|
7836
|
+
_tag: "Unchanged"
|
|
7837
|
+
};
|
|
7838
|
+
var asRenamedSameBehaviour = (newName) => ({
|
|
7839
|
+
_tag: "RenamedSameBehaviour",
|
|
7840
|
+
newName
|
|
7841
|
+
});
|
|
7842
|
+
var asRenamedAndNeedsOptions = (newName, optionsInstructions) => ({
|
|
7843
|
+
_tag: "RenamedAndNeedsOptions",
|
|
7844
|
+
newName,
|
|
7845
|
+
optionsInstructions
|
|
7846
|
+
});
|
|
7847
|
+
var asRemoved = (alternativePattern) => ({
|
|
7848
|
+
_tag: "Removed",
|
|
7849
|
+
alternativePattern
|
|
7850
|
+
});
|
|
7851
|
+
var effectModuleMigrationDb = {
|
|
7852
|
+
// Common APIs (in both v3 and v4, unchanged)
|
|
7853
|
+
"acquireRelease": asUnchanged,
|
|
7854
|
+
"acquireUseRelease": asUnchanged,
|
|
7855
|
+
"addFinalizer": asUnchanged,
|
|
7856
|
+
"all": asUnchanged,
|
|
7857
|
+
"andThen": asUnchanged,
|
|
7858
|
+
"annotateCurrentSpan": asUnchanged,
|
|
7859
|
+
"annotateLogs": asUnchanged,
|
|
7860
|
+
"annotateSpans": asUnchanged,
|
|
7861
|
+
"as": asUnchanged,
|
|
7862
|
+
"asSome": asUnchanged,
|
|
7863
|
+
"asVoid": asUnchanged,
|
|
7864
|
+
"cached": asUnchanged,
|
|
7865
|
+
"cachedInvalidateWithTTL": asUnchanged,
|
|
7866
|
+
"cachedWithTTL": asUnchanged,
|
|
7867
|
+
"catch": asUnchanged,
|
|
7868
|
+
"catchIf": asUnchanged,
|
|
7869
|
+
"catchTag": asUnchanged,
|
|
7870
|
+
"catchTags": asUnchanged,
|
|
7871
|
+
"clockWith": asUnchanged,
|
|
7872
|
+
"currentParentSpan": asUnchanged,
|
|
7873
|
+
"currentSpan": asUnchanged,
|
|
7874
|
+
"delay": asUnchanged,
|
|
7875
|
+
"die": asUnchanged,
|
|
7876
|
+
"ensuring": asUnchanged,
|
|
7877
|
+
"eventually": asUnchanged,
|
|
7878
|
+
"exit": asUnchanged,
|
|
7879
|
+
"fail": asUnchanged,
|
|
7880
|
+
"failCause": asUnchanged,
|
|
7881
|
+
"failCauseSync": asUnchanged,
|
|
7882
|
+
"failSync": asUnchanged,
|
|
7883
|
+
"fiberId": asUnchanged,
|
|
7884
|
+
"filter": asUnchanged,
|
|
7885
|
+
"filterMap": asRemoved(
|
|
7886
|
+
"Use Effect.filter or Effect.map with Option instead."
|
|
7887
|
+
),
|
|
7888
|
+
"filterOrElse": asUnchanged,
|
|
7889
|
+
"filterOrFail": asUnchanged,
|
|
7890
|
+
"flatMap": asUnchanged,
|
|
7891
|
+
"flatten": asUnchanged,
|
|
7892
|
+
"flip": asUnchanged,
|
|
7893
|
+
"fn": asUnchanged,
|
|
7894
|
+
"fnUntraced": asUnchanged,
|
|
7895
|
+
"forEach": asUnchanged,
|
|
7896
|
+
"forever": asUnchanged,
|
|
7897
|
+
"forkIn": asUnchanged,
|
|
7898
|
+
"forkScoped": asUnchanged,
|
|
7899
|
+
"gen": asUnchanged,
|
|
7900
|
+
"ignore": asUnchanged,
|
|
7901
|
+
"interrupt": asUnchanged,
|
|
7902
|
+
"interruptible": asUnchanged,
|
|
7903
|
+
"interruptibleMask": asUnchanged,
|
|
7904
|
+
"isEffect": asUnchanged,
|
|
7905
|
+
"isFailure": asUnchanged,
|
|
7906
|
+
"isSuccess": asUnchanged,
|
|
7907
|
+
"linkSpans": asUnchanged,
|
|
7908
|
+
"log": asUnchanged,
|
|
7909
|
+
"logDebug": asUnchanged,
|
|
7910
|
+
"logError": asUnchanged,
|
|
7911
|
+
"logFatal": asUnchanged,
|
|
7912
|
+
"logInfo": asUnchanged,
|
|
7913
|
+
"logTrace": asUnchanged,
|
|
7914
|
+
"logWarning": asUnchanged,
|
|
7915
|
+
"logWithLevel": asUnchanged,
|
|
7916
|
+
"makeLatch": asRemoved(
|
|
7917
|
+
"Use Latch.make instead of Effect.makeLatch."
|
|
7918
|
+
),
|
|
7919
|
+
"makeSemaphore": asRemoved(
|
|
7920
|
+
"Use Semaphore.make instead of Effect.makeSemaphore."
|
|
7921
|
+
),
|
|
7922
|
+
"makeSpan": asUnchanged,
|
|
7923
|
+
"makeSpanScoped": asUnchanged,
|
|
7924
|
+
"map": asUnchanged,
|
|
7925
|
+
"mapBoth": asUnchanged,
|
|
7926
|
+
"mapError": asUnchanged,
|
|
7927
|
+
"match": asUnchanged,
|
|
7928
|
+
"matchCause": asUnchanged,
|
|
7929
|
+
"matchCauseEffect": asUnchanged,
|
|
7930
|
+
"matchEffect": asUnchanged,
|
|
7931
|
+
"never": asUnchanged,
|
|
7932
|
+
"onError": asUnchanged,
|
|
7933
|
+
"onExit": asUnchanged,
|
|
7934
|
+
"onInterrupt": asUnchanged,
|
|
7935
|
+
"option": asUnchanged,
|
|
7936
|
+
"orDie": asUnchanged,
|
|
7937
|
+
"orElseSucceed": asUnchanged,
|
|
7938
|
+
"promise": asUnchanged,
|
|
7939
|
+
"provide": asUnchanged,
|
|
7940
|
+
"provideService": asUnchanged,
|
|
7941
|
+
"provideServiceEffect": asUnchanged,
|
|
7942
|
+
"race": asUnchanged,
|
|
7943
|
+
"raceAll": asUnchanged,
|
|
7944
|
+
"raceFirst": asUnchanged,
|
|
7945
|
+
"repeat": asUnchanged,
|
|
7946
|
+
"repeatOrElse": asUnchanged,
|
|
7947
|
+
"replicate": asUnchanged,
|
|
7948
|
+
"replicateEffect": asUnchanged,
|
|
7949
|
+
"request": asUnchanged,
|
|
7950
|
+
"retry": asUnchanged,
|
|
7951
|
+
"retryOrElse": asUnchanged,
|
|
7952
|
+
"runCallback": asUnchanged,
|
|
7953
|
+
"runFork": asUnchanged,
|
|
7954
|
+
"runPromise": asUnchanged,
|
|
7955
|
+
"runPromiseExit": asUnchanged,
|
|
7956
|
+
"runSync": asUnchanged,
|
|
7957
|
+
"runSyncExit": asUnchanged,
|
|
7958
|
+
"sandbox": asUnchanged,
|
|
7959
|
+
"schedule": asUnchanged,
|
|
7960
|
+
"scheduleFrom": asUnchanged,
|
|
7961
|
+
"scope": asUnchanged,
|
|
7962
|
+
"scoped": asUnchanged,
|
|
7963
|
+
"scopedWith": asUnchanged,
|
|
7964
|
+
"serviceOption": asUnchanged,
|
|
7965
|
+
"sleep": asUnchanged,
|
|
7966
|
+
"spanAnnotations": asUnchanged,
|
|
7967
|
+
"spanLinks": asUnchanged,
|
|
7968
|
+
"succeed": asUnchanged,
|
|
7969
|
+
"succeedNone": asUnchanged,
|
|
7970
|
+
"succeedSome": asUnchanged,
|
|
7971
|
+
"suspend": asUnchanged,
|
|
7972
|
+
"sync": asUnchanged,
|
|
7973
|
+
"tap": asUnchanged,
|
|
7974
|
+
"tapDefect": asUnchanged,
|
|
7975
|
+
"tapError": asUnchanged,
|
|
7976
|
+
"tapErrorTag": asUnchanged,
|
|
7977
|
+
"timed": asUnchanged,
|
|
7978
|
+
"timeout": asUnchanged,
|
|
7979
|
+
"timeoutOption": asUnchanged,
|
|
7980
|
+
"tracer": asUnchanged,
|
|
7981
|
+
"try": asUnchanged,
|
|
7982
|
+
"tryPromise": asUnchanged,
|
|
7983
|
+
"uninterruptible": asUnchanged,
|
|
7984
|
+
"uninterruptibleMask": asUnchanged,
|
|
7985
|
+
"updateService": asUnchanged,
|
|
7986
|
+
"useSpan": asUnchanged,
|
|
7987
|
+
"void": asUnchanged,
|
|
7988
|
+
"when": asUnchanged,
|
|
7989
|
+
"whileLoop": asUnchanged,
|
|
7990
|
+
"withConcurrency": asUnchanged,
|
|
7991
|
+
"withExecutionPlan": asUnchanged,
|
|
7992
|
+
"withLogSpan": asUnchanged,
|
|
7993
|
+
"withParentSpan": asUnchanged,
|
|
7994
|
+
"withSpan": asUnchanged,
|
|
7995
|
+
"withSpanScoped": asUnchanged,
|
|
7996
|
+
"withTracer": asUnchanged,
|
|
7997
|
+
"withTracerEnabled": asUnchanged,
|
|
7998
|
+
"withTracerTiming": asUnchanged,
|
|
7999
|
+
"yieldNow": asUnchanged,
|
|
8000
|
+
"zip": asUnchanged,
|
|
8001
|
+
"zipWith": asUnchanged,
|
|
8002
|
+
// Renamed APIs (v3 name → v4 name)
|
|
8003
|
+
"catchAll": asRenamedSameBehaviour("catch"),
|
|
8004
|
+
"catchAllCause": asRenamedSameBehaviour("catchCause"),
|
|
8005
|
+
"catchAllDefect": asRenamedSameBehaviour("catchDefect"),
|
|
8006
|
+
"catchSome": asRemoved(
|
|
8007
|
+
"Use Effect.catchIf instead. Note: the API shape changed from returning Option<Effect> to taking a predicate and handler separately."
|
|
8008
|
+
),
|
|
8009
|
+
"catchSomeCause": asRemoved(
|
|
8010
|
+
"Use Effect.catchCauseIf instead. Note: the API shape changed from returning Option<Effect> to taking a predicate and handler separately."
|
|
8011
|
+
),
|
|
8012
|
+
"ensureErrorType": asRenamedSameBehaviour("satisfiesErrorType"),
|
|
8013
|
+
"ensureRequirementsType": asRenamedSameBehaviour("satisfiesServicesType"),
|
|
8014
|
+
"ensureSuccessType": asRenamedSameBehaviour("satisfiesSuccessType"),
|
|
8015
|
+
"fork": asRenamedSameBehaviour("forkChild"),
|
|
8016
|
+
"forkDaemon": asRenamedSameBehaviour("forkDetach"),
|
|
8017
|
+
"scopeWith": asRenamedSameBehaviour("scopedWith"),
|
|
8018
|
+
"serviceOptional": asRenamedSameBehaviour("serviceOption"),
|
|
8019
|
+
"tapErrorCause": asRenamedSameBehaviour("tapCause"),
|
|
8020
|
+
// Removed APIs
|
|
8021
|
+
"annotateLogsScoped": asUnchanged,
|
|
8022
|
+
"awaitAllChildren": asUnchanged,
|
|
8023
|
+
"bind": asUnchanged,
|
|
8024
|
+
"bindTo": asUnchanged,
|
|
8025
|
+
"Do": asUnchanged,
|
|
8026
|
+
"let": asUnchanged,
|
|
8027
|
+
"partition": asUnchanged,
|
|
8028
|
+
"validate": asUnchanged,
|
|
8029
|
+
"catchSomeDefect": asRemoved(
|
|
8030
|
+
"Use Effect.catchDefect or Effect.matchCause to handle specific defects."
|
|
8031
|
+
),
|
|
8032
|
+
"forkAll": asRemoved(
|
|
8033
|
+
"Fork effects individually with Effect.forEach and Effect.forkChild, or use Effect.all with concurrency options."
|
|
8034
|
+
),
|
|
8035
|
+
"forkWithErrorHandler": asRemoved(
|
|
8036
|
+
"Fork the effect with Effect.forkChild and observe the fiber result via Fiber.join or Fiber.await."
|
|
8037
|
+
),
|
|
8038
|
+
"Tag": asRemoved(
|
|
8039
|
+
"Use ServiceMap.Service instead of Effect.Tag."
|
|
8040
|
+
),
|
|
8041
|
+
"Service": asRemoved(
|
|
8042
|
+
"Use ServiceMap.Service instead of Effect.Service."
|
|
8043
|
+
),
|
|
8044
|
+
"runtime": asRemoved(
|
|
8045
|
+
"Runtime has been removed in Effect v4. Use Effect.services to grab services and then run using Effect.runPromiseWith."
|
|
8046
|
+
),
|
|
8047
|
+
"bindAll": asRemoved(
|
|
8048
|
+
"Use Effect.gen instead of Effect.bindAll."
|
|
8049
|
+
),
|
|
8050
|
+
"EffectTypeId": asRemoved(
|
|
8051
|
+
"EffectTypeId has been removed in Effect v4."
|
|
8052
|
+
),
|
|
8053
|
+
"acquireReleaseInterruptible": asRemoved(
|
|
8054
|
+
"Use Effect.acquireRelease instead."
|
|
8055
|
+
),
|
|
8056
|
+
"allSuccesses": asRemoved(
|
|
8057
|
+
"Use Effect.all with the { mode: 'either' } option and filter successes."
|
|
8058
|
+
),
|
|
8059
|
+
"allWith": asRemoved(
|
|
8060
|
+
"Use Effect.all with options instead."
|
|
8061
|
+
),
|
|
8062
|
+
"allowInterrupt": asRemoved(
|
|
8063
|
+
"Use Effect.yieldNow instead."
|
|
8064
|
+
),
|
|
8065
|
+
"ap": asRemoved(
|
|
8066
|
+
"Use Effect.map and Effect.flatMap to apply functions instead."
|
|
8067
|
+
),
|
|
8068
|
+
"asSomeError": asRemoved(
|
|
8069
|
+
"Use Effect.mapError(Option.some) instead."
|
|
8070
|
+
),
|
|
8071
|
+
"async": asRenamedAndNeedsOptions("callback", "Note: in v4 the callback receives a Scheduler as 'this' context."),
|
|
8072
|
+
"asyncEffect": asRemoved(
|
|
8073
|
+
"Use Effect.suspend combined with Effect.promise instead."
|
|
8074
|
+
),
|
|
8075
|
+
"blocked": asRemoved(
|
|
8076
|
+
"The request batching API has been reworked in Effect v4."
|
|
8077
|
+
),
|
|
8078
|
+
"cacheRequestResult": asRemoved(
|
|
8079
|
+
"The request batching API has been reworked in Effect v4."
|
|
8080
|
+
),
|
|
8081
|
+
"cachedFunction": asRemoved(
|
|
8082
|
+
"Use Effect.cached or implement caching with a Ref instead."
|
|
8083
|
+
),
|
|
8084
|
+
"cause": asRemoved(
|
|
8085
|
+
"Use Effect.matchCause or Effect.sandbox to access the cause."
|
|
8086
|
+
),
|
|
8087
|
+
"checkInterruptible": asRemoved(
|
|
8088
|
+
"Interruption checking has been removed in Effect v4."
|
|
8089
|
+
),
|
|
8090
|
+
"clock": asRemoved(
|
|
8091
|
+
"Use Effect.clockWith instead."
|
|
8092
|
+
),
|
|
8093
|
+
"configProviderWith": asRemoved(
|
|
8094
|
+
"ConfigProvider access has been reworked in Effect v4."
|
|
8095
|
+
),
|
|
8096
|
+
"console": asRemoved(
|
|
8097
|
+
"Use Effect.consoleWith or the Console service directly."
|
|
8098
|
+
),
|
|
8099
|
+
"consoleWith": asRemoved(
|
|
8100
|
+
"Console access has been reworked in Effect v4."
|
|
8101
|
+
),
|
|
8102
|
+
"context": asRemoved(
|
|
8103
|
+
"Use Effect.context is removed. Access services directly via yield* or Effect.provideService."
|
|
8104
|
+
),
|
|
8105
|
+
"contextWith": asRemoved(
|
|
8106
|
+
"Use Effect.map with service access instead."
|
|
8107
|
+
),
|
|
8108
|
+
"contextWithEffect": asRemoved(
|
|
8109
|
+
"Use Effect.flatMap with service access instead."
|
|
8110
|
+
),
|
|
8111
|
+
"custom": asRemoved(
|
|
8112
|
+
"Use Effect.suspend or Effect.sync to create custom effects."
|
|
8113
|
+
),
|
|
8114
|
+
"daemonChildren": asRemoved(
|
|
8115
|
+
"Use Effect.forkDetach to fork detached fibers instead."
|
|
8116
|
+
),
|
|
8117
|
+
"descriptor": asRemoved(
|
|
8118
|
+
"Fiber descriptor access has been removed in Effect v4."
|
|
8119
|
+
),
|
|
8120
|
+
"descriptorWith": asRemoved(
|
|
8121
|
+
"Fiber descriptor access has been removed in Effect v4."
|
|
8122
|
+
),
|
|
8123
|
+
"dieMessage": asRemoved(
|
|
8124
|
+
"Use Effect.die(new Error(message)) instead."
|
|
8125
|
+
),
|
|
8126
|
+
"dieSync": asRemoved(
|
|
8127
|
+
"Use Effect.die with a lazily evaluated value instead."
|
|
8128
|
+
),
|
|
8129
|
+
"diffFiberRefs": asRemoved(
|
|
8130
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8131
|
+
),
|
|
8132
|
+
"disconnect": asRemoved(
|
|
8133
|
+
"Fiber disconnect has been removed in Effect v4."
|
|
8134
|
+
),
|
|
8135
|
+
"dropUntil": asRemoved(
|
|
8136
|
+
"Use Array.dropUntil and Effect.forEach instead."
|
|
8137
|
+
),
|
|
8138
|
+
"dropWhile": asRemoved(
|
|
8139
|
+
"Use Array.dropWhile and Effect.forEach instead."
|
|
8140
|
+
),
|
|
8141
|
+
"either": asRenamedAndNeedsOptions(
|
|
8142
|
+
"result",
|
|
8143
|
+
"Note: returns Result.Result<A, E> instead of Either<E, A>. Use the Result module to work with the result."
|
|
8144
|
+
),
|
|
8145
|
+
"ensuringChild": asRemoved(
|
|
8146
|
+
"Use Effect.onExit to manage child fiber cleanup instead."
|
|
8147
|
+
),
|
|
8148
|
+
"ensuringChildren": asRemoved(
|
|
8149
|
+
"Use Effect.onExit to manage child fiber cleanup instead."
|
|
8150
|
+
),
|
|
8151
|
+
"every": asRemoved(
|
|
8152
|
+
"Use Effect.forEach with a predicate check instead."
|
|
8153
|
+
),
|
|
8154
|
+
"exists": asRemoved(
|
|
8155
|
+
"Use Effect.forEach with a predicate check instead."
|
|
8156
|
+
),
|
|
8157
|
+
"fiberIdWith": asRemoved(
|
|
8158
|
+
"Use Effect.fiberId instead."
|
|
8159
|
+
),
|
|
8160
|
+
"filterEffectOrElse": asRemoved(
|
|
8161
|
+
"Use Effect.filterOrElse with an effectful predicate instead."
|
|
8162
|
+
),
|
|
8163
|
+
"filterEffectOrFail": asRemoved(
|
|
8164
|
+
"Use Effect.filterOrFail with an effectful predicate instead."
|
|
8165
|
+
),
|
|
8166
|
+
"filterOrDie": asRemoved(
|
|
8167
|
+
"Use Effect.filterOrFail and Effect.orDie instead."
|
|
8168
|
+
),
|
|
8169
|
+
"filterOrDieMessage": asRemoved(
|
|
8170
|
+
"Use Effect.filterOrFail and Effect.orDie instead."
|
|
8171
|
+
),
|
|
8172
|
+
"finalizersMask": asRemoved(
|
|
8173
|
+
"Finalizer masking has been removed in Effect v4."
|
|
8174
|
+
),
|
|
8175
|
+
"findFirst": asRemoved(
|
|
8176
|
+
"Use Effect.forEach with early return instead."
|
|
8177
|
+
),
|
|
8178
|
+
"firstSuccessOf": asRemoved(
|
|
8179
|
+
"Use Effect.raceAll instead."
|
|
8180
|
+
),
|
|
8181
|
+
"flipWith": asRemoved(
|
|
8182
|
+
"Use Effect.flip combined with the desired transformation instead."
|
|
8183
|
+
),
|
|
8184
|
+
"fromFiber": asRemoved(
|
|
8185
|
+
"Use Fiber.join instead."
|
|
8186
|
+
),
|
|
8187
|
+
"fromFiberEffect": asRemoved(
|
|
8188
|
+
"Use Effect.flatMap with Fiber.join instead."
|
|
8189
|
+
),
|
|
8190
|
+
"fromNullable": asRemoved(
|
|
8191
|
+
"Use Effect.suspend with null checks instead."
|
|
8192
|
+
),
|
|
8193
|
+
"functionWithSpan": asRemoved(
|
|
8194
|
+
"Use Effect.withSpan instead."
|
|
8195
|
+
),
|
|
8196
|
+
"getFiberRefs": asRemoved(
|
|
8197
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8198
|
+
),
|
|
8199
|
+
"getRuntimeFlags": asRemoved(
|
|
8200
|
+
"Runtime flags have been removed in Effect v4."
|
|
8201
|
+
),
|
|
8202
|
+
"head": asRemoved(
|
|
8203
|
+
"Use Array.head and Effect.flatMap instead."
|
|
8204
|
+
),
|
|
8205
|
+
"if": asRemoved(
|
|
8206
|
+
"Use Effect.when instead of Effect.if."
|
|
8207
|
+
),
|
|
8208
|
+
"ignoreLogged": asRemoved(
|
|
8209
|
+
"Logging configuration has been reworked in Effect v4."
|
|
8210
|
+
),
|
|
8211
|
+
"inheritFiberRefs": asRemoved(
|
|
8212
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8213
|
+
),
|
|
8214
|
+
"interruptWith": asRemoved(
|
|
8215
|
+
"Use Effect.interrupt instead."
|
|
8216
|
+
),
|
|
8217
|
+
"intoDeferred": asRemoved(
|
|
8218
|
+
"Use Deferred.complete instead."
|
|
8219
|
+
),
|
|
8220
|
+
"iterate": asRemoved(
|
|
8221
|
+
"Use Effect.whileLoop or recursion with Effect.suspend instead."
|
|
8222
|
+
),
|
|
8223
|
+
"labelMetrics": asRemoved(
|
|
8224
|
+
"Metric labeling has been reworked in Effect v4."
|
|
8225
|
+
),
|
|
8226
|
+
"labelMetricsScoped": asRemoved(
|
|
8227
|
+
"Metric labeling has been reworked in Effect v4."
|
|
8228
|
+
),
|
|
8229
|
+
"liftPredicate": asRemoved(
|
|
8230
|
+
"Use Effect.filterOrFail instead."
|
|
8231
|
+
),
|
|
8232
|
+
"linkSpanCurrent": asRemoved(
|
|
8233
|
+
"Use Effect.linkSpans instead."
|
|
8234
|
+
),
|
|
8235
|
+
"locally": asRemoved(
|
|
8236
|
+
"FiberRef.locally has been removed. Use Effect.provideService with ServiceMap.Reference instead."
|
|
8237
|
+
),
|
|
8238
|
+
"locallyScoped": asRemoved(
|
|
8239
|
+
"FiberRef.locally has been removed. Use Effect.provideService with ServiceMap.Reference instead."
|
|
8240
|
+
),
|
|
8241
|
+
"locallyScopedWith": asRemoved(
|
|
8242
|
+
"FiberRef.locally has been removed. Use Effect.provideService with ServiceMap.Reference instead."
|
|
8243
|
+
),
|
|
8244
|
+
"locallyWith": asRemoved(
|
|
8245
|
+
"FiberRef.locally has been removed. Use Effect.provideService with ServiceMap.Reference instead."
|
|
8246
|
+
),
|
|
8247
|
+
"logAnnotations": asRemoved(
|
|
8248
|
+
"Use Effect.annotateLogs instead."
|
|
8249
|
+
),
|
|
8250
|
+
"loop": asRemoved(
|
|
8251
|
+
"Use Effect.whileLoop or recursion with Effect.suspend instead."
|
|
8252
|
+
),
|
|
8253
|
+
"mapAccum": asRemoved(
|
|
8254
|
+
"Use Effect.gen with a mutable accumulator instead."
|
|
8255
|
+
),
|
|
8256
|
+
"mapErrorCause": asRemoved(
|
|
8257
|
+
"Use Effect.sandbox and Effect.mapError instead."
|
|
8258
|
+
),
|
|
8259
|
+
"mapInputContext": asRemoved(
|
|
8260
|
+
"Use Effect.provide with a layer instead."
|
|
8261
|
+
),
|
|
8262
|
+
"merge": asRemoved(
|
|
8263
|
+
"Use Effect.match or Effect.exit instead."
|
|
8264
|
+
),
|
|
8265
|
+
"mergeAll": asRemoved(
|
|
8266
|
+
"Use Effect.forEach with a mutable accumulator instead."
|
|
8267
|
+
),
|
|
8268
|
+
"metricLabels": asRemoved(
|
|
8269
|
+
"Metric labeling has been reworked in Effect v4."
|
|
8270
|
+
),
|
|
8271
|
+
"negate": asRemoved(
|
|
8272
|
+
"Use Effect.map with boolean negation instead."
|
|
8273
|
+
),
|
|
8274
|
+
"none": asRemoved(
|
|
8275
|
+
"Use Effect.filterOrFail or Effect.option instead."
|
|
8276
|
+
),
|
|
8277
|
+
"once": asRemoved(
|
|
8278
|
+
"Use Effect.cached instead."
|
|
8279
|
+
),
|
|
8280
|
+
"optionFromOptional": asRemoved(
|
|
8281
|
+
"Use Effect.option instead."
|
|
8282
|
+
),
|
|
8283
|
+
"orDieWith": asRemoved(
|
|
8284
|
+
"Use Effect.orDie or Effect.mapError combined with Effect.orDie instead."
|
|
8285
|
+
),
|
|
8286
|
+
"orElse": asRemoved(
|
|
8287
|
+
"Use Effect.catch or Effect.matchEffect instead."
|
|
8288
|
+
),
|
|
8289
|
+
"orElseFail": asRemoved(
|
|
8290
|
+
"Use Effect.mapError instead."
|
|
8291
|
+
),
|
|
8292
|
+
"parallelErrors": asRemoved(
|
|
8293
|
+
"Use Effect.all with concurrency options instead."
|
|
8294
|
+
),
|
|
8295
|
+
"parallelFinalizers": asRemoved(
|
|
8296
|
+
"Finalizer ordering configuration has been removed in Effect v4."
|
|
8297
|
+
),
|
|
8298
|
+
"patchFiberRefs": asRemoved(
|
|
8299
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8300
|
+
),
|
|
8301
|
+
"patchRuntimeFlags": asRemoved(
|
|
8302
|
+
"Runtime flags have been removed in Effect v4."
|
|
8303
|
+
),
|
|
8304
|
+
"raceWith": asRemoved(
|
|
8305
|
+
"Use Effect.race or Effect.raceFirst instead."
|
|
8306
|
+
),
|
|
8307
|
+
"random": asRemoved(
|
|
8308
|
+
"Use Effect.randomWith instead."
|
|
8309
|
+
),
|
|
8310
|
+
"randomWith": asRemoved(
|
|
8311
|
+
"Random access has been reworked in Effect v4."
|
|
8312
|
+
),
|
|
8313
|
+
"reduce": asRemoved(
|
|
8314
|
+
"Use Effect.forEach with a mutable accumulator or Effect.gen instead."
|
|
8315
|
+
),
|
|
8316
|
+
"reduceEffect": asRemoved(
|
|
8317
|
+
"Use Effect.forEach with a mutable accumulator or Effect.gen instead."
|
|
8318
|
+
),
|
|
8319
|
+
"reduceRight": asRemoved(
|
|
8320
|
+
"Use Effect.forEach with a mutable accumulator or Effect.gen instead."
|
|
8321
|
+
),
|
|
8322
|
+
"reduceWhile": asRemoved(
|
|
8323
|
+
"Use Effect.gen with early return instead."
|
|
8324
|
+
),
|
|
8325
|
+
"repeatN": asRemoved(
|
|
8326
|
+
"Use Effect.repeat with a schedule instead."
|
|
8327
|
+
),
|
|
8328
|
+
"runRequestBlock": asRemoved(
|
|
8329
|
+
"The request batching API has been reworked in Effect v4."
|
|
8330
|
+
),
|
|
8331
|
+
"scheduleForked": asRemoved(
|
|
8332
|
+
"Use Effect.schedule combined with Effect.forkChild instead."
|
|
8333
|
+
),
|
|
8334
|
+
"sequentialFinalizers": asRemoved(
|
|
8335
|
+
"Finalizer ordering configuration has been removed in Effect v4."
|
|
8336
|
+
),
|
|
8337
|
+
"serviceConstants": asRemoved(
|
|
8338
|
+
"Service helpers have been removed. Use ServiceMap.Service and yield* to access services."
|
|
8339
|
+
),
|
|
8340
|
+
"serviceFunction": asRemoved(
|
|
8341
|
+
"Service helpers have been removed. Use ServiceMap.Service and yield* to access services."
|
|
8342
|
+
),
|
|
8343
|
+
"serviceFunctionEffect": asRemoved(
|
|
8344
|
+
"Service helpers have been removed. Use ServiceMap.Service and yield* to access services."
|
|
8345
|
+
),
|
|
8346
|
+
"serviceFunctions": asRemoved(
|
|
8347
|
+
"Service helpers have been removed. Use ServiceMap.Service and yield* to access services."
|
|
8348
|
+
),
|
|
8349
|
+
"serviceMembers": asRemoved(
|
|
8350
|
+
"Service helpers have been removed. Use ServiceMap.Service and yield* to access services."
|
|
8351
|
+
),
|
|
8352
|
+
"setFiberRefs": asRemoved(
|
|
8353
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8354
|
+
),
|
|
8355
|
+
"step": asRemoved(
|
|
8356
|
+
"The request batching API has been reworked in Effect v4."
|
|
8357
|
+
),
|
|
8358
|
+
"summarized": asRemoved(
|
|
8359
|
+
"Use Effect.gen to capture before/after state instead."
|
|
8360
|
+
),
|
|
8361
|
+
"supervised": asRemoved(
|
|
8362
|
+
"Supervision has been reworked in Effect v4."
|
|
8363
|
+
),
|
|
8364
|
+
"tagMetrics": asRemoved(
|
|
8365
|
+
"Metric labeling has been reworked in Effect v4."
|
|
8366
|
+
),
|
|
8367
|
+
"tagMetricsScoped": asRemoved(
|
|
8368
|
+
"Metric labeling has been reworked in Effect v4."
|
|
8369
|
+
),
|
|
8370
|
+
"takeUntil": asRemoved(
|
|
8371
|
+
"Use Array.takeUntil and Effect.forEach instead."
|
|
8372
|
+
),
|
|
8373
|
+
"takeWhile": asRemoved(
|
|
8374
|
+
"Use Array.takeWhile and Effect.forEach instead."
|
|
8375
|
+
),
|
|
8376
|
+
"tapBoth": asRemoved(
|
|
8377
|
+
"Use Effect.tap and Effect.tapError instead."
|
|
8378
|
+
),
|
|
8379
|
+
"timedWith": asRemoved(
|
|
8380
|
+
"Use Effect.timed instead."
|
|
8381
|
+
),
|
|
8382
|
+
"timeoutFail": asRemoved(
|
|
8383
|
+
"Use Effect.timeout combined with Effect.catchTag for TimeoutException instead."
|
|
8384
|
+
),
|
|
8385
|
+
"timeoutFailCause": asRemoved(
|
|
8386
|
+
"Use Effect.timeout combined with Effect.sandbox instead."
|
|
8387
|
+
),
|
|
8388
|
+
"timeoutTo": asRemoved(
|
|
8389
|
+
"Use Effect.timeoutOption and Effect.map instead."
|
|
8390
|
+
),
|
|
8391
|
+
"tracerWith": asRemoved(
|
|
8392
|
+
"Use Effect.tracer instead."
|
|
8393
|
+
),
|
|
8394
|
+
"transplant": asRemoved(
|
|
8395
|
+
"Fiber transplanting has been removed in Effect v4."
|
|
8396
|
+
),
|
|
8397
|
+
"transposeMapOption": asRemoved(
|
|
8398
|
+
"Use Effect.map with Option operations instead."
|
|
8399
|
+
),
|
|
8400
|
+
"transposeOption": asRemoved(
|
|
8401
|
+
"Use Effect.option instead."
|
|
8402
|
+
),
|
|
8403
|
+
"tryMap": asRemoved(
|
|
8404
|
+
"Use Effect.map inside Effect.try instead."
|
|
8405
|
+
),
|
|
8406
|
+
"tryMapPromise": asRemoved(
|
|
8407
|
+
"Use Effect.tryPromise instead."
|
|
8408
|
+
),
|
|
8409
|
+
"unless": asRemoved(
|
|
8410
|
+
"Use Effect.when with a negated condition instead."
|
|
8411
|
+
),
|
|
8412
|
+
"unlessEffect": asRemoved(
|
|
8413
|
+
"Use Effect.when with a negated effectful condition instead."
|
|
8414
|
+
),
|
|
8415
|
+
"unsafeMakeLatch": asRemoved(
|
|
8416
|
+
"Use Effect.makeLatch instead."
|
|
8417
|
+
),
|
|
8418
|
+
"unsafeMakeSemaphore": asRemoved(
|
|
8419
|
+
"Use Effect.makeSemaphore instead."
|
|
8420
|
+
),
|
|
8421
|
+
"unsandbox": asRemoved(
|
|
8422
|
+
"Use Effect.catchCause instead."
|
|
8423
|
+
),
|
|
8424
|
+
"updateFiberRefs": asRemoved(
|
|
8425
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8426
|
+
),
|
|
8427
|
+
"using": asRemoved(
|
|
8428
|
+
"Use Effect.scoped instead."
|
|
8429
|
+
),
|
|
8430
|
+
"validateAll": asRemoved(
|
|
8431
|
+
"Use Effect.all with { mode: 'validate' } instead."
|
|
8432
|
+
),
|
|
8433
|
+
"validateFirst": asRemoved(
|
|
8434
|
+
"Use Effect.all with { mode: 'validate' } instead."
|
|
8435
|
+
),
|
|
8436
|
+
"validateWith": asRemoved(
|
|
8437
|
+
"Use Effect.all with { mode: 'validate' } instead."
|
|
8438
|
+
),
|
|
8439
|
+
"whenEffect": asRemoved(
|
|
8440
|
+
"Use Effect.when with an effectful condition via Effect.flatMap instead."
|
|
8441
|
+
),
|
|
8442
|
+
"whenFiberRef": asRemoved(
|
|
8443
|
+
"FiberRef has been replaced by ServiceMap.Reference in Effect v4."
|
|
8444
|
+
),
|
|
8445
|
+
"whenLogLevel": asRemoved(
|
|
8446
|
+
"Log level checking has been reworked in Effect v4."
|
|
8447
|
+
),
|
|
8448
|
+
"whenRef": asRemoved(
|
|
8449
|
+
"Use Ref.get and Effect.when instead."
|
|
8450
|
+
),
|
|
8451
|
+
"withClock": asRemoved(
|
|
8452
|
+
"Clock configuration has been reworked in Effect v4."
|
|
8453
|
+
),
|
|
8454
|
+
"withClockScoped": asRemoved(
|
|
8455
|
+
"Clock configuration has been reworked in Effect v4."
|
|
8456
|
+
),
|
|
8457
|
+
"withConfigProvider": asRemoved(
|
|
8458
|
+
"ConfigProvider configuration has been reworked in Effect v4."
|
|
8459
|
+
),
|
|
8460
|
+
"withConfigProviderScoped": asRemoved(
|
|
8461
|
+
"ConfigProvider configuration has been reworked in Effect v4."
|
|
8462
|
+
),
|
|
8463
|
+
"withConsole": asRemoved(
|
|
8464
|
+
"Console configuration has been reworked in Effect v4."
|
|
8465
|
+
),
|
|
8466
|
+
"withConsoleScoped": asRemoved(
|
|
8467
|
+
"Console configuration has been reworked in Effect v4."
|
|
8468
|
+
),
|
|
8469
|
+
"withEarlyRelease": asRemoved(
|
|
8470
|
+
"Use Effect.scoped with manual resource management instead."
|
|
8471
|
+
),
|
|
8472
|
+
"withFiberRuntime": asRenamedAndNeedsOptions(
|
|
8473
|
+
"withFiber",
|
|
8474
|
+
"Note: in v4, only the Fiber is provided (not the full FiberRuntime with status). The callback receives (fiber: Fiber<unknown, unknown>) instead of (fiber: FiberRuntime<A, E>, status: FiberStatus)."
|
|
8475
|
+
),
|
|
8476
|
+
"withMaxOpsBeforeYield": asRemoved(
|
|
8477
|
+
"Use ServiceMap.Reference for MaxOpsBeforeYield configuration instead."
|
|
8478
|
+
),
|
|
8479
|
+
"withMetric": asRemoved(
|
|
8480
|
+
"Metric configuration has been reworked in Effect v4."
|
|
8481
|
+
),
|
|
8482
|
+
"withRandom": asRemoved(
|
|
8483
|
+
"Random configuration has been reworked in Effect v4."
|
|
8484
|
+
),
|
|
8485
|
+
"withRandomFixed": asRemoved(
|
|
8486
|
+
"Random configuration has been reworked in Effect v4."
|
|
8487
|
+
),
|
|
8488
|
+
"withRandomScoped": asRemoved(
|
|
8489
|
+
"Random configuration has been reworked in Effect v4."
|
|
8490
|
+
),
|
|
8491
|
+
"withRequestBatching": asRemoved(
|
|
8492
|
+
"Request batching configuration has been reworked in Effect v4."
|
|
8493
|
+
),
|
|
8494
|
+
"withRequestCache": asRemoved(
|
|
8495
|
+
"Request caching configuration has been reworked in Effect v4."
|
|
8496
|
+
),
|
|
8497
|
+
"withRequestCaching": asRemoved(
|
|
8498
|
+
"Request caching configuration has been reworked in Effect v4."
|
|
8499
|
+
),
|
|
8500
|
+
"withRuntimeFlagsPatch": asRemoved(
|
|
8501
|
+
"Runtime flags have been removed in Effect v4."
|
|
8502
|
+
),
|
|
8503
|
+
"withRuntimeFlagsPatchScoped": asRemoved(
|
|
8504
|
+
"Runtime flags have been removed in Effect v4."
|
|
8505
|
+
),
|
|
8506
|
+
"withScheduler": asRemoved(
|
|
8507
|
+
"Use ServiceMap.Reference for Scheduler configuration instead."
|
|
8508
|
+
),
|
|
8509
|
+
"withSchedulingPriority": asRemoved(
|
|
8510
|
+
"Scheduling priority configuration has been removed in Effect v4."
|
|
8511
|
+
),
|
|
8512
|
+
"withTracerScoped": asRemoved(
|
|
8513
|
+
"Use Effect.withTracer instead."
|
|
8514
|
+
),
|
|
8515
|
+
"withUnhandledErrorLogLevel": asRemoved(
|
|
8516
|
+
"Use ServiceMap.Reference for UnhandledLogLevel configuration instead."
|
|
8517
|
+
),
|
|
8518
|
+
"zipLeft": asRemoved(
|
|
8519
|
+
"Use Effect.tap instead of Effect.zipLeft."
|
|
8520
|
+
),
|
|
8521
|
+
"zipRight": asRemoved(
|
|
8522
|
+
"Use Effect.andThen instead of Effect.zipRight."
|
|
8523
|
+
)
|
|
8524
|
+
};
|
|
8525
|
+
|
|
8526
|
+
// src/diagnostics/outdatedApi.ts
|
|
8527
|
+
var outdatedApi = createDiagnostic({
|
|
8528
|
+
name: "outdatedApi",
|
|
8529
|
+
code: 48,
|
|
8530
|
+
description: "Detects usage of APIs that have been removed or renamed in Effect v4",
|
|
8531
|
+
severity: "warning",
|
|
8532
|
+
apply: fn("outdatedApi.apply")(function* (sourceFile, report) {
|
|
8533
|
+
const typeParser = yield* service(TypeParser);
|
|
8534
|
+
const ts = yield* service(TypeScriptApi);
|
|
8535
|
+
const typeChecker = yield* service(TypeCheckerApi);
|
|
8536
|
+
const typeCheckerUtils = yield* service(TypeCheckerUtils);
|
|
8537
|
+
if (typeParser.supportedEffect() === "v3") return;
|
|
8538
|
+
let hasReported = false;
|
|
8539
|
+
function reportMigration(propertyAccess, propertyName, _migration) {
|
|
8540
|
+
hasReported = true;
|
|
8541
|
+
report({
|
|
8542
|
+
location: propertyAccess.name,
|
|
8543
|
+
messageText: `${propertyName} is an Effect v3 API, but the project is using Effect v4.`,
|
|
8544
|
+
fixes: []
|
|
8545
|
+
});
|
|
8546
|
+
}
|
|
8547
|
+
const checkPropertyAccessMigration = (propertyAccess, checkRightNode, migrationDb) => {
|
|
8548
|
+
if (!ts.isPropertyAccessExpression(propertyAccess)) return;
|
|
8549
|
+
const identifier2 = propertyAccess.name;
|
|
8550
|
+
if (!ts.isIdentifier(identifier2)) return;
|
|
8551
|
+
const identifierName = ts.idText(identifier2);
|
|
8552
|
+
const migration = migrationDb[identifierName];
|
|
8553
|
+
if (!migration) return;
|
|
8554
|
+
if (migration._tag === "Unchanged") return;
|
|
8555
|
+
const targetType = typeCheckerUtils.getTypeAtLocation(propertyAccess.expression);
|
|
8556
|
+
if (!targetType) return;
|
|
8557
|
+
const targetPropertySymbol = typeChecker.getPropertyOfType(targetType, identifierName);
|
|
8558
|
+
if (targetPropertySymbol) return;
|
|
8559
|
+
return pipe(
|
|
8560
|
+
checkRightNode(propertyAccess.expression),
|
|
8561
|
+
map4(() => reportMigration(propertyAccess, identifierName, migration)),
|
|
8562
|
+
ignore
|
|
8563
|
+
);
|
|
8564
|
+
};
|
|
8565
|
+
const nodeToVisit = [];
|
|
8566
|
+
const appendNodeToVisit = (node) => {
|
|
8567
|
+
nodeToVisit.push(node);
|
|
8568
|
+
return void 0;
|
|
8569
|
+
};
|
|
8570
|
+
ts.forEachChild(sourceFile, appendNodeToVisit);
|
|
8571
|
+
while (nodeToVisit.length > 0) {
|
|
8572
|
+
const node = nodeToVisit.shift();
|
|
8573
|
+
ts.forEachChild(node, appendNodeToVisit);
|
|
8574
|
+
const checkEffectMigration = checkPropertyAccessMigration(
|
|
8575
|
+
node,
|
|
8576
|
+
typeParser.importedEffectModule,
|
|
8577
|
+
effectModuleMigrationDb
|
|
8578
|
+
);
|
|
8579
|
+
if (checkEffectMigration) {
|
|
8580
|
+
yield* ignore(checkEffectMigration);
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
if (hasReported) {
|
|
8584
|
+
report({
|
|
8585
|
+
location: { pos: 0, end: 0 },
|
|
8586
|
+
messageText: "This project targets Effect v4, but is using Effect v3 APIs. To find the correct API to use, clone and consult the github.com/effect-ts/effect-smol repository for the corresponding v4 replacement.",
|
|
8587
|
+
fixes: []
|
|
8588
|
+
});
|
|
8589
|
+
}
|
|
8590
|
+
})
|
|
8591
|
+
});
|
|
8592
|
+
|
|
7764
8593
|
// src/refactors/writeTagClassAccessors.ts
|
|
7765
8594
|
var generate = fn("writeTagClassAccessors.generate")(function* (sourceFile, service2, className, atLocation, involvedMembers) {
|
|
7766
8595
|
const ts = yield* service(TypeScriptApi);
|
|
@@ -10200,6 +11029,7 @@ var unsupportedServiceAccessors = createDiagnostic({
|
|
|
10200
11029
|
|
|
10201
11030
|
// src/diagnostics.ts
|
|
10202
11031
|
var diagnostics = [
|
|
11032
|
+
outdatedApi,
|
|
10203
11033
|
anyUnknownInErrorContext,
|
|
10204
11034
|
instanceOfSchema,
|
|
10205
11035
|
catchAllToMapError,
|