chore: exclude private packages from version updates

This commit is contained in:
Evan You 2023-11-21 09:37:37 +08:00
parent 8fddb19c3a
commit fc772dbf73
6 changed files with 19 additions and 17 deletions

View File

@ -1,11 +1,11 @@
{
"name": "@vue/dts-built-test",
"private": true,
"version": "0.0.0",
"types": "dist/dts-built-test.d.ts",
"dependencies": {
"@vue/shared": "workspace:*",
"@vue/reactivity": "workspace:*",
"vue": "workspace:*"
},
"version": "3.3.8"
}
}

View File

@ -1,9 +1,9 @@
{
"name": "dts-test",
"private": true,
"version": "0.0.0",
"dependencies": {
"vue": "workspace:*",
"@vue/dts-built-test": "workspace:*"
},
"version": "3.3.8"
}
}

View File

@ -1,8 +1,8 @@
{
"name": "@vue/runtime-test",
"version": "3.3.8",
"description": "@vue/runtime-test",
"private": true,
"version": "0.0.0",
"description": "@vue/runtime-test",
"main": "index.js",
"module": "dist/runtime-test.esm-bundler.js",
"types": "dist/runtime-test.d.ts",

View File

@ -1,8 +1,8 @@
{
"name": "@vue/sfc-playground",
"version": "3.3.8",
"type": "module",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",

View File

@ -1,7 +1,7 @@
{
"name": "@vue/template-explorer",
"version": "3.3.8",
"private": true,
"version": "0.0.0",
"buildOptions": {
"formats": [
"global"

View File

@ -33,7 +33,15 @@ const skipGit = args.skipGit || args.canary
const packages = fs
.readdirSync(path.resolve(__dirname, '../packages'))
.filter(p => !p.endsWith('.ts') && !p.startsWith('.'))
.filter(p => {
const pkgRoot = path.resolve(__dirname, '../packages', p)
if (fs.statSync(pkgRoot).isDirectory()) {
const pkg = JSON.parse(
fs.readFileSync(path.resolve(pkgRoot, 'package.json'), 'utf-8')
)
return !pkg.private
}
})
const isCorePackage = pkgName => {
if (!pkgName) return
@ -386,12 +394,6 @@ async function publishPackage(pkgName, version) {
if (skippedPackages.includes(pkgName)) {
return
}
const pkgRoot = getPkgRoot(pkgName)
const pkgPath = path.resolve(pkgRoot, 'package.json')
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
if (pkg.private) {
return
}
let releaseTag = null
if (args.tag) {
@ -419,7 +421,7 @@ async function publishPackage(pkgName, version) {
...(skipGit ? ['--no-git-checks'] : [])
],
{
cwd: pkgRoot,
cwd: getPkgRoot(pkgName),
stdio: 'pipe'
}
)