From f3c2a317490abf6947377b7aa32324bb0cf742f3 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Thu, 10 Oct 2024 18:03:04 +0800 Subject: [PATCH] chore: fix build fail by rollup-plugin-dts w/ re-export types --- package.json | 1 + pnpm-lock.yaml | 20 +++++++++++++++----- src/index.ts | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0c25cfe..d069722 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@dual-bundle/import-meta-resolve": "^4.1.0", "@fastify/deepmerge": "^2.0.0", "@rollup/pluginutils": "^5.1.2", + "@swc/types": "^0.1.12", "get-tsconfig": "^4.8.1", "rollup-preserve-directives": "^1.1.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 91137b6..4bd20d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@rollup/pluginutils': specifier: ^5.1.2 version: 5.1.2(rollup@4.24.0) + '@swc/types': + specifier: ^0.1.12 + version: 0.1.12 get-tsconfig: specifier: ^4.8.1 version: 4.8.1 @@ -41,7 +44,7 @@ importers: version: 15.3.0(rollup@4.24.0) '@swc-node/register': specifier: ^1.10.9 - version: 1.10.9(@swc/core@1.7.35)(@swc/types@0.1.13)(typescript@5.6.3) + version: 1.10.9(@swc/core@1.7.35)(@swc/types@0.1.12)(typescript@5.6.3) '@swc/core': specifier: ^1.7.35 version: 1.7.35 @@ -856,6 +859,9 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + '@swc/types@0.1.12': + resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==} + '@swc/types@0.1.13': resolution: {integrity: sha512-JL7eeCk6zWCbiYQg2xQSdLXQJl8Qoc9rXmG2cEKvHe3CKwMHwHGpfOb8frzNLmbycOo6I51qxnLnn9ESf4I20Q==} @@ -2884,14 +2890,14 @@ snapshots: - supports-color - typescript - '@swc-node/core@1.13.3(@swc/core@1.7.35)(@swc/types@0.1.13)': + '@swc-node/core@1.13.3(@swc/core@1.7.35)(@swc/types@0.1.12)': dependencies: '@swc/core': 1.7.35 - '@swc/types': 0.1.13 + '@swc/types': 0.1.12 - '@swc-node/register@1.10.9(@swc/core@1.7.35)(@swc/types@0.1.13)(typescript@5.6.3)': + '@swc-node/register@1.10.9(@swc/core@1.7.35)(@swc/types@0.1.12)(typescript@5.6.3)': dependencies: - '@swc-node/core': 1.13.3(@swc/core@1.7.35)(@swc/types@0.1.13) + '@swc-node/core': 1.13.3(@swc/core@1.7.35)(@swc/types@0.1.12) '@swc-node/sourcemap-support': 0.5.1 '@swc/core': 1.7.35 colorette: 2.0.20 @@ -2957,6 +2963,10 @@ snapshots: '@swc/counter@0.1.3': {} + '@swc/types@0.1.12': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types@0.1.13': dependencies: '@swc/counter': 0.1.3 diff --git a/src/index.ts b/src/index.ts index 3780624..864c716 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ import type { Options as SwcOptions, JscTarget, JsMinifyOptions -} from '@swc/core'; +} from '@swc/types'; import { transform as swcTransform, minify as swcMinify