@@ -51,9 +51,6 @@ const { values: args, positionals } = parseArgs({
51
51
skipPrompts : {
52
52
type : 'boolean' ,
53
53
} ,
54
- vapor : {
55
- type : 'boolean' ,
56
- } ,
57
54
} ,
58
55
} )
59
56
@@ -63,9 +60,8 @@ const isDryRun = args.dry
63
60
let skipTests = args . skipTests
64
61
const skipBuild = args . skipBuild
65
62
const isCanary = args . canary
66
- const isVapor = args . vapor
67
- const skipPrompts = args . skipPrompts || args . canary || args . vapor
68
- const skipGit = args . skipGit || args . canary || args . vapor
63
+ const skipPrompts = args . skipPrompts || args . canary
64
+ const skipGit = args . skipGit || args . canary
69
65
70
66
const packages = fs
71
67
. readdirSync ( path . resolve ( __dirname , '../packages' ) )
@@ -82,11 +78,7 @@ const packages = fs
82
78
const isCorePackage = ( /** @type {string } */ pkgName ) => {
83
79
if ( ! pkgName ) return
84
80
85
- if (
86
- pkgName === 'vue' ||
87
- pkgName === '@vue/compat' ||
88
- pkgName === '@vue/vapor'
89
- ) {
81
+ if ( pkgName === 'vue' || pkgName === '@vue/compat' ) {
90
82
return true
91
83
}
92
84
@@ -108,18 +100,6 @@ const renamePackageToCanary = (/** @type {string} */ pkgName) => {
108
100
return pkgName
109
101
}
110
102
111
- const renamePackageToVapor = ( /** @type {string } */ pkgName ) => {
112
- if ( pkgName === 'vue' ) {
113
- return '@vue-vapor/vue'
114
- }
115
-
116
- if ( isCorePackage ( pkgName ) ) {
117
- return pkgName . replace ( / ^ @ v u e \/ / , '@vue-vapor/' )
118
- }
119
-
120
- return pkgName
121
- }
122
-
123
103
const keepThePackageName = ( /** @type {string } */ pkgName ) => pkgName
124
104
125
105
/** @type {string[] } */
@@ -161,53 +141,45 @@ async function main() {
161
141
162
142
let targetVersion = positionals [ 0 ]
163
143
164
- if ( isCanary || isVapor ) {
165
- const major = semver . major ( currentVersion )
166
- let newVersion
167
-
144
+ if ( isCanary ) {
168
145
// The canary version string format is `3.yyyyMMdd.0` (or `3.yyyyMMdd.0-minor.0` for minor)
169
146
// Use UTC date so that it's consistent across CI and maintainers' machines
170
147
const date = new Date ( )
171
148
const yyyy = date . getUTCFullYear ( )
172
149
const MM = ( date . getUTCMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' )
173
150
const dd = date . getUTCDate ( ) . toString ( ) . padStart ( 2 , '0' )
151
+
152
+ const major = semver . major ( currentVersion )
174
153
const datestamp = `${ yyyy } ${ MM } ${ dd } `
154
+ let canaryVersion
175
155
176
- if ( isCanary ) {
177
- newVersion = `${ major } .${ datestamp } .0`
178
- if ( args . tag && args . tag !== 'latest' ) {
179
- newVersion = `${ major } .${ datestamp } .0-${ args . tag } .0`
180
- }
181
- } else {
182
- newVersion = `${ major } .${ datestamp } .0-${ await getSha ( true ) } `
156
+ canaryVersion = `${ major } .${ datestamp } .0`
157
+ if ( args . tag && args . tag !== 'latest' ) {
158
+ canaryVersion = `${ major } .${ datestamp } .0-${ args . tag } .0`
183
159
}
184
160
185
161
// check the registry to avoid version collision
186
162
// in case we need to publish more than one canary versions in a day
187
163
try {
188
- const pkgName = isCanary
189
- ? renamePackageToCanary ( 'vue' )
190
- : renamePackageToVapor ( 'vue' )
191
- if ( isCanary ) {
192
- const { stdout } = await run (
193
- 'pnpm' ,
194
- [ 'view' , `${ pkgName } @~${ newVersion } ` , 'version' , '--json' ] ,
195
- { stdio : 'pipe' } ,
196
- )
197
- let versions = JSON . parse ( /** @type {string } */ ( stdout ) )
198
- versions = Array . isArray ( versions ) ? versions : [ versions ]
199
- const latestSameDayPatch = /** @type {string } */ (
200
- semver . maxSatisfying ( versions , `~${ newVersion } ` )
201
- )
164
+ const pkgName = renamePackageToCanary ( 'vue' )
165
+ const { stdout } = await run (
166
+ 'pnpm' ,
167
+ [ 'view' , `${ pkgName } @~${ canaryVersion } ` , 'version' , '--json' ] ,
168
+ { stdio : 'pipe' } ,
169
+ )
170
+ let versions = JSON . parse ( /** @type {string } */ ( stdout ) )
171
+ versions = Array . isArray ( versions ) ? versions : [ versions ]
172
+ const latestSameDayPatch = /** @type {string } */ (
173
+ semver . maxSatisfying ( versions , `~${ canaryVersion } ` )
174
+ )
202
175
203
- newVersion = /** @type {string } */ (
204
- semver . inc ( latestSameDayPatch , 'patch' )
176
+ canaryVersion = /** @type {string } */ (
177
+ semver . inc ( latestSameDayPatch , 'patch' )
178
+ )
179
+ if ( args . tag && args . tag !== 'latest' ) {
180
+ canaryVersion = /** @type {string } */ (
181
+ semver . inc ( latestSameDayPatch , 'prerelease' , args . tag )
205
182
)
206
- if ( args . tag && args . tag !== 'latest' ) {
207
- newVersion = /** @type {string } */ (
208
- semver . inc ( latestSameDayPatch , 'prerelease' , args . tag )
209
- )
210
- }
211
183
}
212
184
} catch ( /** @type {any } */ e ) {
213
185
if ( / E 4 0 4 / . test ( e . message ) ) {
@@ -217,7 +189,7 @@ async function main() {
217
189
}
218
190
}
219
191
220
- targetVersion = newVersion
192
+ targetVersion = canaryVersion
221
193
}
222
194
223
195
if ( ! targetVersion ) {
@@ -252,8 +224,8 @@ async function main() {
252
224
253
225
if ( skipPrompts ) {
254
226
step (
255
- isCanary || isVapor
256
- ? `Releasing ${ isCanary ? ' canary' : 'vapor' } version v${ targetVersion } ...`
227
+ isCanary
228
+ ? `Releasing canary version v${ targetVersion } ...`
257
229
: `Releasing v${ targetVersion } ...` ,
258
230
)
259
231
} else {
@@ -301,11 +273,7 @@ async function main() {
301
273
step ( '\nUpdating cross dependencies...' )
302
274
updateVersions (
303
275
targetVersion ,
304
- isCanary
305
- ? renamePackageToCanary
306
- : isVapor
307
- ? renamePackageToVapor
308
- : keepThePackageName ,
276
+ isCanary ? renamePackageToCanary : keepThePackageName ,
309
277
)
310
278
versionUpdated = true
311
279
@@ -338,7 +306,7 @@ async function main() {
338
306
339
307
// update pnpm-lock.yaml
340
308
// skipped during canary release because the package names changed and installing with `workspace:*` would fail
341
- if ( ! isCanary && ! isVapor ) {
309
+ if ( ! isCanary ) {
342
310
step ( '\nUpdating lockfile...' )
343
311
await run ( `pnpm` , [ 'install' , '--prefer-offline' ] )
344
312
}
@@ -403,7 +371,7 @@ async function getCIResult() {
403
371
try {
404
372
const sha = await getSha ( )
405
373
const res = await fetch (
406
- `https://api.github.com/repos/vuejs/core-vapor /actions/runs?head_sha=${ sha } ` +
374
+ `https://api.github.com/repos/vuejs/core/actions/runs?head_sha=${ sha } ` +
407
375
`&status=success&exclude_pull_requests=true` ,
408
376
)
409
377
/** @type {{ workflow_runs: ({ name: string, conclusion: string })[] } } */
@@ -421,7 +389,7 @@ async function isInSyncWithRemote() {
421
389
try {
422
390
const branch = await getBranch ( )
423
391
const res = await fetch (
424
- `https://api.github.com/repos/vuejs/core-vapor /commits/${ branch } ?per_page=1` ,
392
+ `https://api.github.com/repos/vuejs/core/commits/${ branch } ?per_page=1` ,
425
393
)
426
394
const data = await res . json ( )
427
395
if ( data . sha === ( await getSha ( ) ) ) {
@@ -473,7 +441,7 @@ function updatePackage(pkgRoot, version, getNewPackageName) {
473
441
const pkg = JSON . parse ( fs . readFileSync ( pkgPath , 'utf-8' ) )
474
442
pkg . name = getNewPackageName ( pkg . name )
475
443
pkg . version = version
476
- if ( isCanary || isVapor ) {
444
+ if ( isCanary ) {
477
445
updateDeps ( pkg , 'dependencies' , version , getNewPackageName )
478
446
updateDeps ( pkg , 'peerDependencies' , version , getNewPackageName )
479
447
}
0 commit comments