Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: remove unused deps and add implicit deps #20356

Merged
merged 3 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,31 @@
},
"devDependencies": {
"@actions/core": "^1.10.0",
"@nuxt/kit": "workspace:*",
"@nuxt/schema": "workspace:*",
"@nuxt/test-utils": "workspace:*",
"@nuxt/vite-builder": "workspace:*",
"@nuxt/webpack-builder": "workspace:*",
"@nuxtjs/eslint-config-typescript": "^12.0.0",
"@types/crawler": "^1.2.2",
"@types/node": "^18.15.11",
"@types/rimraf": "^3.0.2",
"@types/semver": "^7.3.13",
"@unocss/reset": "^0.51.4",
"case-police": "^0.5.14",
"changelogen": "^0.5.3",
"crawler": "^1.4.0",
"devalue": "^4.3.0",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsdoc": "^41.1.2",
"execa": "^7.1.1",
"expect-type": "^0.15.0",
"fs-extra": "^11.1.1",
"globby": "^13.1.4",
"h3": "^1.6.4",
"jiti": "^1.18.2",
"markdownlint-cli": "^0.33.0",
"nuxi": "workspace:*",
"nuxt": "workspace:*",
"ofetch": "^1.0.1",
"pathe": "^1.1.0",
"playwright": "^1.32.3",
"rimraf": "^5.0.0",
"semver": "^7.5.0",
"std-env": "^3.3.2",
Expand All @@ -77,6 +77,8 @@
"unbuild": "^1.2.1",
"vite": "^4.2.2",
"vitest": "^0.30.1",
"vue": "3.2.47",
"vue-eslint-parser": "^9.1.1",
"vue-tsc": "^1.2.0"
},
"packageManager": "pnpm@8.3.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@
"untyped": "^1.3.2"
},
"devDependencies": {
"@types/hash-sum": "^1.0.0",
"@types/lodash.template": "^4.5.1",
"@types/semver": "^7.3.13",
"unbuild": "latest"
"nitropack": "^2.3.3",
"unbuild": "latest",
"vite": "^4.2.1",
"vitest": "^0.30.1",
"webpack": "^5.79.0"
},
"engines": {
"node": "^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
3 changes: 3 additions & 0 deletions packages/nuxi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"colorette": "^2.0.20",
"consola": "^3.1.0",
"deep-object-diff": "^1.1.9",
"defu": "^6.1.2",
"destr": "^1.2.2",
"execa": "^7.1.1",
"flat": "^5.0.2",
Expand All @@ -40,11 +41,13 @@
"listhen": "^1.0.4",
"mlly": "^1.2.0",
"mri": "^1.2.0",
"ohash": "^1.0.0",
"pathe": "^1.1.0",
"perfect-debounce": "^0.1.3",
"pkg-types": "^1.0.2",
"scule": "^1.0.0",
"semver": "^7.5.0",
"ufo": "^1.1.1",
"unbuild": "latest"
},
"optionalDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/nuxt/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default defineBuildConfig({
externals: [
'nuxt',
'nuxt/schema',
'@vue/reactivity',
'@vue/shared',
'@unhead/vue'
]
Expand Down
14 changes: 6 additions & 8 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
"#app": {
"types": "./dist/app/index.d.ts",
"import": "./dist/app/index.js"
},
"#pages": {
"types": "./dist/pages/runtime/index.d.ts",
"import": "./dist/pages/runtime/index.js"
}
},
"files": [
Expand All @@ -64,7 +60,6 @@
"@nuxt/vite-builder": "workspace:../vite",
"@unhead/ssr": "^1.1.26",
"@unhead/vue": "^1.1.26",
"@vue/reactivity": "^3.2.47",
"@vue/shared": "^3.2.47",
"chokidar": "^3.5.3",
"cookie-es": "^0.5.0",
Expand All @@ -76,7 +71,6 @@
"fs-extra": "^11.1.1",
"globby": "^13.1.4",
"h3": "^1.6.4",
"hash-sum": "^2.0.0",
"hookable": "^5.5.3",
"jiti": "^1.18.2",
"knitwork": "^1.0.0",
Expand Down Expand Up @@ -105,10 +99,14 @@
"vue-router": "^4.1.6"
},
"devDependencies": {
"@types/estree": "^1.0.0",
"@types/fs-extra": "^11.0.1",
"@types/hash-sum": "^1.0.0",
"@types/prompts": "^2.4.4",
"unbuild": "latest"
"@vitejs/plugin-vue": "^4.1.0",
"acorn": "^8.8.2",
"unbuild": "latest",
"vite": "^4.2.1",
"vitest": "^0.30.1"
},
"peerDependencies": {
"@types/node": "^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
14 changes: 7 additions & 7 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@
"prepack": "unbuild"
},
"devDependencies": {
"@types/lodash.template": "^4.5.1",
"@types/semver": "^7.3.13",
"@unhead/schema": "^1.1.26",
"@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"h3": "^1.6.4",
"ignore": "^5.2.4",
"nitropack": "^2.3.3",
"unbuild": "latest",
"unctx": "^2.3.0",
"vite": "~4.2.2"
"vite": "~4.2.2",
"vue": "3.2.47",
"vue-bundle-renderer": "^1.0.3",
"vue-router": "^4.1.6",
"webpack": "^5.79.0"
},
"dependencies": {
"c12": "^1.3.0",
"create-require": "^1.1.1",
"defu": "^6.1.2",
"hookable": "^5.5.3",
"jiti": "^1.18.2",
"pathe": "^1.1.0",
"pkg-types": "^1.0.2",
"postcss-import-resolver": "^2.0.0",
"scule": "^1.0.0",
"std-env": "^3.3.2",
"ufo": "^1.1.1",
"unimport": "^3.0.6",
Expand Down
1 change: 0 additions & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"defu": "^6.1.2",
"execa": "^7.1.1",
"get-port-please": "^3.0.1",
"jiti": "^1.18.2",
"ofetch": "^1.0.1",
"pathe": "^1.1.0",
"ufo": "^1.1.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/src/setup/jest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { TestHooks } from '../types'

export default async function setupJest (hooks: TestHooks) {
// @ts-expect-error jest is not a dependency
// @ts-expect-error TODO: jest is not a dependency
const jest = await import('jest')

hooks.ctx.mockFn = jest.fn
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"devDependencies": {
"@nuxt/schema": "workspace:../schema",
"@types/estree": "^1.0.0",
"unbuild": "latest",
"vue": "3.2.47"
},
Expand All @@ -28,7 +29,6 @@
"@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"autoprefixer": "^10.4.14",
"chokidar": "^3.5.3",
"clear": "^0.1.0",
"cssnano": "^6.0.0",
"defu": "^6.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type * as vite from 'vite'
import { logger } from '@nuxt/kit'
import { hasTTY, isCI } from 'std-env'
import clear from 'clear'
import type { NuxtOptions } from 'nuxt/schema'
import type { NuxtOptions } from '@nuxt/schema'

let duplicateCount = 0
let lastType: vite.LogType | null = null
Expand Down
4 changes: 1 addition & 3 deletions packages/webpack/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ export default defineBuildConfig({
'vue-loader',
'css-loader',
'file-loader',
'style-resources-loader',
'url-loader',
'vue'
],
externals: [
'@nuxt/schema',
'h3'
'@nuxt/schema'
]
})
3 changes: 1 addition & 2 deletions packages/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"prepack": "unbuild"
},
"dependencies": {
"@babel/core": "^7.21.4",
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
"@nuxt/kit": "workspace:../kit",
"autoprefixer": "^10.4.14",
Expand All @@ -32,6 +31,7 @@
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"fs-extra": "^11.1.1",
"h3": "^1.6.4",
"hash-sum": "^2.0.0",
"lodash-es": "^4.17.21",
"magic-string": "^0.30.0",
Expand All @@ -45,7 +45,6 @@
"postcss-import": "^15.1.0",
"postcss-loader": "^7.2.4",
"postcss-url": "^10.1.3",
"style-resources-loader": "^1.5.0",
"time-fix-plugin": "^2.0.7",
"ufo": "^1.1.1",
"unplugin": "^1.3.1",
Expand Down
Loading