From eaea9693ff3dfbda2dbae41a71b5fe81e6642a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Fri, 16 Apr 2021 01:50:09 +0200 Subject: [PATCH] Install `psmisc` in `vue-cli` e2e tests on CircleCI (#13162) --- .circleci/config.yml | 6 +- scripts/integration-tests/e2e-vue-cli.sh | 6 -- .../patches/vue-cli-babel-8.patch | 79 ------------------- 3 files changed, 4 insertions(+), 87 deletions(-) delete mode 100644 scripts/integration-tests/patches/vue-cli-babel-8.patch diff --git a/.circleci/config.yml b/.circleci/config.yml index c8b768e57f..61461b980c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,9 +151,11 @@ jobs: - attach_workspace: at: /tmp/verdaccio-workspace - run: - # vue-cli uses puppeteer, and it depends on the libXss.so.1 shared library + # - vue-cli uses puppeteer, and it depends on the libXss.so.1 shared library + # - We use fuser (psmisc) in local-registry.sh, and for some reason it's + # missing in this Docker image name: Install Headless Chrome dependencies - command: sudo apt-get install -yq libxss1 + command: sudo apt-get update && sudo apt-get install -yq libxss1 psmisc - run: BABEL_8_BREAKING=true ./scripts/integration-tests/e2e-vue-cli.sh e2e-breaking-jest: diff --git a/scripts/integration-tests/e2e-vue-cli.sh b/scripts/integration-tests/e2e-vue-cli.sh index 7bb3029592..1013c5eae7 100755 --- a/scripts/integration-tests/e2e-vue-cli.sh +++ b/scripts/integration-tests/e2e-vue-cli.sh @@ -30,12 +30,6 @@ node "$PWD"/../../utils/bump-babel-dependencies.js yarn lerna exec -- node "$PWD"/../../utils/bump-babel-dependencies.js yarn install -if [ "$BABEL_8_BREAKING" = true ] ; then - # Babel 8 defaults to "default, not ie 11", but this breaks vue-cli's tests - # which expect different ES features to be compiled. - patch -p1 < "$PWD"/../../patches/vue-cli-babel-8.patch -fi - # Test CI=true yarn test -p babel,babel-preset-app diff --git a/scripts/integration-tests/patches/vue-cli-babel-8.patch b/scripts/integration-tests/patches/vue-cli-babel-8.patch deleted file mode 100644 index eb01077533..0000000000 --- a/scripts/integration-tests/patches/vue-cli-babel-8.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js b/packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js -index d57f42b..60c938a 100644 ---- a/packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js -+++ b/packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js -@@ -3,7 +3,7 @@ const babel = require('@babel/core') - const preset = require('../index') - const defaultOptions = { - babelrc: false, -- presets: [preset], -+ presets: [[preset, { targets: { ie: 9 } }]], - filename: 'test-entry-file.js' - } - -@@ -161,6 +161,7 @@ test('disable absoluteRuntime', () => { - `.trim(), { - babelrc: false, - presets: [[preset, { -+ targets: { ie: 9 }, - absoluteRuntime: false - }]], - filename: 'test-entry-file.js' -@@ -183,6 +184,7 @@ test('should inject polyfills / helpers using "require" statements for a umd mod - `.trim(), { - babelrc: false, - presets: [[preset, { -+ targets: { ie: 9 }, - absoluteRuntime: false - }]], - filename: 'test-entry-file.js' -@@ -200,6 +202,7 @@ test('should inject polyfills / helpers using "import" statements for an es modu - `.trim(), { - babelrc: false, - presets: [[preset, { -+ targets: { ie: 9 }, - absoluteRuntime: false - }]], - filename: 'test-entry-file.js' -@@ -216,6 +219,7 @@ test('should not inject excluded polyfills', () => { - `.trim(), { - babelrc: false, - presets: [[preset, { -+ targets: { ie: 9 }, - exclude: ['es.promise'], - polyfills: ['es.array.iterator', 'es.object.assign'] - }]], -diff --git a/packages/@vue/cli-plugin-babel/__tests__/transpileDependencies.spec.js b/packages/@vue/cli-plugin-babel/__tests__/transpileDependencies.spec.js -index 1c5d6c2..6f90582 100644 ---- a/packages/@vue/cli-plugin-babel/__tests__/transpileDependencies.spec.js -+++ b/packages/@vue/cli-plugin-babel/__tests__/transpileDependencies.spec.js -@@ -78,6 +78,14 @@ test('dep from node_modules should been transpiled when matched by transpileDepe - 'vue.config.js', - `module.exports = { transpileDependencies: ['external-dep', '@scope/external-dep'] }` - ) -+ await project.write( -+ 'babel.config.js', -+ `module.exports = { -+ presets: [ -+ ["@vue/babel-preset-app", { targets: { ie: 9 } }] -+ ] -+ }` -+ ) - await project.run('vue-cli-service build') - expect(await readVendorFile()).toMatch('return "__TEST__"') - -@@ -89,6 +97,14 @@ test('dep from node_modules should been transpiled when transpileDependencies is - 'vue.config.js', - `module.exports = { transpileDependencies: true }` - ) -+ await project.write( -+ 'babel.config.js', -+ `module.exports = { -+ presets: [ -+ ["@vue/babel-preset-app", { targets: { ie: 9 } }] -+ ] -+ }` -+ ) - await project.run('vue-cli-service build') - expect(await readVendorFile()).toMatch('return "__TEST__"') -