Skip to content

Commit fc772db

Browse files
committed
chore: exclude private packages from version updates
1 parent 8fddb19 commit fc772db

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

packages/dts-built-test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@vue/dts-built-test",
33
"private": true,
4+
"version": "0.0.0",
45
"types": "dist/dts-built-test.d.ts",
56
"dependencies": {
67
"@vue/shared": "workspace:*",
78
"@vue/reactivity": "workspace:*",
89
"vue": "workspace:*"
9-
},
10-
"version": "3.3.8"
10+
}
1111
}

packages/dts-test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "dts-test",
33
"private": true,
4+
"version": "0.0.0",
45
"dependencies": {
56
"vue": "workspace:*",
67
"@vue/dts-built-test": "workspace:*"
7-
},
8-
"version": "3.3.8"
8+
}
99
}

packages/runtime-test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@vue/runtime-test",
3-
"version": "3.3.8",
4-
"description": "@vue/runtime-test",
53
"private": true,
4+
"version": "0.0.0",
5+
"description": "@vue/runtime-test",
66
"main": "index.js",
77
"module": "dist/runtime-test.esm-bundler.js",
88
"types": "dist/runtime-test.d.ts",

packages/sfc-playground/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@vue/sfc-playground",
3-
"version": "3.3.8",
4-
"type": "module",
53
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "vite build",

packages/template-explorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@vue/template-explorer",
3-
"version": "3.3.8",
43
"private": true,
4+
"version": "0.0.0",
55
"buildOptions": {
66
"formats": [
77
"global"

scripts/release.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ const skipGit = args.skipGit || args.canary
3333

3434
const packages = fs
3535
.readdirSync(path.resolve(__dirname, '../packages'))
36-
.filter(p => !p.endsWith('.ts') && !p.startsWith('.'))
36+
.filter(p => {
37+
const pkgRoot = path.resolve(__dirname, '../packages', p)
38+
if (fs.statSync(pkgRoot).isDirectory()) {
39+
const pkg = JSON.parse(
40+
fs.readFileSync(path.resolve(pkgRoot, 'package.json'), 'utf-8')
41+
)
42+
return !pkg.private
43+
}
44+
})
3745

3846
const isCorePackage = pkgName => {
3947
if (!pkgName) return
@@ -386,12 +394,6 @@ async function publishPackage(pkgName, version) {
386394
if (skippedPackages.includes(pkgName)) {
387395
return
388396
}
389-
const pkgRoot = getPkgRoot(pkgName)
390-
const pkgPath = path.resolve(pkgRoot, 'package.json')
391-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
392-
if (pkg.private) {
393-
return
394-
}
395397

396398
let releaseTag = null
397399
if (args.tag) {
@@ -419,7 +421,7 @@ async function publishPackage(pkgName, version) {
419421
...(skipGit ? ['--no-git-checks'] : [])
420422
],
421423
{
422-
cwd: pkgRoot,
424+
cwd: getPkgRoot(pkgName),
423425
stdio: 'pipe'
424426
}
425427
)

0 commit comments

Comments
 (0)