From 036d80e6c917e504d615867f306947bd12f27eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 26 Aug 2024 14:46:06 +0800 Subject: [PATCH 1/3] ci: continuous release --- .github/workflows/release-continuous.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/release-continuous.yml diff --git a/.github/workflows/release-continuous.yml b/.github/workflows/release-continuous.yml new file mode 100644 index 0000000..541b223 --- /dev/null +++ b/.github/workflows/release-continuous.yml @@ -0,0 +1,24 @@ +name: Publish Any Commit +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - run: pnpx pkg-pr-new publish From 0aadd0b117003e4198fec2995006ce27f5662dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 26 Aug 2024 15:08:48 +0800 Subject: [PATCH 2/3] fix: resolve options --- src/core/index.ts | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/core/index.ts b/src/core/index.ts index 34c9331..812d4b2 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -155,19 +155,31 @@ export type ResolvedOptions = Omit & | 'root' | 'compiler' | 'inlineTemplate' + | 'features' > > & { /** Vite only */ devServer?: ViteDevServer devToolsEnabled?: boolean cssDevSourcemap: boolean - features: NonNullable } function resolveOptions(rawOptions: Options): ResolvedOptions { const root = rawOptions.root ?? process.cwd() const isProduction = rawOptions.isProduction ?? process.env.NODE_ENV === 'production' + const features = { + ...rawOptions.features, + optionsAPI: true, + prodDevtools: false, + prodHydrationMismatchDetails: false, + propsDestructure: false, + ...rawOptions.features, + customElement: + (rawOptions.features?.customElement || rawOptions.customElement) ?? + /\.ce\.vue$/, + } + return { ...rawOptions, include: rawOptions.include ?? /\.vue$/, @@ -176,19 +188,10 @@ function resolveOptions(rawOptions: Options): ResolvedOptions { sourceMap: rawOptions.sourceMap ?? true, root, compiler: rawOptions.compiler as any, // to be set in buildStart - devToolsEnabled: !isProduction, + devToolsEnabled: features.prodDevtools || !isProduction, cssDevSourcemap: false, inlineTemplate: rawOptions.inlineTemplate ?? true, - features: { - optionsAPI: true, - prodDevtools: false, - prodHydrationMismatchDetails: false, - propsDestructure: false, - ...rawOptions.features, - customElement: - (rawOptions.features?.customElement || rawOptions.customElement) ?? - /\.ce\.vue$/, - }, + features, } } From fbec296ba46b461612560a3076a78e97d4bdee9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Mon, 26 Aug 2024 15:09:00 +0800 Subject: [PATCH 3/3] chore: release v5.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 53e2e4b..93b35ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "unplugin-vue", - "version": "5.1.2", + "version": "5.1.3", "packageManager": "pnpm@9.6.0", "description": "Transform Vue 3 SFC to JavaScript.", "type": "module",