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