Skip to content

Commit

Permalink
make running with Plug'n Play possible on node 13 (yarnpkg#7650)
Browse files Browse the repository at this point in the history
* 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 yarnpkg#7649 and yarnpkg#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

* 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.

* ci(azure-pipelines): add node 13 (and 12) to the azure-pipeline matrix

yarnpkg#7642

* ci(circleci): add node 13 (and 12) to the build matrix (linux)

* docs(CHANGELOG.md): adds PR yarnpkg#7650 to the change log
  • Loading branch information
sverweij authored and Vincent Bailly committed Jun 10, 2020
1 parent 39e312a commit c6fc4e8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,10 +4,15 @@ 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)

- Change run command to check cwd/node_modules/.bin for commands. Fixes run in workspaces.

[#7151](https://github.com/yarnpkg/yarn/pull/7151) - [**Jeff Valore**](https://twitter.com/codingwithspike)


## 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.
Expand Down
12 changes: 12 additions & 0 deletions azure-pipelines.yml
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion src/util/generate-pnp-map-api.tpl.js
Expand Up @@ -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 {
Expand Down

0 comments on commit c6fc4e8

Please sign in to comment.