@effect/language-service 0.79.0 → 0.80.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 +3 -2
- package/cli.js +179 -5
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +139 -0
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +139 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +139 -0
- package/transform.js.map +1 -1
package/package.json
CHANGED
package/transform.js
CHANGED
|
@@ -1645,6 +1645,145 @@ var defaults = {
|
|
|
1645
1645
|
mermaidProvider: "mermaid.live",
|
|
1646
1646
|
skipDisabledOptimization: false
|
|
1647
1647
|
};
|
|
1648
|
+
var booleanSchema = (description, defaultValue) => ({
|
|
1649
|
+
type: "boolean",
|
|
1650
|
+
description,
|
|
1651
|
+
default: defaultValue
|
|
1652
|
+
});
|
|
1653
|
+
var stringArraySchema = (description, defaultValue) => ({
|
|
1654
|
+
type: "array",
|
|
1655
|
+
description,
|
|
1656
|
+
default: defaultValue,
|
|
1657
|
+
items: { type: "string" }
|
|
1658
|
+
});
|
|
1659
|
+
var stringEnumSchema = (description, values, defaultValue) => ({
|
|
1660
|
+
type: "string",
|
|
1661
|
+
description,
|
|
1662
|
+
enum: values,
|
|
1663
|
+
default: defaultValue
|
|
1664
|
+
});
|
|
1665
|
+
var languageServicePluginAdditionalPropertiesJsonSchema = {
|
|
1666
|
+
refactors: booleanSchema("Controls Effect refactors.", defaults.refactors),
|
|
1667
|
+
diagnostics: booleanSchema("Controls Effect diagnostics.", defaults.diagnostics),
|
|
1668
|
+
diagnosticsName: booleanSchema(
|
|
1669
|
+
"Controls whether to include the rule name in diagnostic messages.",
|
|
1670
|
+
defaults.diagnosticsName
|
|
1671
|
+
),
|
|
1672
|
+
missingDiagnosticNextLine: stringEnumSchema(
|
|
1673
|
+
"Controls the severity of warnings for unused @effect-diagnostics-next-line comments.",
|
|
1674
|
+
["off", "error", "warning", "message", "suggestion"],
|
|
1675
|
+
defaults.missingDiagnosticNextLine
|
|
1676
|
+
),
|
|
1677
|
+
includeSuggestionsInTsc: booleanSchema(
|
|
1678
|
+
"When patch mode is enabled, reports suggestion diagnostics as messages in TSC with a [suggestion] prefix.",
|
|
1679
|
+
defaults.includeSuggestionsInTsc
|
|
1680
|
+
),
|
|
1681
|
+
ignoreEffectWarningsInTscExitCode: booleanSchema(
|
|
1682
|
+
"When enabled, Effect warnings do not affect the patched tsc exit code.",
|
|
1683
|
+
defaults.ignoreEffectWarningsInTscExitCode
|
|
1684
|
+
),
|
|
1685
|
+
ignoreEffectErrorsInTscExitCode: booleanSchema(
|
|
1686
|
+
"When enabled, Effect errors do not affect the patched tsc exit code.",
|
|
1687
|
+
defaults.ignoreEffectErrorsInTscExitCode
|
|
1688
|
+
),
|
|
1689
|
+
ignoreEffectSuggestionsInTscExitCode: booleanSchema(
|
|
1690
|
+
"When enabled, Effect suggestions do not affect the patched tsc exit code.",
|
|
1691
|
+
defaults.ignoreEffectSuggestionsInTscExitCode
|
|
1692
|
+
),
|
|
1693
|
+
quickinfoEffectParameters: stringEnumSchema(
|
|
1694
|
+
"Controls when Effect quickinfo should include full type parameters.",
|
|
1695
|
+
["always", "never", "whentruncated"],
|
|
1696
|
+
defaults.quickinfoEffectParameters
|
|
1697
|
+
),
|
|
1698
|
+
quickinfo: booleanSchema("Controls Effect quickinfo.", defaults.quickinfo),
|
|
1699
|
+
quickinfoMaximumLength: {
|
|
1700
|
+
type: "number",
|
|
1701
|
+
description: "Controls the maximum quickinfo length. Use -1 to disable truncation.",
|
|
1702
|
+
default: defaults.quickinfoMaximumLength
|
|
1703
|
+
},
|
|
1704
|
+
keyPatterns: {
|
|
1705
|
+
type: "array",
|
|
1706
|
+
description: "Configures key patterns used for generated Effect service and error keys.",
|
|
1707
|
+
default: defaults.keyPatterns,
|
|
1708
|
+
items: {
|
|
1709
|
+
type: "object",
|
|
1710
|
+
properties: {
|
|
1711
|
+
target: stringEnumSchema("The key builder target.", ["service", "error", "custom"], "service"),
|
|
1712
|
+
pattern: stringEnumSchema(
|
|
1713
|
+
"The key generation pattern.",
|
|
1714
|
+
["package-identifier", "default", "default-hashed"],
|
|
1715
|
+
"default"
|
|
1716
|
+
),
|
|
1717
|
+
skipLeadingPath: stringArraySchema("Path prefixes to strip before generating keys.", ["src/"])
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
extendedKeyDetection: booleanSchema(
|
|
1722
|
+
"Enables extended heuristics when detecting key sources.",
|
|
1723
|
+
defaults.extendedKeyDetection
|
|
1724
|
+
),
|
|
1725
|
+
completions: booleanSchema("Controls Effect completions.", defaults.completions),
|
|
1726
|
+
goto: booleanSchema("Controls Effect goto references support.", defaults.goto),
|
|
1727
|
+
inlays: booleanSchema("Controls Effect inlay hints.", defaults.inlays),
|
|
1728
|
+
allowedDuplicatedPackages: stringArraySchema(
|
|
1729
|
+
"Package names that are allowed to duplicate Effect as a peer dependency.",
|
|
1730
|
+
defaults.allowedDuplicatedPackages
|
|
1731
|
+
),
|
|
1732
|
+
namespaceImportPackages: stringArraySchema(
|
|
1733
|
+
"Package names that should prefer namespace imports.",
|
|
1734
|
+
defaults.namespaceImportPackages
|
|
1735
|
+
),
|
|
1736
|
+
topLevelNamedReexports: stringEnumSchema(
|
|
1737
|
+
"For namespaceImportPackages, controls how top-level named re-exports are handled.",
|
|
1738
|
+
["ignore", "follow"],
|
|
1739
|
+
defaults.topLevelNamedReexports
|
|
1740
|
+
),
|
|
1741
|
+
barrelImportPackages: stringArraySchema(
|
|
1742
|
+
"Package names that should prefer imports from their top-level barrel file.",
|
|
1743
|
+
defaults.barrelImportPackages
|
|
1744
|
+
),
|
|
1745
|
+
importAliases: {
|
|
1746
|
+
type: "object",
|
|
1747
|
+
description: "Custom aliases to use for imported identifiers.",
|
|
1748
|
+
default: defaults.importAliases,
|
|
1749
|
+
additionalProperties: {
|
|
1750
|
+
type: "string"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
renames: booleanSchema("Controls Effect rename helpers.", defaults.renames),
|
|
1754
|
+
noExternal: booleanSchema(
|
|
1755
|
+
"Disables features that link to external websites.",
|
|
1756
|
+
defaults.noExternal
|
|
1757
|
+
),
|
|
1758
|
+
pipeableMinArgCount: {
|
|
1759
|
+
type: "number",
|
|
1760
|
+
description: "Minimum argument count required before pipeable suggestions are emitted.",
|
|
1761
|
+
default: defaults.pipeableMinArgCount
|
|
1762
|
+
},
|
|
1763
|
+
effectFn: {
|
|
1764
|
+
type: "array",
|
|
1765
|
+
description: "Configures which Effect.fn variants should be suggested.",
|
|
1766
|
+
default: defaults.effectFn,
|
|
1767
|
+
items: {
|
|
1768
|
+
type: "string",
|
|
1769
|
+
enum: ["untraced", "span", "suggested-span", "inferred-span", "no-span"]
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
layerGraphFollowDepth: {
|
|
1773
|
+
type: "number",
|
|
1774
|
+
description: "Controls how deeply layer graph analysis follows dependencies.",
|
|
1775
|
+
default: defaults.layerGraphFollowDepth
|
|
1776
|
+
},
|
|
1777
|
+
mermaidProvider: {
|
|
1778
|
+
type: "string",
|
|
1779
|
+
description: "Controls which Mermaid renderer is used for layer graphs.",
|
|
1780
|
+
default: defaults.mermaidProvider
|
|
1781
|
+
},
|
|
1782
|
+
skipDisabledOptimization: booleanSchema(
|
|
1783
|
+
"When enabled, disabled diagnostics are still processed so comment-based overrides can be honored.",
|
|
1784
|
+
defaults.skipDisabledOptimization
|
|
1785
|
+
)
|
|
1786
|
+
};
|
|
1648
1787
|
function parseKeyPatterns(patterns) {
|
|
1649
1788
|
const result = [];
|
|
1650
1789
|
for (const entry of patterns) {
|