diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3bdb957476..cb2316ba14 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -38,10 +38,6 @@ jobs: registry-url: https://registry.npmjs.org/ - name: Install dependencies run: pnpm install - - name: Build everything - # the local DTS plugin is required for building bundles - # @todo remove when no longer required - run: pnpm build - name: Publish ${{inputs.workspace}} with ${{ inputs.tag }} run: | pnpm -F ${{inputs.workspace}} exec \ diff --git a/dts-plugin/package.json b/dts-plugin/package.json deleted file mode 100644 index 8ee5735610..0000000000 --- a/dts-plugin/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "name": "dts-plugin", - "description": "Fixes weird formatting in the .d.ts files generated by rolldown-plugin-dts v0.21", - "version": "0.1.0", - "author": "Anna Bocharova", - "type": "module", - "main": "./dist/index.js", - "scripts": { - "prebuild": "rm -rf dist", - "build": "tsc" - }, - "devDependencies": { - "rolldown": "^1.0.0-rc.9", - "typescript": "catalog:dev" - } -} diff --git a/dts-plugin/tsconfig.json b/dts-plugin/tsconfig.json deleted file mode 100644 index 3b01d6672b..0000000000 --- a/dts-plugin/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../tsconfig.json", - "include": ["index.ts"], - "compilerOptions": { - "outDir": "dist", - "noEmit": false - } -} diff --git a/express-zod-api/package.json b/express-zod-api/package.json index d3c676012e..f4ab71b7c7 100644 --- a/express-zod-api/package.json +++ b/express-zod-api/package.json @@ -1,6 +1,6 @@ { "name": "express-zod-api", - "version": "27.1.0", + "version": "27.1.1-beta.1", "description": "A Typescript framework to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.", "license": "MIT", "repository": { @@ -16,7 +16,7 @@ "bugs": "https://github.com/RobinTail/express-zod-api/issues", "funding": "https://github.com/sponsors/RobinTail", "scripts": { - "build": "tsdown", + "build": "tsdown --config-loader unrun", "pretest": "tsc", "test": "vitest run --coverage", "bench": "vitest bench --run ./bench", @@ -96,7 +96,6 @@ "compression": "catalog:dev", "cors": "^2.8.5", "depd": "^2.0.0", - "dts-plugin": "workspace:^", "express": "catalog:dev", "express-fileupload": "catalog:dev", "http-errors": "catalog:dev", diff --git a/express-zod-api/tsdown.config.ts b/express-zod-api/tsdown.config.ts index 2a167543c4..625fb31c63 100644 --- a/express-zod-api/tsdown.config.ts +++ b/express-zod-api/tsdown.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from "tsdown"; import manifest from "./package.json" with { type: "json" }; -import humanReadableDtsPlugin from "dts-plugin"; +import { humanReadableDtsPlugin } from "../tools/readableDts"; export default defineConfig({ entry: "src/index.ts", diff --git a/migration/package.json b/migration/package.json index e83aedd316..3b47aa2ec2 100644 --- a/migration/package.json +++ b/migration/package.json @@ -17,7 +17,7 @@ "scripts": { "pretest": "tsc", "test": "vitest run --globals", - "build": "tsdown", + "build": "tsdown --config-loader unrun", "prepublishOnly": "eslint && pnpm test && pnpm build" }, "type": "module", @@ -43,7 +43,6 @@ }, "devDependencies": { "@typescript-eslint/rule-tester": "catalog:dev", - "dts-plugin": "workspace:^", "typescript": "catalog:dev" } } diff --git a/migration/tsdown.config.ts b/migration/tsdown.config.ts index ef20a69ebe..d8a1ec51c4 100644 --- a/migration/tsdown.config.ts +++ b/migration/tsdown.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from "tsdown"; import manifest from "./package.json" with { type: "json" }; -import humanReadableDtsPlugin from "dts-plugin"; +import { humanReadableDtsPlugin } from "../tools/readableDts"; export default defineConfig({ entry: "index.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5139d3c47e..9db2f695a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -143,15 +143,6 @@ importers: specifier: npm:zod@4.1.13 version: 4.1.13 - dts-plugin: - devDependencies: - rolldown: - specifier: ^1.0.0-rc.9 - version: 1.0.0-rc.9 - typescript: - specifier: catalog:dev - version: 5.9.3 - esm-test: devDependencies: express-zod-api: @@ -242,9 +233,6 @@ importers: depd: specifier: ^2.0.0 version: 2.0.0 - dts-plugin: - specifier: workspace:^ - version: link:../dts-plugin express: specifier: catalog:dev version: 5.2.1 @@ -293,9 +281,6 @@ importers: '@typescript-eslint/rule-tester': specifier: catalog:dev version: 8.55.0(eslint@9.39.4)(typescript@5.9.3) - dts-plugin: - specifier: workspace:^ - version: link:../dts-plugin typescript: specifier: catalog:dev version: 5.9.3 @@ -312,9 +297,6 @@ importers: camelize-ts: specifier: catalog:dev version: 3.0.0 - dts-plugin: - specifier: workspace:^ - version: link:../dts-plugin typescript: specifier: catalog:dev version: 5.9.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5f191f7dba..e14a75183a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -7,7 +7,6 @@ packages: - esm-test - compat-test - issue952-test - - dts-plugin gitChecks: false engineStrict: true autoInstallPeers: false @@ -45,6 +44,7 @@ publicHoistPattern: - "globals" # used by eslint.config.js - "@types/qs" # used by index.ts, fixes TS2742 for attachRouting - "@types/express-serve-static-core" # used by index.ts, fixes TS2742 for attachRouting + - "rolldown" # used by readableDts tool catalogs: prod: "ramda": "^0.32.0" diff --git a/dts-plugin/index.ts b/tools/readableDts.ts similarity index 93% rename from dts-plugin/index.ts rename to tools/readableDts.ts index a67cbdaf68..78dfb0219a 100644 --- a/dts-plugin/index.ts +++ b/tools/readableDts.ts @@ -7,7 +7,7 @@ const prettyOptions: Options = { }; /** @desc Fixes weird formatting in the .d.ts files generated by rolldown-plugin-dts v0.21 */ -export default (): Plugin => ({ +export const humanReadableDtsPlugin = (): Plugin => ({ name: "human-readable-dts-rolldown-plugin", generateBundle: async (_opt, bundle) => { for (const [name, file] of Object.entries(bundle)) { diff --git a/zod-plugin/package.json b/zod-plugin/package.json index 985dbd2628..39df3b913b 100644 --- a/zod-plugin/package.json +++ b/zod-plugin/package.json @@ -18,7 +18,7 @@ "scripts": { "pretest": "tsc", "test": "vitest run", - "build": "tsdown", + "build": "tsdown --config-loader unrun", "prepublishOnly": "eslint && pnpm test && pnpm build" }, "type": "module", @@ -47,7 +47,6 @@ "devDependencies": { "@types/ramda": "catalog:dev", "camelize-ts": "catalog:dev", - "dts-plugin": "workspace:^", "typescript": "catalog:dev", "zod": "catalog:dev" }, diff --git a/zod-plugin/tsdown.config.ts b/zod-plugin/tsdown.config.ts index 5d3a5654ad..7d7643bb5f 100644 --- a/zod-plugin/tsdown.config.ts +++ b/zod-plugin/tsdown.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from "tsdown"; import manifest from "./package.json" with { type: "json" }; -import humanReadableDtsPlugin from "dts-plugin"; +import { humanReadableDtsPlugin } from "../tools/readableDts"; const plugins = [humanReadableDtsPlugin()];