mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-09 17:09:05 -05:00
workflow: add dist-tag when publishing [ci skip]
This commit is contained in:
@@ -25,8 +25,6 @@ test('base', async () => {
|
||||
|
||||
// should inject babel-jest
|
||||
expect(pkg.devDependencies).toHaveProperty('babel-jest')
|
||||
// babel-core 6 -> 7 shim
|
||||
expect(pkg.devDependencies).toHaveProperty('babel-core')
|
||||
// eslint
|
||||
expect(files['tests/unit/.eslintrc.js']).toMatch('jest: true')
|
||||
|
||||
|
||||
@@ -54,22 +54,14 @@ module.exports = (api, _, __, invoking) => {
|
||||
if (api.hasPlugin('babel')) {
|
||||
api.extendPackage({
|
||||
devDependencies: {
|
||||
'babel-jest': '^23.6.0',
|
||||
// this is for now necessary to force babel-jest and vue-jest to use babel 7
|
||||
'babel-core': '7.0.0-bridge.0'
|
||||
'babel-jest': '^24.7.1'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// Jest's shipped babel-jest still uses babel 6,
|
||||
// so we cannot use extendPackage which renders babel.config.js.
|
||||
api.render(files => {
|
||||
files['.babelrc'] = JSON.stringify(
|
||||
{
|
||||
plugins: ['transform-es2015-modules-commonjs']
|
||||
},
|
||||
null,
|
||||
2
|
||||
)
|
||||
api.extendPackage({
|
||||
babel: {
|
||||
plugins: ['transform-es2015-modules-commonjs']
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
|
||||
"@vue/cli-shared-utils": "^3.6.0",
|
||||
"babel-jest": "^24.7.1",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||
"jest": "^24.7.1",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"jest-transform-stub": "^2.0.0",
|
||||
|
||||
@@ -93,16 +93,24 @@ const release = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const lernaArgs = [
|
||||
'publish',
|
||||
version
|
||||
]
|
||||
const releaseType = semver.diff(curVersion, version)
|
||||
|
||||
let distTag = 'latest'
|
||||
if (releaseType.startsWith('pre')) {
|
||||
distTag = 'next'
|
||||
}
|
||||
|
||||
const lernaArgs = [
|
||||
'publish',
|
||||
version,
|
||||
'--dist-tag',
|
||||
distTag
|
||||
]
|
||||
// keep packages' minor version in sync
|
||||
if (releaseType !== 'patch') {
|
||||
lernaArgs.push('--force-publish')
|
||||
}
|
||||
|
||||
await execa(require.resolve('lerna/cli'), lernaArgs, { stdio: 'inherit' })
|
||||
}
|
||||
|
||||
|
||||
@@ -3507,7 +3507,7 @@ babel-plugin-syntax-object-rest-spread@^6.8.0:
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
|
||||
integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=
|
||||
|
||||
babel-plugin-transform-es2015-modules-commonjs@^6.26.0, babel-plugin-transform-es2015-modules-commonjs@^6.26.2:
|
||||
babel-plugin-transform-es2015-modules-commonjs@^6.26.0:
|
||||
version "6.26.2"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3"
|
||||
integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==
|
||||
|
||||
Reference in New Issue
Block a user