@hydranium/langium 1.0.0-next.23 → 1.0.0-next.230

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
@@ -11,20 +11,22 @@ project stays in lockstep with the version the framework was built against.
11
11
  ## Why this package exists
12
12
 
13
13
  Langium is pinned to **one exact version** here, to guarantee a **single physical copy** across the
14
- workspace. Re-export is transparent — given one physical install, importing `AstNode` or `URI` from
15
- `@hydranium/langium` and from `langium` yields the same class object and the same declaration. That
16
- transparency is exactly what a split install destroys: two copies of Langium mean two `AstNode`
17
- declarations and two `URI` classes, so `instanceof` and every nominal identity check across them
18
- silently start returning `false`. Without the pin, single-copy is only a semver-dedup coincidence,
19
- one minor bump away from breaking.
14
+ workspace. Re-export is transparent — given one physical install, importing `AstUtils` or
15
+ `OperationCancelled` from `@hydranium/langium` and from `langium` yields the same object and the
16
+ same declaration. That transparency is exactly what a split install destroys: two copies of Langium
17
+ mean two sets of declarations, which TypeScript refuses to mix, and two sets of module-level values,
18
+ so one that Langium compares by identity, such as its cancellation signal, is not recognised by the
19
+ other copy. The framework refuses to start a server whose AST reflection is built on a copy other
20
+ than its own. Without the pin, single-copy is only a semver-dedup coincidence, one minor bump away
21
+ from breaking.
20
22
 
21
23
  For an **adopter**, the reason to route imports here is not runtime identity (that already holds) —
22
- it is **version coupling**. Langium sits in an atomic chain with `vscode-languageserver`,
23
- `vscode-languageserver-protocol` and `vscode-jsonrpc`, with no independently movable link. An
24
+ it is **version coupling**. Langium sits in a chain with `vscode-languageserver`,
25
+ `vscode-languageserver-protocol` and `vscode-jsonrpc`, whose links move together. An
24
26
  adopter importing `langium` directly owns that pin itself and can drift out of lockstep with the
25
27
  framework it composes; importing it from here means the framework owns it.
26
28
 
27
- The chokepoint is **lint-enforced**, not merely conventional: an ESLint
29
+ The chokepoint is **lint-enforced**, not merely conventional: an oxlint
28
30
  `no-restricted-imports` rule over `packages/**` and `examples/**` rejects direct imports of
29
31
  `langium`, `langium/lsp`, `langium/node`, `langium/test` and `vscode-uri` (whose `URI` Langium
30
32
  re-exports and owns the version of). This package itself is exempt, as is any `generated` directory —
@@ -61,8 +63,8 @@ No peer dependencies: `langium` is a direct, exact dependency of this package.
61
63
  | `./node` | `langium/node` | `NodeFileSystem`. |
62
64
  | `./test` | `langium/test` | Parsing / validation test helpers. |
63
65
 
