🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@kubb/ast

Package Overview
Dependencies
Maintainers
1
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/ast - npm Package Compare versions

Comparing version
5.0.0-beta.82
to
5.0.0-beta.84
+1
-1
package.json
{
"name": "@kubb/ast",
"version": "5.0.0-beta.82",
"version": "5.0.0-beta.84",
"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,0 +5,0 @@ "keywords": [

@@ -31,10 +31,13 @@ <div align="center">

| Path | Contents |
| ------------------------------- | ---------------------------------------------------------------------------------------- |
| `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, constants |
| `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue |
| `@kubb/ast/macros` | Built-in macro presets: `macroDiscriminatorEnum`, `macroSimplifyUnion`, `macroEnumName` |
| `@kubb/ast/types` | Types only: all node interfaces, type aliases, visitor types |
| `@kubb/ast/utils` | Spec-agnostic string and identifier helpers, ref helpers |
| Path | Contents |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, string and ref helpers, constants |
| `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue |
| `@kubb/ast/types` | Types only: all node interfaces, type aliases, visitor types |
| `kubb/kit` | Re-exports the `ast` and `factory` namespaces, the way most Kubb code reaches the AST without a direct dependency |
`@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.
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.
## Node tree

@@ -136,3 +139,3 @@

```ts
import { extractRefName } from '@kubb/ast/utils'
import { extractRefName } from '@kubb/ast'

@@ -139,0 +142,0 @@ extractRefName('#/components/schemas/Pet') // 'Pet'