Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@kubb/parser-ts

Package Overview
Dependencies
Maintainers
1
Versions
457
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/parser-ts - npm Package Compare versions

Comparing version
5.0.0-beta.26
to
5.0.0-beta.27
+5
-7
extension.yaml

@@ -32,10 +32,8 @@ $schema: https://kubb.dev/schemas/extension.json

intro: |-
`@kubb/parser-ts` is the default file parser used by Kubb when no `parsers` option is provided in `defineConfig`. It takes the universal AST produced by your adapter and prints `.ts`/`.tsx` source code using the official [TypeScript compiler](https://www.typescriptlang.org/).
`@kubb/parser-ts` takes the `FileNode` staged by your plugins and prints it as TypeScript source using the official [TypeScript compiler](https://www.typescriptlang.org/). It resolves import paths, deduplicates declarations, prints JSDoc, and rewrites extensions based on `output.extension`.
Two parser instances are exported:
Two parsers are exported:
- `parserTs` — handles `.ts` and `.js` files.
- `parserTsx` — handles `.tsx` and `.jsx` files. Use this for React projects so JSX in generated components is preserved.
Configure once on `defineConfig`. The choice applies to every file every plugin produces.
options:

@@ -47,5 +45,5 @@ - name: extname

description: |-
File extension the parser writes when emitting code. Pick `.js` for an ESM-friendly emit you can publish to npm, `.tsx` for React projects, or leave unset for the standard TypeScript default.
Controls which extension is written into the generated import specifiers. Set `.js` for ESM-compatible output, `.tsx` for React projects. Leave unset for the TypeScript default.
For rewriting relative import specifiers (`./foo` → `./foo.js`), set `output.extension` on `defineConfig` — not on the parser itself.
To rewrite extensions in the generated source (e.g. `./foo` → `./foo.js`), use `output.extension` in `defineConfig`, not this option.
codeBlock:

@@ -105,2 +103,2 @@ lang: typescript

body: |-
`parser-ts` is bundled with Kubb and used automatically when no `parsers` option is set. Install it explicitly only when you need to combine it with other parsers or provide a fully custom parser list.
`@kubb/parser-ts` is bundled with Kubb and used automatically when no `parsers` option is set. Install it explicitly only when combining it with other parsers or providing a fully custom parser list.
{
"name": "@kubb/parser-ts",
"version": "5.0.0-beta.26",
"version": "5.0.0-beta.27",
"description": "TypeScript and TSX source file parser for Kubb. Converts AST nodes and raw TypeScript code into formatted source strings using the TypeScript compiler API.",

@@ -45,7 +45,7 @@ "keywords": [

"typescript": "^6.0.3",
"@kubb/core": "5.0.0-beta.26"
"@kubb/core": "5.0.0-beta.27"
},
"devDependencies": {
"@internals/utils": "0.0.0",
"@kubb/ast": "5.0.0-beta.26"
"@kubb/ast": "5.0.0-beta.27"
},

@@ -52,0 +52,0 @@ "engines": {