From 75c3dac1586fa0710653d4ff4a4011993cb3dd04 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 17 Mar 2026 17:05:34 +0800 Subject: [PATCH] feat!: upgrade unplugin-vue to v7 and add release tooling --- .github/renovate.json5 | 6 +- .github/workflows/release.yml | 2 +- biome.json | 8 +- bump.config.ts | 7 + package.json | 16 +- playground/rsbuild/src/env.d.ts | 2 +- playground/rslib/src/Button.vue | 3 +- playground/rslib/src/Card.vue | 3 +- pnpm-lock.yaml | 849 ++++++++++------------------ src/index.ts | 2 +- test/rsbuild/rsbuild-test-helper.ts | 2 +- test/rsbuild/src/env.d.ts | 2 +- test/rslib/src/env.d.ts | 2 +- 13 files changed, 322 insertions(+), 582 deletions(-) create mode 100644 bump.config.ts diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 5017ff0..dadf8d2 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,10 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base", "schedule:monthly", "group:allNonMajor"], + "extends": [ + "config:recommended", + "schedule:monthly", + "group:allNonMajor" + ], "rangeStrategy": "bump", "packageRules": [{ "depTypeList": ["peerDependencies"], "enabled": false }] } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f7d728..1a83229 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: - # Run `npm run bump` to bump the version and create a git tag. + # Trigger on version tags or run manually. push: tags: - "v*" diff --git a/biome.json b/biome.json index c7c77ac..8448b83 100644 --- a/biome.json +++ b/biome.json @@ -1,8 +1,6 @@ { - "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", - "organizeImports": { - "enabled": true - }, + "$schema": "https://biomejs.dev/schemas/2.4.7/schema.json", + "assist": { "actions": { "source": { "organizeImports": "on" } } }, "vcs": { "enabled": true, "defaultBranch": "main", @@ -10,7 +8,7 @@ "useIgnoreFile": true }, "files": { - "ignore": ["./test/rslib/index.test.ts-snapshots/**"] + "includes": ["**", "!test/rslib/index.test.ts-snapshots"] }, "formatter": { "indentStyle": "space" diff --git a/bump.config.ts b/bump.config.ts new file mode 100644 index 0000000..f6df0c3 --- /dev/null +++ b/bump.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'bumpp'; + +export default defineConfig({ + commit: 'Release v%s', + tag: false, + push: false, +}); diff --git a/package.json b/package.json index 3e79c45..5f04f7f 100644 --- a/package.json +++ b/package.json @@ -14,26 +14,30 @@ "main": "./dist/index.js", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", - "files": ["dist"], + "files": [ + "dist" + ], "scripts": { "build": "rslib build", "dev": "rslib build --watch", + "format": "biome check . --write --unsafe", "lint": "biome check .", "lint:write": "biome check . --write", "prepare": "simple-git-hooks && npm run build", "test": "playwright test", - "bump": "npx bumpp" + "bump": "bumpp" }, "simple-git-hooks": { - "pre-commit": "npm run lint:write" + "pre-commit": "npm run format" }, "devDependencies": { - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.4.7", "@playwright/test": "^1.58.2", "@rsbuild/core": "2.0.0-beta.8", "@rsbuild/core-v1": "npm:@rsbuild/core@^1.7.3", "@rslib/core": "^0.20.0", - "@types/node": "^22.19.15", + "@types/node": "^25.5.0", + "bumpp": "^11.0.1", "playwright": "^1.58.2", "simple-git-hooks": "^2.13.1", "typescript": "^5.9.3", @@ -53,6 +57,6 @@ "registry": "https://registry.npmjs.org/" }, "dependencies": { - "unplugin-vue": "^6.2.0" + "unplugin-vue": "^7.1.1" } } diff --git a/playground/rsbuild/src/env.d.ts b/playground/rsbuild/src/env.d.ts index fd3fbbb..992774e 100644 --- a/playground/rsbuild/src/env.d.ts +++ b/playground/rsbuild/src/env.d.ts @@ -4,7 +4,7 @@ declare module '*.vue' { import type { DefineComponent } from 'vue'; // biome-ignore lint/complexity/noBannedTypes: reason - // biome-ignore lint/suspicious/noExplicitAny: + // biome-ignore lint/suspicious/noExplicitAny: Vue component typings use `any` here. const component: DefineComponent<{}, {}, any>; export default component; } diff --git a/playground/rslib/src/Button.vue b/playground/rslib/src/Button.vue index 35905fe..1663e72 100644 --- a/playground/rslib/src/Button.vue +++ b/playground/rslib/src/Button.vue @@ -1,7 +1,8 @@