@manifest-configuration-language/browser 0.3.11 → 0.3.12

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 CHANGED
@@ -39,6 +39,6 @@ MCL decodes the request into a root-relative `io/fs` filesystem for project file
39
39
 
40
40
  The wire format is described in [`protocol.schema.json`](https://github.com/manifest-configuration-language/mcl/blob/main/cmd/mcl-wasm/protocol.schema.json). Go protocol models are generated with `go generate ./cmd/mcl-wasm`, and the browser package declarations are generated with `npm run generate:protocol`. The browser API declarations reuse the generated operation, diagnostic, and result types. MCL decodes each request into a root-relative `io/fs` project filesystem. Kustomize project overlays and locked Git archives use kyaml's in-memory filesystem, and Helm source loading accepts an `io/fs` filesystem. The Go `wasm_exec.js` runtime supplies its standard browser fallbacks for process, path, and stdout APIs; the Browser SDK does not provide a Node-style project filesystem or require Node polyfills in Vite.
41
41
 
42
- `MclRuntimeError` and lint diagnostics report project-relative paths with UTF-16 start and end positions. Evaluation errors also include related source locations when the Go engine provides them, such as the schema declaration associated with a resource validation error.
42
+ `MclRuntimeError` and lint diagnostics report project-relative paths with UTF-16 start and end positions. Lint diagnostics can also include code actions with project-relative replacement edits; the current `removeUnreachableDefinition` action removes an unreachable declaration. Evaluation errors also include related source locations when the Go engine provides them, such as the schema declaration associated with a resource validation error.
43
43
 
44
44
  The [WebAssembly code size profile](https://github.com/manifest-configuration-language/mcl/blob/main/packages/browser/performance-profile.md) records package-level function body sizes and explains which WebAssembly sections it excludes.
package/dist/mcl.wasm CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/mcl.wasm
3
- size: 96833091 bytes
4
- sha256: 521315bfa09d7e8930b44dc1e030c44eb1c0587437b8222f656f65c33a44a2ee
3
+ size: 96854882 bytes
4
+ sha256: 0a8fc56d414f82aaebc05de2cfacc99c56d894c2fd31b43596665acbf743721c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manifest-configuration-language/browser",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Run MCL projects in a browser Web Worker using the Go WebAssembly runtime.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import type {
11
11
  HoverInfo as ProtocolHoverInfo,
12
12
  HoverResult as ProtocolHoverResult,
13
13
  LintDiagnostic as ProtocolLintDiagnostic,
14
+ LintCodeAction as ProtocolLintCodeAction,
14
15
  ParseResult,
15
16
  RelatedLocation as ProtocolRelatedLocation,
16
17
  ReferenceLocation as ProtocolReferenceLocation,
@@ -46,6 +47,7 @@ export type ProjectFiles = Readonly<Record<string, ProjectFile>>;
46
47
  export type MclError = ProtocolError;
47
48
 
48
49
  export type LintDiagnostic = ProtocolLintDiagnostic;
50
+ export type LintCodeAction = ProtocolLintCodeAction;
49
51
  export type CompletionPosition = ProtocolCompletionPosition;
50
52
  export type CompletionItem = ProtocolCompletionItem;
51
53
  export type CompletionResult = ProtocolCompletionResult;
package/src/protocol.d.ts CHANGED
@@ -83,6 +83,23 @@ export interface LintDiagnostic {
83
83
  column: number;
84
84
  endLine: number;
85
85
  endColumn: number;
86
+ actions?: LintCodeAction[];
87
+ }
88
+ export interface LintCodeAction {
89
+ kind: "removeUnreachableDefinition";
90
+ /**
91
+ * @minItems 1
92
+ */
93
+ edits: [RenameEdit, ...RenameEdit[]];
94
+ }
95
+ export interface RenameEdit {
96
+ path: ProjectPath;
97
+ range: SourceRange;
98
+ newText: string;
99
+ }
100
+ export interface SourceRange {
101
+ start: CompletionPosition;
102
+ end: CompletionPosition;
86
103
  }
87
104
  export interface FormatResult {
88
105
  source: string;
@@ -117,10 +134,6 @@ export interface SourceMapEntry {
117
134
  output: SourceRange;
118
135
  sources: SourceMapOrigin[];
119
136
  }
120
- export interface SourceRange {
121
- start: CompletionPosition;
122
- end: CompletionPosition;
123
- }
124
137
  export interface SourceMapOrigin {
125
138
  path: ProjectPath;
126
139
  range: SourceRange;
@@ -168,11 +181,6 @@ export interface ReferenceLocation {
168
181
  export interface RenameResult {
169
182
  edits: RenameEdit[];
170
183
  }
171
- export interface RenameEdit {
172
- path: ProjectPath;
173
- range: SourceRange;
174
- newText: string;
175
- }
176
184
  export interface RenameFileImportsResult {
177
185
  oldPath: ProjectPath;
178
186
  newPath: ProjectPath;