Skip to content

Commit cb8a390

Browse files
authored
Feat/vite8 (#279)
* feat: update dependencies * feat: migrate to vite8 * chore: update playground * chore: v8.0.0-beta.1 * fix: use strict, tla for await * chore: update example * chore: v8.0.0-beta.2 * revert: vite-vue-ts-starter.user.js
1 parent ff0c177 commit cb8a390

44 files changed

Lines changed: 4952 additions & 11600 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ auto-install-peers=false
33
registry="https://registry.npmjs.org/"
44
public-hoist-pattern[]=@unocss/cli
55
public-hoist-pattern[]=@unocss/core
6-
public-hoist-pattern[]=rollup
6+
public-hoist-pattern[]=rolldown
7+
public-hoist-pattern[]=@oxc-project/types

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
pnpm-lock.yaml
2-
pnpm-workspace.yaml
32
LICENCE
4-
53
dist

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export interface MonkeyOption {
311311

312312
/**
313313
* @default
314-
* const importCss = (css: string): void => {
314+
* const _css = (css: string): void => {
315315
* if (typeof GM_addStyle === 'function') {
316316
* GM_addStyle(css);
317317
* } else {
@@ -320,7 +320,7 @@ export interface MonkeyOption {
320320
* };
321321
* @example
322322
* // example1
323-
* importCss.toString()
323+
* _css.toString()
324324
*
325325
* // example2
326326
* `(a)=>GM_addStyle(a)`

README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export interface MonkeyOption {
311311

312312
/**
313313
* @default
314-
* const importCss = (css: string): void => {
314+
* const _css = (css: string): void => {
315315
* if (typeof GM_addStyle === 'function') {
316316
* GM_addStyle(css);
317317
* } else {
@@ -320,7 +320,7 @@ export interface MonkeyOption {
320320
* };
321321
* @example
322322
* // example1
323-
* importCss.toString()
323+
* _css.toString()
324324
*
325325
* // example2
326326
* `(a)=>GM_addStyle(a)`

eslint.config.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import eslint from '@eslint/js';
2-
import tsEslint from 'typescript-eslint';
1+
import { defineConfig } from 'eslint/config';
2+
import js from '@eslint/js';
3+
import ts from 'typescript-eslint';
4+
import prettier from 'eslint-config-prettier/flat';
35
import unusedImports from 'eslint-plugin-unused-imports';
4-
import eslintConfigPrettier from 'eslint-config-prettier';
56

6-
export default tsEslint.config(
7-
eslint.configs.recommended,
8-
...tsEslint.configs.recommended,
9-
eslintConfigPrettier,
7+
export default defineConfig(
8+
js.configs.recommended,
9+
ts.configs.recommended,
1010
{
1111
plugins: {
1212
'unused-imports': unusedImports,
@@ -44,4 +44,5 @@ export default tsEslint.config(
4444
'packages/vite-plugin-monkey/*.d.ts',
4545
],
4646
},
47+
prettier,
4748
);

package.json

Lines changed: 40 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,73 +7,58 @@
77
"format": "prettier --cache --write --ignore-unknown .",
88
"lint": "eslint --cache --fix .",
99
"build": "pnpm -r --filter=./packages/* build",
10-
"build:playground": "pnpm -r --filter=./playground/* build",
11-
"ci-publish": "tsx scripts/publishCI.ts"
10+
"build:playground": "pnpm -r --filter=./playground/* build"
1211
},
1312
"dependencies": {
14-
"@commitlint/cli": "19.8.1",
15-
"@commitlint/config-conventional": "19.8.1",
16-
"@commitlint/types": "19.8.1",
17-
"@eslint/js": "9.33.0",
13+
"@eslint/js": "10.0.1",
1814
"@types/cross-spawn": "6.0.6",
1915
"@types/fs-extra": "11.0.4",
2016
"@types/minimist": "1.2.5",
21-
"@types/node": "24.3.0",
17+
"@types/node": "25.6.0",
2218
"@types/postcss-url": "10.0.4",
2319
"@types/prompts": "2.4.9",
24-
"@types/react": "19.1.10",
25-
"@types/react-dom": "19.1.7",
26-
"@types/semver": "7.7.0",
27-
"@vitejs/plugin-legacy": "7.2.1",
28-
"@vitejs/plugin-react": "5.0.0",
29-
"@vitejs/plugin-vue": "6.0.1",
30-
"acorn": "8.15.0",
31-
"acorn-walk": "8.3.4",
32-
"element-plus": "2.10.7",
33-
"eslint": "9.33.0",
20+
"@types/react": "19.2.14",
21+
"@types/react-dom": "19.2.3",
22+
"@types/semver": "7.7.1",
23+
"@vitejs/plugin-legacy": "8.0.1",
24+
"@vitejs/plugin-react": "6.0.1",
25+
"@vitejs/plugin-vue": "6.0.6",
26+
"acorn": "8.16.0",
27+
"acorn-walk": "8.3.5",
28+
"element-plus": "2.13.7",
29+
"eslint": "10.2.0",
3430
"eslint-config-prettier": "10.1.8",
35-
"eslint-plugin-unused-imports": "4.2.0",
36-
"execa": "9.6.0",
37-
"fs-extra": "11.3.1",
38-
"lint-staged": "16.1.5",
39-
"magic-string": "0.30.17",
31+
"eslint-plugin-unused-imports": "4.4.1",
32+
"execa": "9.6.1",
33+
"fs-extra": "11.3.4",
34+
"lint-staged": "16.4.0",
35+
"magic-string": "0.30.21",
4036
"minimist": "1.2.8",
4137
"normalize.css": "8.0.1",
4238
"picocolors": "1.1.1",
43-
"pinia": "3.0.3",
39+
"pinia": "3.0.4",
4440
"postcss-url": "10.1.3",
45-
"prettier": "3.6.2",
46-
"react": "19.1.1",
47-
"react-dom": "19.1.1",
48-
"sass-embedded": "1.90.0",
49-
"semver": "7.7.2",
41+
"prettier": "3.8.2",
42+
"react": "19.2.5",
43+
"react-dom": "19.2.5",
44+
"sass-embedded": "1.99.0",
45+
"semver": "7.7.4",
5046
"simple-git-hooks": "2.13.1",
51-
"solid-js": "1.9.9",
52-
"terser": "5.43.1",
53-
"tsup": "8.5.0",
54-
"tsx": "4.20.4",
55-
"typescript": "5.9.2",
56-
"typescript-eslint": "8.40.0",
57-
"unimport": "5.2.0",
58-
"unocss": "66.4.2",
59-
"unplugin-auto-import": "20.0.0",
60-
"vite": "7.1.2",
61-
"vite-plugin-solid": "2.11.8",
62-
"vue": "3.5.18"
47+
"solid-js": "1.9.12",
48+
"terser": "5.46.1",
49+
"tsdown": "0.21.10",
50+
"tsx": "4.21.0",
51+
"typescript": "6.0.2",
52+
"typescript-eslint": "8.58.1",
53+
"unimport": "6.1.0",
54+
"unocss": "66.6.8",
55+
"unplugin-auto-import": "21.0.0",
56+
"vite": "8.0.8",
57+
"vite-plugin-solid": "2.11.12",
58+
"vue": "3.5.32"
6359
},
6460
"simple-git-hooks": {
65-
"pre-commit": "pnpm exec lint-staged",
66-
"commit-msg": "pnpm exec commitlint --edit $1"
67-
},
68-
"commitlint": {
69-
"extends": [
70-
"@commitlint/config-conventional"
71-
],
72-
"rules": {
73-
"subject-case": [
74-
0
75-
]
76-
}
61+
"pre-commit": "pnpm exec lint-staged"
7762
},
7863
"lint-staged": {
7964
"*.{js,cjs,mjs,ts}": [
@@ -85,8 +70,8 @@
8570
]
8671
},
8772
"volta": {
88-
"node": "24.4.1",
89-
"pnpm": "10.14.0"
73+
"node": "24.15.0",
74+
"pnpm": "10.33.2"
9075
},
91-
"packageManager": "pnpm@10.14.0"
76+
"packageManager": "pnpm@10.33.2"
9277
}

packages/create-monkey/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,24 @@
22
"name": "create-monkey",
33
"version": "1.43.0",
44
"description": "create-monkey",
5-
"main": "index.js",
5+
"main": "dist/index.mjs",
66
"type": "module",
77
"bin": {
8-
"create-monkey": "index.js"
8+
"create-monkey": "dist/index.mjs"
99
},
1010
"publishConfig": {
1111
"registry": "https://registry.npmjs.org/"
1212
},
1313
"engines": {
14-
"node": ">=14.18.0"
14+
"node": ">=20"
1515
},
1616
"files": [
17-
"index.js",
1817
"dist",
1918
"template-*"
2019
],
2120
"scripts": {
2221
"prebuild": "tsc",
23-
"build": "tsup"
22+
"build": "tsdown"
2423
},
2524
"keywords": [
2625
"create",

packages/create-monkey/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"compilerOptions": {
44
"rootDir": "./"
55
},
6-
"include": ["src", "tsup.config.ts", "scripts"]
6+
"include": ["src", "tsdown.config.ts", "scripts"]
77
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { defineConfig } from 'tsup';
1+
import { defineConfig } from 'tsdown';
22

33
export default defineConfig({
44
entry: ['src/index.ts'],
55
sourcemap: true,
66
clean: true,
77
outDir: 'dist',
88
format: 'esm',
9+
banner: { js: '#!/usr/bin/env node' },
910
});

packages/vite-plugin-monkey/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "vite-plugin-monkey",
3-
"version": "7.1.9",
3+
"version": "8.0.0-beta.2",
44
"description": "A vite plugin server and build your.user.js for userscript engine like Tampermonkey and Violentmonkey and Greasemonkey",
55
"main": "dist/node/index.mjs",
6-
"types": "dist/node/index.d.ts",
6+
"types": "dist/node/index.d.mts",
77
"type": "module",
88
"sideEffects": false,
99
"files": [
@@ -17,7 +17,7 @@
1717
},
1818
"scripts": {
1919
"prebuild": "tsc",
20-
"build": "tsup",
20+
"build": "tsdown",
2121
"postbuild": "tsx ./scripts/postbuild.ts",
2222
"postpublish": "curl -X PUT https://registry-direct.npmmirror.com/vite-plugin-monkey/sync"
2323
},
@@ -44,20 +44,20 @@
4444
},
4545
"homepage": "https://github.com/lisonge/vite-plugin-monkey#readme",
4646
"dependencies": {
47-
"acorn": "^8.15.0",
48-
"acorn-walk": "^8.3.4",
47+
"acorn-walk": "^8.3.5",
4948
"cross-spawn": "^7.0.6",
50-
"htmlparser2": "^10.0.0",
51-
"import-meta-resolve": "^4.1.0",
52-
"magic-string": "^0.30.17",
49+
"htmlparser2": "^12.0.0",
50+
"import-meta-resolve": "^4.2.0",
51+
"magic-string": "^0.30.21",
5352
"mrmime": "^2.0.1",
54-
"open": "^10.2.0",
53+
"open": "^11.0.0",
5554
"picocolors": "^1.1.1",
5655
"postcss-url": "^10.1.3",
56+
"rollup": "^4.60.2",
5757
"systemjs": "^6.15.1"
5858
},
5959
"peerDependencies": {
60-
"vite": "^6.0.0 || ^7.0.0"
60+
"vite": "^8.0.0"
6161
},
6262
"peerDependenciesMeta": {
6363
"vite": {

0 commit comments

Comments
 (0)