@effect/tsgo 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/effect-tsgo.js +27 -3
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -101,6 +101,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
101
101
|
<tr><td><code>effectMapFlatten</code></td><td>💡</td><td></td><td>Suggests using Effect.flatMap instead of Effect.map followed by Effect.flatten in piping flows</td><td>✓</td><td>✓</td></tr>
|
|
102
102
|
<tr><td><code>effectMapVoid</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})</td><td>✓</td><td>✓</td></tr>
|
|
103
103
|
<tr><td><code>effectSucceedWithVoid</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td><td>✓</td><td>✓</td></tr>
|
|
104
|
+
<tr><td><code>flatMapToMap</code></td><td>💡</td><td>🔧</td><td>Suggests using Effect.map instead of Effect.flatMap when the callback only wraps its result with Effect.succeed</td><td>✓</td><td>✓</td></tr>
|
|
104
105
|
<tr><td><code>missedPipeableOpportunity</code></td><td>➖</td><td>🔧</td><td>Suggests using .pipe() for nested function calls</td><td>✓</td><td>✓</td></tr>
|
|
105
106
|
<tr><td><code>missingEffectServiceDependency</code></td><td>➖</td><td></td><td>Checks that Effect.Service dependencies satisfy all required layer inputs</td><td>✓</td><td></td></tr>
|
|
106
107
|
<tr><td><code>multipleCatchTag</code></td><td>💡</td><td></td><td>Suggests collapsing consecutive Effect.catchTag transformations into a single Effect.catchTags call when semantics stay equivalent</td><td></td><td>✓</td></tr>
|
package/dist/effect-tsgo.js
CHANGED
|
@@ -204655,7 +204655,7 @@ var FileReadError = class extends TaggedError("FileReadError") {
|
|
|
204655
204655
|
//#endregion
|
|
204656
204656
|
//#region package.json
|
|
204657
204657
|
var name = "@effect/tsgo";
|
|
204658
|
-
var version = "0.
|
|
204658
|
+
var version = "0.19.0";
|
|
204659
204659
|
|
|
204660
204660
|
//#endregion
|
|
204661
204661
|
//#region src/setup/consts.ts
|
|
@@ -206622,6 +206622,23 @@ var rules = [
|
|
|
206622
206622
|
}]
|
|
206623
206623
|
}
|
|
206624
206624
|
},
|
|
206625
|
+
{
|
|
206626
|
+
"name": "flatMapToMap",
|
|
206627
|
+
"group": "style",
|
|
206628
|
+
"description": "Suggests using Effect.map instead of Effect.flatMap when the callback only wraps its result with Effect.succeed",
|
|
206629
|
+
"defaultSeverity": "suggestion",
|
|
206630
|
+
"fixable": true,
|
|
206631
|
+
"supportedEffect": ["v3", "v4"],
|
|
206632
|
+
"codes": [377100],
|
|
206633
|
+
"preview": {
|
|
206634
|
+
"sourceText": "import { Effect } from \"effect\"\n\nconst program = Effect.succeed(1).pipe(\n Effect.flatMap((value) => Effect.succeed(value + 1))\n)\n",
|
|
206635
|
+
"diagnostics": [{
|
|
206636
|
+
"start": 75,
|
|
206637
|
+
"end": 89,
|
|
206638
|
+
"text": "`Effect.map` expresses this success-value transformation more directly than `Effect.flatMap` followed by `Effect.succeed`. effect(flatMapToMap)"
|
|
206639
|
+
}]
|
|
206640
|
+
}
|
|
206641
|
+
},
|
|
206625
206642
|
{
|
|
206626
206643
|
"name": "missedPipeableOpportunity",
|
|
206627
206644
|
"group": "style",
|
|
@@ -207638,6 +207655,11 @@ var ParsePackageJsonError = class extends TaggedError("ParsePackageJsonError") {
|
|
|
207638
207655
|
return `Unable to parse ${this.packageName} package.json at ${this.packageJsonPath}: ${this.reason}`;
|
|
207639
207656
|
}
|
|
207640
207657
|
};
|
|
207658
|
+
var MissingTypeScriptMetadataError = class extends TaggedError("MissingTypeScriptMetadataError") {
|
|
207659
|
+
get message() {
|
|
207660
|
+
return `Installed ${this.packageName} package.json does not contain a gitHead. Unable to select a compatible Effect binary.`;
|
|
207661
|
+
}
|
|
207662
|
+
};
|
|
207641
207663
|
var BinaryMetadataNotFoundError = class extends TaggedError("BinaryMetadataNotFoundError") {
|
|
207642
207664
|
get message() {
|
|
207643
207665
|
return `Binary metadata not found at ${this.metadataPath}.`;
|
|
@@ -207702,7 +207724,7 @@ var VerificationFailedError = class extends TaggedError("VerificationFailedError
|
|
|
207702
207724
|
const PackageJsonMetadataSchema = Struct({
|
|
207703
207725
|
name: String$1,
|
|
207704
207726
|
version: String$1,
|
|
207705
|
-
gitHead: String$1
|
|
207727
|
+
gitHead: optionalKey(String$1)
|
|
207706
207728
|
});
|
|
207707
207729
|
const PackageJsonMetadataFromStringSchema = fromJsonString(PackageJsonMetadataSchema);
|
|
207708
207730
|
const BinaryMetadataSchema = Struct({
|
|
@@ -207749,6 +207771,8 @@ const readBinaryMetadata = (binaryPath) => gen(function* () {
|
|
|
207749
207771
|
}))));
|
|
207750
207772
|
});
|
|
207751
207773
|
const resolveOfficialTypeScriptBinary = (typescriptPackage) => gen(function* () {
|
|
207774
|
+
const packageGitHead = typescriptPackage.gitHead;
|
|
207775
|
+
if (packageGitHead === void 0) return yield* fail(new MissingTypeScriptMetadataError({ packageName: typescriptPackage.requestedPackageName }));
|
|
207752
207776
|
const path = yield* Path;
|
|
207753
207777
|
const platformPackageName = "@typescript/typescript-" + process.platform + "-" + process.arch;
|
|
207754
207778
|
const packageRequire = node_module.createRequire(typescriptPackage.packageJsonPath);
|
|
@@ -207762,7 +207786,7 @@ const resolveOfficialTypeScriptBinary = (typescriptPackage) => gen(function* ()
|
|
|
207762
207786
|
packageName: typescriptPackage.requestedPackageName,
|
|
207763
207787
|
packageJsonPath: typescriptPackage.packageJsonPath,
|
|
207764
207788
|
packageVersion: typescriptPackage.version,
|
|
207765
|
-
packageGitHead
|
|
207789
|
+
packageGitHead,
|
|
207766
207790
|
platformPackageName,
|
|
207767
207791
|
platformPackageJsonPath,
|
|
207768
207792
|
platformGitHead: platformPackage.gitHead,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@effect/tsgo-win32-x64": "0.
|
|
26
|
-
"@effect/tsgo-win32-arm64": "0.
|
|
27
|
-
"@effect/tsgo-linux-x64": "0.
|
|
28
|
-
"@effect/tsgo-linux-arm64": "0.
|
|
29
|
-
"@effect/tsgo-linux-arm": "0.
|
|
30
|
-
"@effect/tsgo-darwin-x64": "0.
|
|
31
|
-
"@effect/tsgo-darwin-arm64": "0.
|
|
25
|
+
"@effect/tsgo-win32-x64": "0.19.0",
|
|
26
|
+
"@effect/tsgo-win32-arm64": "0.19.0",
|
|
27
|
+
"@effect/tsgo-linux-x64": "0.19.0",
|
|
28
|
+
"@effect/tsgo-linux-arm64": "0.19.0",
|
|
29
|
+
"@effect/tsgo-linux-arm": "0.19.0",
|
|
30
|
+
"@effect/tsgo-darwin-x64": "0.19.0",
|
|
31
|
+
"@effect/tsgo-darwin-arm64": "0.19.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@effect/platform-node": "^4.0.0-beta.83",
|