Repository navigation
Conversation
- Run the six TypeScript scripts with oxnode (@oxc-node/cli) through one run-ts script. It points oxc-node at src/tsconfig.esm.json, because the root tsconfig has jsx: preserve, which oxc-node turns into React's automatic runtime while tsx used the classic h factory - post-build: import gen-web-types only after src is back on lodash-es, and import kebabCase from lodash-es: native ESM can't take named imports from the CommonJS lodash, which tsx's loader allowed
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8247 +/- ##
========================================
Coverage 63.55% 63.56%
========================================
Files 878 878
Lines 27487 27487
Branches 8750 8524 -226
========================================
+ Hits 17469 17471 +2
Misses 9803 9803
+ Partials 215 213 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs the repo's TypeScript scripts with oxc-node (
oxnode) instead oftsx.Changes
tsx(gen-version,gen-volar-dts,post-build,release:changelog,transpile-docs, andpre-cjs-buildinsidebuild:package) now go through onerun-tsscript:cross-env OXC_TSCONFIG_PATH=src/tsconfig.esm.json oxnode."jsx": "preserve". To run.tsx,tsxfell back to the classichfactory, while oxc-node falls back to React's automatic runtime and fails onimport 'react/jsx-runtime'.src/tsconfig.esm.json("jsx": "react",jsxFactory: h) is what the library build already compiles these files with. oxc-node has no CLI flag for this;OXC_TSCONFIG_PATHis how it selects a tsconfig.scripts/post-build/index.ts:gen-web-typesis imported aftersrcis switched back fromlodashtolodash-es, instead of at the top.pre-cjs-buildrewritessrcto the CommonJSlodashfor the CJS build. Node's native ESM, which oxc-node uses, can't take named imports from it;tsx's loader allowed them.scripts/post-build/gen-web-types.ts: importskebabCasefromlodash-esfor the same reason.tsxis replaced by@oxc-node/cliin devDependencies.Verification
Each build ran in the same checkout path with
tsxand withoxnode, and the outputs were compared file by file:build:package:dist/,es/,lib/andthemes/tusimple/{es,lib}are identical.build:package:vapor(the release build):dist/and every.mjs/.jsfile are identical..d.tsfiles differ only in the order of union members and properties, plus one alias choice (VNodeChildvs. its expansion).tsxruns differ the same way (229 files), and a secondoxnoderun flips the alias back, so this is TypeScript's declaration output varying between runs, not the runner.web-types.json: same 154 components with identical contents; the order is now alphabetical, becauseimport * as componentsis an ES module namespace, whose keys are sorted.gen-volar-dts:volar.d.tsis unchanged.transpile-docs button: no changes.release:changelog: reaches the same confirmation prompt with the same changelog text (run with no tokens set and answered "no", so nothing was sent).test:umdandtest:esmpass as part of both builds.