mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
a4478e960a
Add `oxc-codegen` package - a printer written in TS. ### Features - Prints JS, JSX, TS, TSX. - Matches `oxc_codegen` exactly on all Test262, TypeScript, Acorn-JSX fixtures. - Very fast. ### Deficiencies - Pretty-printing only (no compact/minified output). - No support for printing comments. - Source map support is semi-there, but largely untested, and poor API (design doc has some ideas on how to improve it). ### This PR adds - The printer code. - Conformance testing infra. - Further tests for edge cases. - README. - Design doc - how it differs from `oxc_codegen` and why, what produces the perf. ### This PR doesn't add - Not integrated into CI or release pipeline. ### Notes This started as a slop port of `oxc_codegen`. I've iterated on that base, cleaned it up a lot, and at least skimmed through all of it. I think it's in fairly decent shape. The design doc is I think worth a read. It explains the rationale for the choices, in particular the "1 codebase, 4 builds" approach. I've put it in a new top-level directory called `packages`. It's not an app, so didn't seem to me to fit alongside `apps/oxlint` and `apps/oxfmt`. It's pure JS, so not like e.g. `napi/parser`. And it felt too heavyweight to put into `npm` dir. But maybe there's a better place for it. Co-authored-by: Cameron <cameron.clark@hey.com>
62 lines
1.1 KiB
YAML
62 lines
1.1 KiB
YAML
packages:
|
|
- apps/*
|
|
- napi/*
|
|
- packages/*
|
|
- wasm/*
|
|
- npm/*
|
|
- tasks/codegen_conformance
|
|
- tasks/e2e
|
|
- tasks/transform_conformance
|
|
- tasks/compat_data
|
|
|
|
catalog:
|
|
"@emnapi/core": 2.0.0-alpha.3
|
|
"@emnapi/runtime": 2.0.0-alpha.3
|
|
emnapi: 2.0.0-alpha.3
|
|
"@arethetypeswrong/core": 0.18.5
|
|
"@napi-rs/cli": 3.8.6
|
|
"@napi-rs/wasm-runtime": 1.2.2
|
|
"@types/node": 24.1.0
|
|
cross-env: ^10.1.0
|
|
degit: 3.6.6
|
|
eslint: 10.8.0
|
|
json-schema-to-typescript: ^15.0.4
|
|
publint: 0.3.23
|
|
rolldown: 1.2.4
|
|
tsdown: 0.22.14
|
|
vite-plus: 0.2.9
|
|
vitest: 4.1.10
|
|
|
|
overrides:
|
|
rolldown: "catalog:"
|
|
emnapi: "catalog:"
|
|
|
|
allowBuilds:
|
|
"@vscode/vsce-sign@2.0.8": true
|
|
esbuild@0.27.7: true
|
|
esbuild@0.28.1: true
|
|
"@nestjs/core@11.1.9": false
|
|
|
|
verifyDepsBeforeRun: install
|
|
minimumReleaseAgeExclude:
|
|
- "@napi-rs/*"
|
|
- "@oxc-parser/*"
|
|
- "@oxc-project/*"
|
|
- "@oxfmt/*"
|
|
- "@oxlint-tsgolint/*"
|
|
- "@oxlint/*"
|
|
- "@rolldown/*"
|
|
- "@tsdown/*"
|
|
- "@vitejs/devtools"
|
|
- "@vitest/*"
|
|
- "@voidzero-dev/*"
|
|
- oxc-parser
|
|
- oxfmt
|
|
- oxlint
|
|
- oxlint-tsgolint
|
|
- rolldown
|
|
- tsdown
|
|
- vite
|
|
- vite-plus
|
|
- vitest
|