@rslint/api 0.5.0 → 0.5.2
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/package.json +2 -4
- package/src/index.ts +16 -3
- package/tsconfig.build.json +13 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslint/api",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Rslint AST library",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rslib/core": "0.21.2",
|
|
16
16
|
"@types/node": "24.3.0",
|
|
17
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
18
|
-
"@typescript/api": "1.0.0",
|
|
19
|
-
"@typescript/ast": "1.0.0"
|
|
17
|
+
"@typescript/native-preview": "7.0.0-dev.20260427.1"
|
|
20
18
|
},
|
|
21
19
|
"publishConfig": {
|
|
22
20
|
"access": "public"
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// Single source of truth: every export resolves into the typescript-go
|
|
2
|
+
// submodule we pin via .gitmodules. Avoid `@typescript/native-preview/ast`
|
|
3
|
+
// for type/value re-exports — that npm package's `gitHead` and our
|
|
4
|
+
// submodule HEAD can drift, leaving the bundle with two parallel `Node`
|
|
5
|
+
// definitions and risking SyntaxKind enum-value skew. The npm package is
|
|
6
|
+
// still a devDep, but only as the source of the `tsgo` binary used at
|
|
7
|
+
// build time; nothing it ships ends up in the published dist of @rslint/api.
|
|
8
|
+
//
|
|
9
|
+
// api-extractor (rslib's d.ts bundler) does not follow Node subpath imports
|
|
10
|
+
// declared in the submodule package's own package.json. Without help it
|
|
11
|
+
// leaks unresolvable `#enums/*` literals into the published `.d.ts` — fixed
|
|
12
|
+
// by a `paths` entry in tsconfig.build.json (rslib's `dts.alias` is a no-op
|
|
13
|
+
// for `bundle: true`, so we have to go through tsconfig).
|
|
14
|
+
export { RemoteSourceFile } from '../../../typescript-go/_packages/native-preview/src/api/node/node.ts';
|
|
15
|
+
export { SyntaxKind } from '../../../typescript-go/_packages/native-preview/src/ast/index.ts';
|
|
16
|
+
export type { Node } from '../../../typescript-go/_packages/native-preview/src/ast/index.ts';
|
package/tsconfig.build.json
CHANGED
|
@@ -7,14 +7,23 @@
|
|
|
7
7
|
"lib": ["esnext", "dom"],
|
|
8
8
|
"noImplicitReturns": false,
|
|
9
9
|
"noImplicitOverride": false,
|
|
10
|
-
"rootDir": "../.."
|
|
10
|
+
"rootDir": "../..",
|
|
11
|
+
"baseUrl": ".",
|
|
12
|
+
// No source file in `src/**` references `#enums/*`. The mapping exists
|
|
13
|
+
// purely so api-extractor (rslib's d.ts bundler) can resolve the Node
|
|
14
|
+
// subpath imports inside transitively pulled `_packages/native-preview`
|
|
15
|
+
// sources — `dts.alias` in rslib.config.ts is a no-op for `bundle: true`
|
|
16
|
+
// because api-extractor reads its own tsconfig fresh from disk.
|
|
17
|
+
"paths": {
|
|
18
|
+
"#enums/*": [
|
|
19
|
+
"../../typescript-go/_packages/native-preview/src/enums/*.enum.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
11
22
|
},
|
|
12
23
|
|
|
13
24
|
"include": [
|
|
14
25
|
"src/**/*.ts",
|
|
15
|
-
"../../typescript-go/_packages/
|
|
16
|
-
"../../typescript-go/_packages/api/src/node/msgpack.ts",
|
|
17
|
-
"../../typescript-go/_packages/api/src/node/protocol.ts"
|
|
26
|
+
"../../typescript-go/_packages/native-preview/src/**/*.ts"
|
|
18
27
|
],
|
|
19
28
|
"references": []
|
|
20
29
|
}
|