mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 03:57:36 +08:00
merge
This commit is contained in:
commit
cf8b16568d
@ -3,7 +3,7 @@ version: 2
|
||||
defaults: &defaults
|
||||
working_directory: ~/project/vue
|
||||
docker:
|
||||
- image: vuejs/ci
|
||||
- image: node:lts
|
||||
|
||||
jobs:
|
||||
install:
|
||||
@ -15,6 +15,7 @@ jobs:
|
||||
- v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
||||
- v1-vue-{{ .Branch }}-
|
||||
- v1-vue-
|
||||
|
||||
- run: npm install
|
||||
- save_cache:
|
||||
key: v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
||||
@ -41,11 +42,11 @@ jobs:
|
||||
at: ~/project
|
||||
- run: npm run test:cover
|
||||
- run:
|
||||
name: report coverage stats for non-PRs
|
||||
command: |
|
||||
if [[ -z $CI_PULL_REQUEST ]]; then
|
||||
./node_modules/.bin/codecov
|
||||
fi
|
||||
name: report coverage stats for non-PRs
|
||||
command: |
|
||||
if [[ -z $CI_PULL_REQUEST ]]; then
|
||||
./node_modules/.bin/codecov
|
||||
fi
|
||||
|
||||
test-e2e:
|
||||
<<: *defaults
|
||||
@ -107,8 +108,7 @@ workflows:
|
||||
cron: "0 13 * * 1"
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
dev
|
||||
only: dev
|
||||
jobs:
|
||||
- install
|
||||
- test-cover:
|
||||
|
34
package.json
34
package.json
@ -14,31 +14,30 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"dev": "rollup -w -c scripts/config.js --environment TARGET:web-full-dev",
|
||||
"dev:cjs": "rollup -w -c scripts/config.js --environment TARGET:web-runtime-cjs-dev",
|
||||
"dev:esm": "rollup -w -c scripts/config.js --environment TARGET:web-runtime-esm",
|
||||
"dev:test": "karma start test/unit/karma.dev.config.js",
|
||||
"dev:ssr": "rollup -w -c scripts/config.js --environment TARGET:web-server-renderer",
|
||||
"dev:compiler": "rollup -w -c scripts/config.js --environment TARGET:web-compiler ",
|
||||
"dev:weex": "rollup -w -c scripts/config.js --environment TARGET:weex-framework",
|
||||
"dev:weex:factory": "rollup -w -c scripts/config.js --environment TARGET:weex-factory",
|
||||
"dev:weex:compiler": "rollup -w -c scripts/config.js --environment TARGET:weex-compiler ",
|
||||
"dev": "rollup -w -c scripts/config.ts --environment TARGET:web-full-dev",
|
||||
"dev:cjs": "rollup -w -c scripts/config.ts --environment TARGET:web-runtime-cjs-dev",
|
||||
"dev:esm": "rollup -w -c scripts/config.ts --environment TARGET:web-runtime-esm",
|
||||
"dev:test": "karma start test/unit/karma.dev.config.ts",
|
||||
"dev:ssr": "rollup -w -c scripts/config.ts --environment TARGET:web-server-renderer",
|
||||
"dev:compiler": "rollup -w -c scripts/config.ts --environment TARGET:web-compiler ",
|
||||
"dev:weex": "rollup -w -c scripts/config.ts --environment TARGET:weex-framework",
|
||||
"dev:weex:factory": "rollup -w -c scripts/config.ts --environment TARGET:weex-factory",
|
||||
"dev:weex:compiler": "rollup -w -c scripts/config.ts --environment TARGET:weex-compiler ",
|
||||
"build": "node scripts/build.js",
|
||||
"build:ssr": "npm run build -- web-runtime-cjs,web-server-renderer",
|
||||
"build:weex": "npm run build -- weex",
|
||||
"test": "npm run lint && flow check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex",
|
||||
"test": "npm run lint && npm run ts-check && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex",
|
||||
"test:dtw": "npm run lint && npm run test:types && npm run test:cover && npm run test:e2e -- --env phantomjs && npm run test:ssr && npm run test:weex",
|
||||
"test:unit": "karma start test/unit/karma.unit.config.ts",
|
||||
"test:cover": "karma start test/unit/karma.cover.config.ts",
|
||||
"test:e2e": "npm run build -- web-full-prod,web-server-basic-renderer && node test/e2e/runner.js",
|
||||
"test:weex": "npm run build:weex && jasmine-ts JASMINE_CONFIG_PATH=test/weex/jasmine.js",
|
||||
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.js",
|
||||
"test:e2e": "npm run build -- web-full-prod,web-server-basic-renderer && node test/e2e/runner.ts",
|
||||
"test:weex": "npm run build:weex && jasmine-ts JASMINE_CONFIG_PATH=test/weex/jasmine.ts",
|
||||
"test:ssr": "npm run build:ssr && jasmine JASMINE_CONFIG_PATH=test/ssr/jasmine.ts",
|
||||
"test:sauce": "npm run sauce -- 0 && npm run sauce -- 1 && npm run sauce -- 2",
|
||||
"test:types": "tsc -p ./types/test/tsconfig.json",
|
||||
"lint": "eslint src scripts test",
|
||||
"flow": "flow check",
|
||||
"ts-check": "tsc --noEmit",
|
||||
"sauce": "karma start test/unit/karma.sauce.config.js",
|
||||
"sauce": "karma start test/unit/karma.sauce.config.ts",
|
||||
"bench:ssr": "npm run build:ssr && node benchmarks/ssr/renderToString.js && node benchmarks/ssr/renderToStream.js",
|
||||
"release": "bash scripts/release.sh",
|
||||
"release:weex": "bash scripts/release-weex.sh",
|
||||
@ -83,6 +82,7 @@
|
||||
"@rollup/plugin-node-resolve": "^13.2.1",
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@types/jasmine": "^4.0.3",
|
||||
"@types/he": "^1.1.2",
|
||||
"@types/node": "^17.0.30",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@types/webpack-env": "^1.16.4",
|
||||
@ -147,6 +147,7 @@
|
||||
"serialize-javascript": "^6.0.0",
|
||||
"shelljs": "^0.8.5",
|
||||
"stream": "^0.0.2",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"terser": "^5.13.1",
|
||||
"ts-loader": "^9.2.9",
|
||||
"ts-node": "^10.7.0",
|
||||
@ -161,8 +162,5 @@
|
||||
"commitizen": {
|
||||
"path": "./node_modules/cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/he": "^1.1.2"
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ export function createRenderer (file, options, cb) {
|
||||
|
||||
compileWithWebpack(file, {
|
||||
target: 'node',
|
||||
devtool: asBundle ? '#source-map' : false,
|
||||
devtool: asBundle ? 'source-map' : false,
|
||||
output: {
|
||||
path: '/',
|
||||
filename: 'bundle.js',
|
||||
|
@ -1111,7 +1111,7 @@ describe('Component keep-alive', () => {
|
||||
expect(vm.$el.innerHTML).toBe(
|
||||
'<div class="test">one</div>'
|
||||
)
|
||||
}).then(done).then(done)
|
||||
}).then(done)
|
||||
})
|
||||
|
||||
// #4339
|
||||
|
@ -15,9 +15,10 @@ function assertClass (assertions, done) {
|
||||
}
|
||||
}).then(() => {
|
||||
expect(vm.$el.className).toBe(expected)
|
||||
if (i >= assertions.length - 1) {
|
||||
done()
|
||||
}
|
||||
// NOTE THIS WAS MAKING
|
||||
// if (i >= assertions.length - 1) {
|
||||
// done()
|
||||
// }
|
||||
})
|
||||
})
|
||||
chain.then(done)
|
||||
|
@ -253,7 +253,7 @@ if (!isIE9) {
|
||||
expect(vm.$el.innerHTML).toBe(
|
||||
'<div class="test">one</div>'
|
||||
)
|
||||
}).then(done).then(done)
|
||||
}).then(done)
|
||||
})
|
||||
|
||||
it('normal elements with different keys, simultaneous', done => {
|
||||
|
@ -21,6 +21,9 @@ const webpackConfig = {
|
||||
resolve: {
|
||||
alias: alias,
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
fallback: {
|
||||
'stream': require.resolve("stream-browserify")
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
@ -37,12 +40,14 @@ const webpackConfig = {
|
||||
|
||||
// shared config for all unit tests
|
||||
module.exports = {
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['jasmine', 'webpack', 'karma-typescript'],
|
||||
files: [
|
||||
'./index.ts'
|
||||
'./index.ts',
|
||||
"../../src/**/*.ts" // *.tsx for React Jsx
|
||||
],
|
||||
preprocessors: {
|
||||
'./index.ts': ['webpack', 'sourcemap']
|
||||
'./index.ts': ['webpack', 'sourcemap'],
|
||||
"**/*.ts": ["karma-typescript", 'webpack', 'sourcemap'] // *.tsx for React Jsx
|
||||
},
|
||||
webpack: webpackConfig,
|
||||
webpackMiddleware: {
|
||||
|
@ -11,7 +11,7 @@ module.exports = function (config: any) {
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
reporters: ['mocha', 'coverage'],
|
||||
reporters: ['mocha', 'coverage', 'karma-typescript'],
|
||||
coverageReporter: {
|
||||
reporters: [
|
||||
{ type: 'lcov', dir: '../../coverage', subdir: '.' },
|
||||
|
@ -1340,9 +1340,9 @@
|
||||
integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==
|
||||
|
||||
"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=12", "@types/node@^17.0.30":
|
||||
version "17.0.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.30.tgz#2c6e8512acac70815e8176aa30c38025067880ef"
|
||||
integrity sha512-oNBIZjIqyHYP8VCNAV9uEytXVeXG2oR0w9lgAXro20eugRQfY002qr3CUl6BAe+Yf/z3CRjPdz27Pu6WWtuSRw==
|
||||
version "17.0.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d"
|
||||
integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==
|
||||
|
||||
"@types/normalize-package-data@^2.4.0":
|
||||
version "2.4.1"
|
||||
|
Loading…
Reference in New Issue
Block a user