From 3f4f0b9ef5107b72c56ed719c5f1d8bbfe75dbb2 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Thu, 17 Sep 2020 09:42:11 +0200 Subject: [PATCH] fix(travis): Run tests with Node 10 instead of 8 (#238) CI is currently failing because package.json refers chromedriver ^80.0.1, which also matches 80.0.2. In 80.0.2, chromedriver updated the `extract-zip` dependency: https://github.com/giggio/node-chromedriver/commit/16151de4c7bd87ef952665deb95aa56ce3539948 extract-zip 2.0.0 has dropped support for Node <10, e.g. by using APIs that were introduced in Node 10: https://github.com/maxogden/extract-zip/blob/v2.0.0/index.js#L11 which triggers the following error when run on earlier versions of Node: ``` > chromedriver@80.0.2 install /home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver > node install.js internal/util.js:214 throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function'); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function at promisify (internal/util.js:214:11) at Object. (/home/travis/build/mozilla/webextension-polyfill/node_modules/extract-zip/index.js:11:18) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver/install.js:14:20) ``` This commit fixes the issue by running tests with Node 10. Node 8 had become end-of-life on 2019-12-31 anyway. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23054c8..8dd8f15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ language: node_js node_js: ## Some of the ES6 syntax used in the browser-polyfill sources is only supported on nodejs >= 6 ## and the selenium-webdriver dependency used by the integration tests requires nodejs >= 8. -- '8' +## and the chromedriver dependency requires Node >= 10. +- '10' script: - npm run build