Skip to content

Commit

Permalink
perf: update to vite 5.x
Browse files Browse the repository at this point in the history
replace `tiny-glob` with `fast-glob`
  • Loading branch information
hemengke1997 committed Feb 7, 2024
1 parent 51bf31d commit 430dc52
Show file tree
Hide file tree
Showing 8 changed files with 1,835 additions and 2,491 deletions.
3 changes: 0 additions & 3 deletions TODO.md

This file was deleted.

66 changes: 34 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-public-typescript",
"version": "2.2.5",
"description": "vite plugin for inject typescript into html. 在html中注入ts脚本的vite插件",
"description": "vite plugin for inject public typescript into html. (Think it as compiled public javascript)",
"type": "module",
"keywords": [
"vite",
Expand Down Expand Up @@ -47,16 +47,17 @@
}
},
"scripts": {
"dev": "simple-git-hooks && rm -rf dist && tsup --watch",
"dev": "simple-git-hooks && tsup --watch",
"build": "rm -rf dist && tsup",
"build:pages": "pnpm run build && cd playground/spa && pnpm run build",
"test": "run-s test:unit test:serve test:build",
"test:unit": "vitest run",
"test:serve": "vitest run -c vitest.config.e2e.ts",
"test:build": "cross-env VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts",
"commitlint": "commitlint -e",
"lint": "eslint . --fix",
"up": "pnpm update --i --L",
"taze": "taze -I -r -w",
"taze": "taze -I -w",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"bump": "bumpp package.json -c -p -t --all -x \"pnpm run changelog\""
},
Expand All @@ -65,53 +66,54 @@
},
"dependencies": {
"@antfu/install-pkg": "^0.1.1",
"@babel/core": "^7.22.20",
"@babel/preset-env": "^7.22.20",
"@babel/preset-typescript": "^7.22.20",
"browserslist": "^4.22.1",
"core-js": "^3.32.2",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-typescript": "^7.23.3",
"browserslist": "^4.22.3",
"core-js": "^3.35.1",
"debug": "^4.3.4",
"esbuild": "^0.19.5",
"esbuild": "^0.19.12",
"esbuild-plugin-browserslist": "^0.10.0",
"fs-extra": "^11.1.1",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"local-pkg": "^0.5.0",
"magic-string": "^0.30.5",
"magic-string": "^0.30.7",
"on-change": "^4.0.2",
"parse5": "^7.1.2",
"picocolors": "^1.0.0",
"prompts": "^2.4.2",
"std-env": "^3.5.0",
"tiny-glob": "^0.2.9",
"std-env": "^3.7.0",
"watcher": "^2.3.0"
},
"devDependencies": {
"@commitlint/cli": "^18.2.0",
"@minko-fe/commitlint-config": "^2.0.5",
"@minko-fe/eslint-config": "^2.0.5",
"@minko-fe/tsconfig": "^2.0.5",
"@types/babel__core": "^7.20.2",
"@types/babel__preset-env": "^7.9.4",
"@types/debug": "^4.1.10",
"@types/fs-extra": "^11.0.3",
"@types/node": "^20.8.9",
"@types/prompts": "^2.4.8",
"bumpp": "^9.2.0",
"@commitlint/cli": "^18.6.0",
"@minko-fe/commitlint-config": "^2.0.7",
"@minko-fe/eslint-config": "^2.1.2",
"@minko-fe/tsconfig": "^2.0.7",
"@types/babel__core": "^7.20.5",
"@types/babel__preset-env": "^7.9.6",
"@types/debug": "^4.1.12",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.11.16",
"@types/prompts": "^2.4.9",
"bumpp": "^9.3.0",
"conventional-changelog-cli": "^4.1.0",
"cross-env": "^7.0.3",
"eslint": "^8.52.0",
"npm-run-all": "^4.1.5",
"eslint": "^8.56.0",
"npm-run-all2": "^6.1.2",
"simple-git-hooks": "^2.9.0",
"taze": "^0.12.0",
"tsup": "^7.0.0",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.5",
"taze": "^0.12.3",
"tsup": "^6.7.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"vitest": "^0.34.6",
"vitest-e2e": "^0.0.10"
},
"engines": {
"node": ">=16.0.0"
},
"simple-git-hooks": {
"commit-msg": "pnpm exec commitlint -e"
"commit-msg": "npm run commitlint",
"pre-commit": "npm run lint"
}
}
2 changes: 1 addition & 1 deletion playground/spa-file-mode/__tests__/file-mode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { listFiles, readFile } from '~utils'
import glob from 'fast-glob'
import fs from 'fs-extra'
import path from 'node:path'
import glob from 'tiny-glob'
import { beforeAll, describe, expect, test } from 'vitest'

const manifestPath = 'node_modules/.vite-plugin-public-typescript/manifest.json'
Expand Down
4 changes: 2 additions & 2 deletions playground/spa-file-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"devDependencies": {
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@vitejs/plugin-react": "^4.1.0",
"@vitejs/plugin-react": "^4.2.1",
"cross-env": "^7.0.3",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite": "^5.0.12",
"vite-plugin-public-typescript": "workspace:*"
}
}
6 changes: 3 additions & 3 deletions playground/spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@babel/preset-react": "^7.23.3",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@vitejs/plugin-legacy": "^4.0.0",
"@vitejs/plugin-react": "^4.1.0",
"@vitejs/plugin-legacy": "^5.3.0",
"@vitejs/plugin-react": "^4.2.1",
"cross-env": "^7.0.3",
"terser": "^5.26.0",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite": "^5.0.12",
"vite-plugin-public-typescript": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions playground/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"devDependencies": {
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@vitejs/plugin-react": "^4.1.0",
"@vitejs/plugin-react": "^4.2.1",
"compression": "^1.7.4",
"express": "^4.18.2",
"serve-static": "^1.15.0",
"tsx": "^3.14.0",
"vite": "^4.5.0"
"vite": "^5.0.12"
}
}
Loading

0 comments on commit 430dc52

Please sign in to comment.