Skip to content

Commit b6bb4c0

Browse files
committed
refactor(common)!: migrate to unplugin-utils
1 parent 53a9b38 commit b6bb4c0

File tree

8 files changed

+13
-134
lines changed

8 files changed

+13
-134
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"@sxzz/eslint-config": "^5.1.1",
4040
"@sxzz/prettier-config": "^2.2.0",
4141
"@types/node": "^22.13.4",
42-
"@types/picomatch": "^3.0.2",
4342
"@unocss/eslint-plugin": "^66.0.0",
4443
"@vitest/coverage-v8": "catalog:",
4544
"@vitest/ui": "catalog:",

packages/common/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
"ast-kit": "^1.4.0",
6666
"local-pkg": "^1.0.0",
6767
"magic-string-ast": "^0.7.0",
68-
"pathe": "^2.0.3",
69-
"picomatch": "^4.0.2"
68+
"unplugin-utils": "^0.2.4"
7069
},
7170
"devDependencies": {
7271
"@babel/parser": "catalog:",

packages/common/src/filter.ts

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

packages/common/src/general.ts

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

packages/common/src/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
export * from 'magic-string-ast'
22
export * from 'ast-kit'
3+
export {
4+
createFilter as createRollupFilter,
5+
normalizePath,
6+
type FilterPattern,
7+
} from 'unplugin-utils'
38

49
export * from './ast'
510
export * from './constants'
611
export * from './dep'
7-
export * from './filter'
8-
export * from './general'
912
export * from './options'
10-
export * from './path'
1113
export * from './types'
1214
export * from './unplugin'
1315
export * from './vue'

packages/common/src/path.ts

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

packages/common/src/unplugin.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { generateTransform, type CodeTransform } from 'magic-string-ast'
2+
import {
3+
createFilter as createRollupFilter,
4+
type FilterPattern,
5+
} from 'unplugin-utils'
26
import {
37
REGEX_SETUP_SFC,
48
REGEX_SRC_FILE,
59
REGEX_VUE_SFC,
610
REGEX_VUE_SUB,
711
REGEX_VUE_SUB_SETUP,
812
} from './constants'
9-
import { createRollupFilter, type FilterPattern } from './filter'
1013
import type { ResolvedOptions } from '@vitejs/plugin-vue'
1114
import type { Plugin } from 'rollup'
1215
import type { HmrContext, Plugin as VitePlugin } from 'vite'

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)