@kubb/ast 5.0.0-beta.81 → 5.0.0-beta.84
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 +11 -8
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -28,13 +28,16 @@ Defines the node tree, visitor pattern, factory functions, and type guards used
|
|
|
28
28
|
|
|
29
29
|
## Imports
|
|
30
30
|
|
|
31
|
-
| Path | Contents
|
|
32
|
-
| ------------------------------- |
|
|
33
|
-
| `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, constants
|
|
34
|
-
| `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue
|
|
35
|
-
| `@kubb/ast/
|
|
36
|
-
|
|
|
37
|
-
|
|
31
|
+
| Path | Contents |
|
|
32
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, string and ref helpers, constants |
|
|
34
|
+
| `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue |
|
|
35
|
+
| `@kubb/ast/types` | Types only: all node interfaces, type aliases, visitor types |
|
|
36
|
+
| `kubb/kit` | Re-exports the `ast` and `factory` namespaces, the way most Kubb code reaches the AST without a direct dependency |
|
|
37
|
+
|
|
38
|
+
`@kubb/ast` is an internal library. Inside the Kubb ecosystem the whole surface travels on the `ast` namespace from `kubb/kit`, so plugins and generators reach it there instead of depending on this package directly. The examples below import from `@kubb/ast` for clarity; through `kubb/kit` the same calls read as `ast.walk`, `ast.factory.createSchema`, and so on.
|
|
39
|
+
|
|
40
|
+
The macro presets (`macroDiscriminatorEnum`, `macroSimplifyUnion`, `macroEnumName`) and the string, identifier, and ref helpers live on the root `@kubb/ast` export. They no longer ship as separate `@kubb/ast/macros` and `@kubb/ast/utils` subpaths.
|
|
38
41
|
|
|
39
42
|
## Node tree
|
|
40
43
|
|
|
@@ -132,7 +135,7 @@ function process(node: Node) {
|
|
|
132
135
|
### Refs
|
|
133
136
|
|
|
134
137
|
```ts
|
|
135
|
-
import { extractRefName } from '@kubb/ast
|
|
138
|
+
import { extractRefName } from '@kubb/ast'
|
|
136
139
|
|
|
137
140
|
extractRefName('#/components/schemas/Pet') // 'Pet'
|
|
138
141
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/ast",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.84",
|
|
4
4
|
"description": "Spec-agnostic AST layer for Kubb. Defines the node tree, visitor pattern, factory functions, and type guards used across all code generation plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast",
|
|
@@ -53,9 +53,6 @@
|
|
|
53
53
|
"clean": "node -e \"require('node:fs').rmSync('./dist', {recursive:true,force:true})\"",
|
|
54
54
|
"lint": "oxlint .",
|
|
55
55
|
"lint:fix": "oxlint --fix .",
|
|
56
|
-
"release": "pnpm publish --no-git-check",
|
|
57
|
-
"release:canary": "bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check",
|
|
58
|
-
"release:stage": "pnpm stage publish --no-git-check",
|
|
59
56
|
"start": "tsdown --watch",
|
|
60
57
|
"test": "vitest --passWithNoTests",
|
|
61
58
|
"typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false"
|