Skip to content

Commit 60ead3d

Browse files
RobinTailcoderabbitai[bot]github-actions[bot]
authored
chore: Moving DTS tool (#3264)
From workspace to a tool. That however requires config loader, because using no file extensions. Nevertheless, this setup is simpler. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Publish pipeline no longer runs a project build step; it now installs dependencies and publishes. * Removed the standalone dts-plugin package and replaced it with equivalent local tooling. * Updated build commands across packages to include a new config-loader option. * Adjusted workspace package listings and hoisting to match the new tooling setup. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 97c8d1d commit 60ead3d

12 files changed

Lines changed: 9 additions & 59 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ jobs:
3838
registry-url: https://registry.npmjs.org/
3939
- name: Install dependencies
4040
run: pnpm install
41-
- name: Build everything
42-
# the local DTS plugin is required for building bundles
43-
# @todo remove when no longer required
44-
run: pnpm build
4541
- name: Publish ${{inputs.workspace}} with ${{ inputs.tag }}
4642
run: |
4743
pnpm -F ${{inputs.workspace}} exec \

dts-plugin/package.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

dts-plugin/tsconfig.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

express-zod-api/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "express-zod-api",
3-
"version": "27.1.0",
3+
"version": "27.1.1-beta.1",
44
"description": "A Typescript framework to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.",
55
"license": "MIT",
66
"repository": {
@@ -16,7 +16,7 @@
1616
"bugs": "https://github.com/RobinTail/express-zod-api/issues",
1717
"funding": "https://github.com/sponsors/RobinTail",
1818
"scripts": {
19-
"build": "tsdown",
19+
"build": "tsdown --config-loader unrun",
2020
"pretest": "tsc",
2121
"test": "vitest run --coverage",
2222
"bench": "vitest bench --run ./bench",
@@ -96,7 +96,6 @@
9696
"compression": "catalog:dev",
9797
"cors": "^2.8.5",
9898
"depd": "^2.0.0",
99-
"dts-plugin": "workspace:^",
10099
"express": "catalog:dev",
101100
"express-fileupload": "catalog:dev",
102101
"http-errors": "catalog:dev",

express-zod-api/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from "tsdown";
22
import manifest from "./package.json" with { type: "json" };
3-
import humanReadableDtsPlugin from "dts-plugin";
3+
import { humanReadableDtsPlugin } from "../tools/readableDts";
44

55
export default defineConfig({
66
entry: "src/index.ts",

migration/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"scripts": {
1818
"pretest": "tsc",
1919
"test": "vitest run --globals",
20-
"build": "tsdown",
20+
"build": "tsdown --config-loader unrun",
2121
"prepublishOnly": "eslint && pnpm test && pnpm build"
2222
},
2323
"type": "module",
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@typescript-eslint/rule-tester": "catalog:dev",
46-
"dts-plugin": "workspace:^",
4746
"typescript": "catalog:dev"
4847
}
4948
}

migration/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from "tsdown";
22
import manifest from "./package.json" with { type: "json" };
3-
import humanReadableDtsPlugin from "dts-plugin";
3+
import { humanReadableDtsPlugin } from "../tools/readableDts";
44

55
export default defineConfig({
66
entry: "index.ts",

pnpm-lock.yaml

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ packages:
77
- esm-test
88
- compat-test
99
- issue952-test
10-
- dts-plugin
1110
gitChecks: false
1211
engineStrict: true
1312
autoInstallPeers: false
@@ -45,6 +44,7 @@ publicHoistPattern:
4544
- "globals" # used by eslint.config.js
4645
- "@types/qs" # used by index.ts, fixes TS2742 for attachRouting
4746
- "@types/express-serve-static-core" # used by index.ts, fixes TS2742 for attachRouting
47+
- "rolldown" # used by readableDts tool
4848
catalogs:
4949
prod:
5050
"ramda": "^0.32.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const prettyOptions: Options = {
77
};
88

99
/** @desc Fixes weird formatting in the .d.ts files generated by rolldown-plugin-dts v0.21 */
10-
export default (): Plugin => ({
10+
export const humanReadableDtsPlugin = (): Plugin => ({
1111
name: "human-readable-dts-rolldown-plugin",
1212
generateBundle: async (_opt, bundle) => {
1313
for (const [name, file] of Object.entries(bundle)) {

0 commit comments

Comments
 (0)