chore: use pnpm workspace protocol internally (#19962)

This commit is contained in:
Daniel Roe 2023-03-28 17:53:00 +02:00 committed by GitHub
parent dbc6ed9499
commit cb154c9f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 15 deletions

View File

@ -20,7 +20,7 @@
"prepack": "unbuild" "prepack": "unbuild"
}, },
"dependencies": { "dependencies": {
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"c12": "^1.2.0", "c12": "^1.2.0",
"consola": "^2.15.3", "consola": "^2.15.3",
"defu": "^6.1.2", "defu": "^6.1.2",

View File

@ -18,8 +18,8 @@
"prepack": "unbuild" "prepack": "unbuild"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/kit": "3.3.2", "@nuxt/kit": "workspace:../kit",
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"@types/clear": "^0.1.2", "@types/clear": "^0.1.2",
"@types/flat": "^5.0.2", "@types/flat": "^5.0.2",
"@types/mri": "^1.1.1", "@types/mri": "^1.1.1",

View File

@ -61,11 +61,11 @@
}, },
"dependencies": { "dependencies": {
"@nuxt/devalue": "^2.0.0", "@nuxt/devalue": "^2.0.0",
"@nuxt/kit": "3.3.2", "@nuxt/kit": "workspace:../kit",
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"@nuxt/telemetry": "^2.1.10", "@nuxt/telemetry": "^2.1.10",
"@nuxt/ui-templates": "^1.1.1", "@nuxt/ui-templates": "^1.1.1",
"@nuxt/vite-builder": "3.3.2", "@nuxt/vite-builder": "workspace:../vite",
"@unhead/ssr": "^1.1.25", "@unhead/ssr": "^1.1.25",
"@unhead/vue": "^1.1.25", "@unhead/vue": "^1.1.25",
"@vue/reactivity": "^3.2.47", "@vue/reactivity": "^3.2.47",
@ -86,7 +86,7 @@
"magic-string": "^0.30.0", "magic-string": "^0.30.0",
"mlly": "^1.2.0", "mlly": "^1.2.0",
"nitropack": "~2.3.2", "nitropack": "~2.3.2",
"nuxi": "3.3.2", "nuxi": "workspace:../nuxi",
"ofetch": "^1.0.1", "ofetch": "^1.0.1",
"ohash": "^1.0.0", "ohash": "^1.0.0",
"pathe": "^1.1.0", "pathe": "^1.1.0",

View File

@ -18,8 +18,8 @@
"prepack": "unbuild" "prepack": "unbuild"
}, },
"dependencies": { "dependencies": {
"@nuxt/kit": "3.3.2", "@nuxt/kit": "workspace:../kit",
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"consola": "^2.15.3", "consola": "^2.15.3",
"defu": "^6.1.2", "defu": "^6.1.2",
"execa": "^7.1.1", "execa": "^7.1.1",

View File

@ -18,12 +18,12 @@
"prepack": "unbuild" "prepack": "unbuild"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"unbuild": "latest", "unbuild": "latest",
"vue": "3.2.47" "vue": "3.2.47"
}, },
"dependencies": { "dependencies": {
"@nuxt/kit": "3.3.2", "@nuxt/kit": "workspace:../kit",
"@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-replace": "^5.0.2",
"@vitejs/plugin-vue": "^4.1.0", "@vitejs/plugin-vue": "^4.1.0",
"@vitejs/plugin-vue-jsx": "^3.0.1", "@vitejs/plugin-vue-jsx": "^3.0.1",

View File

@ -21,7 +21,7 @@
"dependencies": { "dependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.21.3",
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2", "@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
"@nuxt/kit": "3.3.2", "@nuxt/kit": "workspace:../kit",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^5.0.0", "css-minimizer-webpack-plugin": "^5.0.0",
@ -60,7 +60,7 @@
"webpackbar": "^5.0.2" "webpackbar": "^5.0.2"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/schema": "3.3.2", "@nuxt/schema": "workspace:../schema",
"@types/lodash-es": "^4.17.7", "@types/lodash-es": "^4.17.7",
"@types/pify": "^5.0.1", "@types/pify": "^5.0.1",
"@types/webpack-bundle-analyzer": "^4.6.0", "@types/webpack-bundle-analyzer": "^4.6.0",

View File

@ -69,8 +69,10 @@ export async function loadWorkspace (dir: string) {
} }
} }
const setVersion = (name: string, newVersion: string) => { const setVersion = (name: string, newVersion: string, opts: { updateDeps?: boolean } = {}) => {
find(name).data.version = newVersion find(name).data.version = newVersion
if (!opts.updateDeps) { return }
for (const pkg of packages) { for (const pkg of packages) {
pkg.updateDeps((dep) => { pkg.updateDeps((dep) => {
if (dep.name === name) { if (dep.name === name) {

View File

@ -26,7 +26,9 @@ async function main () {
for (const pkg of workspace.packages.filter(p => !p.data.private)) { for (const pkg of workspace.packages.filter(p => !p.data.private)) {
const newVersion = inc(pkg.data.version, bumpType || 'patch') const newVersion = inc(pkg.data.version, bumpType || 'patch')
workspace.setVersion(pkg.data.name, `${newVersion}-${date}.${commit}`) workspace.setVersion(pkg.data.name, `${newVersion}-${date}.${commit}`, {
updateDeps: true
})
const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge') const newname = pkg.data.name === 'nuxt' ? 'nuxt3' : (pkg.data.name + '-edge')
workspace.rename(pkg.data.name, newname) workspace.rename(pkg.data.name, newname)
} }