64
- Each named subpath also resolves as `@hydranium/langium/lib/<name>`, so a consumer on classic
65
- `moduleResolution: "Node"` can reach it.
66
+ Resolve the subpaths with [a resolver that reads `exports`](../../docs/adopting/requirements.md#a-resolver-that-reads-exports);
67
+ `"Node"` (node10) reaches none of them.
66
68
 
67
69
  ## Usage
68
70
 
@@ -77,9 +79,10 @@ only the stock surface.
77
79
 
78
80
  ## Status
79
81
 
80
- Alpha — pre-v0, not yet published. The API is Langium's and is stable to the extent Langium's is;
81
- what is not yet settled is the augmentation set and the pinned version. See the
82
- [repository README](../../README.md) for the current status and known limitations.
82
+ Alpha — pre-v0, published as a `1.0.0-next` prerelease on every merge to `main`. The API is
83
+ Langium's and is stable to the extent Langium's is; what is not yet settled is the augmentation set
84
+ and the pinned version. See the [repository README](../../README.md) for the current status and
85
+ known limitations.
83
86
 
84
87
  ## License
85
88
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,8BAA8B,CAAC;AAEtC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,8BAA8B,CAAC;AAGtC,cAAc,SAAS,CAAC"}
package/lib/index.js CHANGED
@@ -36,5 +36,6 @@
36
36
  import './augmentations/synthetic.js';
37
37
  // Side-effecting runtime augmentation of the `UriUtils` namespace.
38
38
  import './augmentations/uri-utils.js';
39
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
39
40
  export * from 'langium';
40
41
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,oEAAoE;AACpE,OAAO,8BAA8B,CAAC;AACtC,mEAAmE;AACnE,OAAO,8BAA8B,CAAC;AAEtC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,oEAAoE;AACpE,OAAO,8BAA8B,CAAC;AACtC,mEAAmE;AACnE,OAAO,8BAA8B,CAAC;AAEtC,iIAAiI;AACjI,cAAc,SAAS,CAAC"}
package/lib/lsp.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../src/lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../src/lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AAEH,cAAc,aAAa,CAAC"}
package/lib/lsp.js CHANGED
@@ -12,5 +12,6 @@
12
12
  * so framework packages and adopters reach every Langium subpath through
13
13
  * this package and inherit its version pin instead of owning one themselves.
14
14
  */
15
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
15
16
  export * from 'langium/lsp';
16
17
  //# sourceMappingURL=lsp.js.map
package/lib/lsp.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"lsp.js","sourceRoot":"","sources":["../src/lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"lsp.js","sourceRoot":"","sources":["../src/lsp.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,iIAAiI;AACjI,cAAc,aAAa,CAAC"}
package/lib/node.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AAEH,cAAc,cAAc,CAAC"}
package/lib/node.js CHANGED
@@ -12,5 +12,6 @@
12
12
  * framework packages and adopters reach every Langium subpath through this
13
13
  * package and inherit its version pin instead of owning one themselves.
14
14
  */
15
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
15
16
  export * from 'langium/node';
16
17
  //# sourceMappingURL=node.js.map
package/lib/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,iIAAiI;AACjI,cAAc,cAAc,CAAC"}
package/lib/test.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AAEH,cAAc,cAAc,CAAC"}
package/lib/test.js CHANGED
@@ -12,5 +12,6 @@
12
12
  * and adopters reach every Langium subpath through this package and inherit
13
13
  * its version pin instead of owning one themselves.
14
14
  */
15
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
15
16
  export * from 'langium/test';
16
17
  //# sourceMappingURL=test.js.map
package/lib/test.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;GAKG;AACH,iIAAiI;AACjI,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydranium/langium",
3
- "version": "1.0.0-next.23",
3
+ "version": "1.0.0-next.230",
4
4
  "description": "Augmented re-export of the Langium API for the hydranium framework: the single chokepoint where hydranium pins the Langium version and layers its type/namespace augmentations. ~99% passthrough today.",
5
5
  "keywords": [
6
6
  "hydranium",
@@ -12,20 +12,27 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/eclipse-emfcloud/hydranium/issues"
14
14
  },
15
+ "license": "MIT",
16
+ "author": {
17
+ "name": "Hydranium Team"
18
+ },
15
19
  "repository": {
16
20
  "type": "git",
17
21
  "url": "https://github.com/eclipse-emfcloud/hydranium.git",
18
22
  "directory": "packages/langium"
19
23
  },
20
- "license": "MIT",
21
- "author": {
22
- "name": "Hydranium Team"
23
- },
24
+ "files": [
25
+ "lib",
26
+ "src",
27
+ "!lib/**/*.tsbuildinfo"
28
+ ],
29
+ "type": "module",
24
30
  "sideEffects": [
25
31
  "./lib/index.js",
26
32
  "./lib/augmentations/*.js"
27
33
  ],
28
- "type": "module",
34
+ "main": "lib/index.js",
35
+ "types": "lib/index.d.ts",
29
36
  "exports": {
30
37
  ".": {
31
38
  "types": "./lib/index.d.ts",
@@ -35,38 +42,22 @@
35
42
  "types": "./lib/lsp.d.ts",
36
43
  "default": "./lib/lsp.js"
37
44
  },
38
- "./lib/lsp": {
39
- "types": "./lib/lsp.d.ts",
40
- "default": "./lib/lsp.js"
41
- },
42
45
  "./node": {
43
46
  "types": "./lib/node.d.ts",
44
47
  "default": "./lib/node.js"
45
48
  },
46
- "./lib/node": {
47
- "types": "./lib/node.d.ts",
48
- "default": "./lib/node.js"
49
- },
50
49
  "./test": {
51
50
  "types": "./lib/test.d.ts",
52
51
  "default": "./lib/test.js"
53
- },
54
- "./lib/test": {
55
- "types": "./lib/test.d.ts",
56
- "default": "./lib/test.js"
57
52
  }
58
53
  },
59
- "main": "lib/index.js",
60
- "types": "lib/index.d.ts",
61
- "files": [
62
- "lib",
63
- "src",
64
- "!lib/**/*.tsbuildinfo"
65
- ],
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
66
57
  "scripts": {
67
58
  "build": "tsc -b",
68
59
  "clean": "rimraf lib tsconfig.tsbuildinfo",
69
- "lint": "eslint src --max-warnings 0",
60
+ "lint": "oxlint --format stylish --config ../../oxlint.config.cjs src --max-warnings 0",
70
61
  "prepack": "node -e \"const m=require('./package.json'),fs=require('node:fs');const missing=[m.main,...Object.values(m.bin||{})].filter(entry=>entry&&!fs.existsSync(entry));if(missing.length){console.error('prepack '+m.name+': not built ('+missing.join(', ')+' missing). Run the build before packing: a files entry that matches nothing is skipped silently, so the tarball would ship src only.');process.exit(1);}\"",
71
62
  "test": "npm run typecheck:test && vitest run",
72
63
  "typecheck:test": "tsc --noEmit -p tsconfig.test.json",
@@ -77,14 +68,11 @@
77
68
  },
78
69
  "devDependencies": {
79
70
  "rimraf": "^5.0.0",
80
- "typescript": "^5.8.0"
71
+ "typescript": "^7.0.2"
81
72
  },
82
73
  "engines": {
83
74
  "node": ">=22.13"
84
75
  },
85
- "publishConfig": {
86
- "access": "public"
87
- },
88
- "//prepack": "The publish guard, and it deliberately is NOT a `prepare`: npm runs a workspace `prepare` BEFORE the root `postinstall` that applies patches/vscode-jsonrpc+9.0.1.patch, so building there fails on a cold clone and npm rolls the entire install back. `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. It FAILS rather than rebuilds, because the rebuild is exactly the part that ordering defeats. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error.",
76
+ "//prepack": "The publish guard, a `prepack` rather than a `prepare`: `prepack` runs only when a tarball is made (`npm pack`, `npm publish`) and never on install, so it cannot break the install it has no business touching. What it defends against: `files` lists `lib`, `lib` is gitignored, and a `files` entry matching nothing is skipped SILENTLY — so `npm publish` from an unbuilt tree emits a tarball of `src` and nothing else, with no error.",
89
77
  "//sideEffects": "NOT `false`, and the two entries are load-bearing. `augmentations/uri-utils.js` mutates the runtime `UriUtils` object it imports from `langium`, and `index.js` is the only module that loads it — everything else there is `export * from 'langium'`. Declared side-effect-free, a bundler rewrites an import of any symbol from this package straight through to `langium` and skips `index.js` entirely, so `UriUtils.toUri` / `.isAncestorOrEqual` are simply absent at runtime. Nothing fails at build time: the augmentation is a type-level `declare module` merge, so the call still typechecks. `./lsp` and `./node` are pure passthroughs of the upstream subpaths and deliberately not listed."
90
78
  }
package/src/index.ts CHANGED
@@ -39,4 +39,5 @@ import './augmentations/synthetic.js';
39
39
  // Side-effecting runtime augmentation of the `UriUtils` namespace.
40
40
  import './augmentations/uri-utils.js';
41
41
 
42
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
42
43
  export * from 'langium';
package/src/lsp.ts CHANGED
@@ -13,4 +13,5 @@
13
13
  * so framework packages and adopters reach every Langium subpath through
14
14
  * this package and inherit its version pin instead of owning one themselves.
15
15
  */
16
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
16
17
  export * from 'langium/lsp';
package/src/node.ts CHANGED
@@ -13,4 +13,5 @@
13
13
  * framework packages and adopters reach every Langium subpath through this
14
14
  * package and inherit its version pin instead of owning one themselves.
15
15
  */
16
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
16
17
  export * from 'langium/node';
package/src/test.ts CHANGED
@@ -13,4 +13,5 @@
13
13
  * and adopters reach every Langium subpath through this package and inherit
14
14
  * its version pin instead of owning one themselves.
15
15
  */
16
+ // oxlint-disable-next-line import/export -- misreads export * from an npm package: https://github.com/oxc-project/oxc/pull/26872
16
17
  export * from 'langium/test';