From e0b807d8ded07b13b65fe87115a9ab0648aaa1e3 Mon Sep 17 00:00:00 2001 From: sverweij Date: Sun, 27 Oct 2019 09:25:33 +0100 Subject: [PATCH 1/5] ci(circleci): prevent timeout on circle-ci macos node10 build The circle ci job for macOS on node 10 currently fails because it takes too long (both PR's #7649 and #7650 don't green because of that). A big chunk of the time is taken by updating homebrew - which in this macOS (the one connected to xcode 9 => macOS 10.12) does not contain node 10 by default. This change: - sets the required xcode version to 11.0 -> this gets us a more up to date macOS version (except for node 6, which isn't available in the homebrew associated with xcode 11) - removes the brew update from the macOS node 10 job --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd6f6f0dd9..4f2d881eff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ docker_defaults: &docker_defaults macos_defaults: &macos_defaults macos: - xcode: "9.0" + xcode: "11.0" working_directory: ~/project/yarn attach_workspace: &attach_workspace @@ -155,7 +155,6 @@ jobs: name: Install Node 10 command: | brew uninstall --ignore-dependencies node - brew update HOMEBREW_NO_AUTO_UPDATE=1 brew install node@10 brew link --overwrite --force node@10 [[ $(node --version) =~ ^v10\. ]] @@ -177,6 +176,8 @@ jobs: - *test_run test-macos-node6: <<: *macos_defaults + macos: + xcode: "9.0" steps: - run: name: Install Node 6 From a029fc3bcbd23d485cc00de1337f6220231ba205 Mon Sep 17 00:00:00 2001 From: sverweij Date: Sat, 26 Oct 2019 16:54:45 +0200 Subject: [PATCH 2/5] fix(generate-pnp-map-api.tpl.js): make running with Plug'n Play possible on node 13 On node 13 Module._findPath (which the setup() of this module redefines) also gets called with null for the path parameter (by lib/internal/bootstrap/pre_execution.js in the (new) function resolveMainPath). This fix ensures the patched _findPath also handles that situation. --- src/util/generate-pnp-map-api.tpl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/generate-pnp-map-api.tpl.js b/src/util/generate-pnp-map-api.tpl.js index 835b6f85f1..c44db3605a 100644 --- a/src/util/generate-pnp-map-api.tpl.js +++ b/src/util/generate-pnp-map-api.tpl.js @@ -714,7 +714,7 @@ exports.setup = function setup() { return originalFindPath.call(Module, request, paths, isMain); } - for (const path of paths) { + for (const path of paths || []) { let resolution; try { From b1e585ad21715436e91067f38ec754f4e6a210bd Mon Sep 17 00:00:00 2001 From: sverweij Date: Sat, 26 Oct 2019 19:12:02 +0200 Subject: [PATCH 3/5] ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix #7642 --- azure-pipelines.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c7b5e0e000..01d9333f35 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,10 @@ jobs: # node_version: 8.x node_10_x: node_version: 10.x + node_12_x: + node_version: 12.x + node_13_x: + node_version: 13.x steps: - template: scripts/azure-run-tests.yml @@ -30,6 +34,10 @@ jobs: node_version: 8.x node_10_x: node_version: 10.x + node_12_x: + node_version: 12.x + node_13_x: + node_version: 13.x steps: - template: scripts/azure-run-tests.yml @@ -47,6 +55,10 @@ jobs: node_version: 8.x node_10_x: node_version: 10.x + node_12_x: + node_version: 12.x + node_13_x: + node_version: 13.x steps: - template: scripts/azure-run-tests.yml From 1d20f238f1c826ff43e016b00c6c86d4a7de85ac Mon Sep 17 00:00:00 2001 From: sverweij Date: Sat, 26 Oct 2019 21:35:55 +0200 Subject: [PATCH 4/5] ci(circleci): add node 13 (and 12) to the build matrix (linux) --- .circleci/config.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f2d881eff..73cd559039 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,6 +122,16 @@ jobs: root: ~/project paths: - yarn + test-pkg-tests-linux-node13: + <<: *docker_defaults + docker: + - image: node:13 + <<: *pkg_tests + test-pkg-tests-linux-node12: + <<: *docker_defaults + docker: + - image: node:12 + <<: *pkg_tests test-pkg-tests-linux-node10: <<: *docker_defaults docker: @@ -130,8 +140,20 @@ jobs: test-pkg-tests-linux-node8: <<: *docker_defaults <<: *pkg_tests + test-linux-node13: + <<: *docker_defaults + docker: + - image: node:13 + <<: *test_steps + test-linux-node12: + <<: *docker_defaults + docker: + - image: node:12 + <<: *test_steps test-linux-node10: <<: *docker_defaults + docker: + - image: node:10 <<: *test_steps test-linux-node8: <<: *docker_defaults @@ -249,6 +271,14 @@ workflows: filters: *default_filters requires: - install + - test-pkg-tests-linux-node13: + filters: *default_filters + requires: + - install + - test-pkg-tests-linux-node12: + filters: *default_filters + requires: + - install - test-pkg-tests-linux-node10: filters: *default_filters requires: @@ -257,6 +287,14 @@ workflows: filters: *default_filters requires: - install + - test-linux-node13: + filters: *default_filters + requires: + - install + - test-linux-node12: + filters: *default_filters + requires: + - install - test-linux-node10: filters: *default_filters requires: @@ -295,8 +333,12 @@ workflows: branches: ignore: /.*/ requires: + - test-pkg-tests-linux-node13 + - test-pkg-tests-linux-node12 - test-pkg-tests-linux-node10 - test-pkg-tests-linux-node8 + - test-linux-node13 + - test-linux-node12 - test-linux-node10 - test-linux-node8 - test-linux-node6 From ff9bbabc3a68a3ee58710936f9d09cd663ee7378 Mon Sep 17 00:00:00 2001 From: sverweij Date: Sun, 27 Oct 2019 11:31:47 +0100 Subject: [PATCH 5/5] docs(CHANGELOG.md): adds PR #7650 to the change log --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8abad40eb..e55de3de02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa ## Master +- Makes running scripts with Plug'n Play possible on node 13 + + [#7650](https://github.com/yarnpkg/yarn/pull/7650) - [**Sander Verweij**](https://github.com/sverweij) + ## 1.19.1 **Important:** This release contains a cache bump. It will cause the very first install following the upgrade to take slightly more time, especially if you don't use the [Offline Mirror](https://yarnpkg.com/blog/2016/11/24/offline-mirror/) feature. After that everything will be back to normal.