fix: address build config review findings
This commit is contained in:
4
vendor/README.md
vendored
4
vendor/README.md
vendored
@@ -31,9 +31,9 @@ Intentionally **not** vendored (verified unused by this set): `reggol`, `@cordis
|
||||
Keep this log exhaustive — every divergence from upstream must be listed.
|
||||
|
||||
1. **`hmr/src/index.ts`**: removed the `./locales/en-US.yml` / `./locales/zh-CN.yml` imports, the `.i18n({...})` call on the `Config` schema, and the `src/locales/` directory. Rationale: those imports require a runtime YAML loader hook (`@cordisjs/unyaml`) that we do not vendor; the i18n texts only localize config descriptions.
|
||||
2. **All `package.json` files**: regenerated — added `private: true`, added precise `files` entries for bundled runtime files and `lib/typings/**/*.d.ts`, preserved `src` in `files` only for packages whose previous file list already shipped it, added a `./src/*` export where missing, pointed declaration metadata at `lib/typings`, and removed upstream `devDependencies`/`scripts`/`repository` fields. Dependency and peer-dependency ranges preserved, except `hmr` declares `esbuild` as a direct dev dependency because its source imports the `BuildFailure` type and pnpm's strict workspace resolution requires the owner package to name that dependency.
|
||||
2. **All `package.json` files**: regenerated — added `private: true`, added precise `files` entries for bundled runtime files and `lib/typings/**/*.d.ts` / `.d.ts.map`, preserved `src` in `files` only for packages whose previous file list already shipped it, added a `./src/*` export where missing, pointed declaration metadata at `lib/typings`, and removed upstream `devDependencies`/`scripts`/`repository` fields. Dependency and peer-dependency ranges preserved, except `hmr` declares `esbuild` as a direct dev dependency because its source imports the `BuildFailure` type and pnpm's strict workspace resolution requires the owner package to name that dependency.
|
||||
3. **All `tsconfig.json` files**: regenerated to extend the repo-root `tsconfig.base.json`, emit TypeScript intermediates to `lib/typings`, and declare project references.
|
||||
4. **`loader/src/config/isolate.ts`**: changed the internal declaration merge specifier from `declare module './entry.ts'` to `declare module './entry'` so generated declarations are extensionless and no declaration postprocess is needed.
|
||||
4. **Vendored TypeScript source internal specifiers**: changed local relative imports/exports from explicit `.ts` / `.js` specifiers to extensionless specifiers so generated `.js` and `.d.ts` intermediates are extensionless and no declaration postprocess is needed. This includes `loader/src/config/isolate.ts` changing `declare module './entry.ts'` to `declare module './entry'`.
|
||||
5. **`schemastery/tsdown.config.ts` and `logger-console/tsdown.config.ts`**: ours, not upstream files — per-package build-shape overrides (dual ESM+CJS output; separate node/browser entries) for the repo-root tsdown build. They read the JS emitted under `lib/typings` and then write the publish runtime entries under `lib/`. Like the regenerated tsconfigs, they are not part of the upstream sync surface.
|
||||
|
||||
## Sync procedure
|
||||
|
||||
1
vendor/cordis/package.json
vendored
1
vendor/cordis/package.json
vendored
@@ -19,6 +19,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"bin.js"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/cosmokit/package.json
vendored
1
vendor/cosmokit/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/group/package.json
vendored
1
vendor/group/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/hmr/package.json
vendored
1
vendor/hmr/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/include/package.json
vendored
1
vendor/include/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/loader/package.json
vendored
1
vendor/loader/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/logger-console/package.json
vendored
1
vendor/logger-console/package.json
vendored
@@ -19,6 +19,7 @@
|
||||
"lib/index.js",
|
||||
"lib/browser.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/schemastery/package.json
vendored
1
vendor/schemastery/package.json
vendored
@@ -10,6 +10,7 @@
|
||||
"lib/index.mjs",
|
||||
"lib/index.cjs",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
1
vendor/timer/package.json
vendored
1
vendor/timer/package.json
vendored
@@ -17,6 +17,7 @@
|
||||
"files": [
|
||||
"lib/index.js",
|
||||
"lib/typings/**/*.d.ts",
|
||||
"lib/typings/**/*.d.ts.map",
|
||||
"src"
|
||||
],
|
||||
"author": "Shigma <shigma10826@gmail.com>",
|
||||
|
||||
Reference in New Issue
Block a user