Skip to content

Commit

Permalink
fix: Add Node 10 support (#5769)
Browse files Browse the repository at this point in the history
**Summary**

1. Added node 10 to CircleCI
2. Fixed a test that was using the `net.createServer` method. This was having issues, likely because of this: nodejs/node#20334 - it now uses a "normal" `http` server instead, serving the same purpose.
3. Changed the `readFirstAvailableStream` method in `util/fs.js`. I'm guessing this is related to the same issue as 2, but there have been quite some changes in `10` that might be causing this - so it's just a guess. Since this piece of code could be clearer and more conceise anyway, I opted to just change it. Now instead of relying on the stream `error` event to check if a file exists, it just explicitly checks it before starting the stream.
4. Upgraded `upath` from `1.0.2` to `1.0.5` which supports node 10 (found through its `engines` field when installing).
5. Upgraded Jest
6. Fixed a bug regarding replacing symlinks to non-existent targets on Windows
7. Removed a redundant test
8. Fixed two test cases that were failing frequently on macOS builds

fixes #5761
fixes #5477

**Test plan**

CI should be green (including and especially the new node10 job!)
  • Loading branch information
imsnif authored and BYK committed May 23, 2018
1 parent c506764 commit eee5bee
Show file tree
Hide file tree
Showing 14 changed files with 463 additions and 620 deletions.
39 changes: 38 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,21 @@ jobs:
root: ~/project
paths:
- yarn
test-pkg-tests-linux-node10:
<<: *docker_defaults
docker:
- image: node:10
<<: *pkg_tests
test-pkg-tests-linux-node8:
<<: *docker_defaults
<<: *pkg_tests
test-linux-node10:
<<: *docker_defaults
<<: *test_steps
test-linux-node8:
<<: *docker_defaults
docker:
- image: node:8
<<: *test_steps
test-linux-node6:
<<: *docker_defaults
Expand All @@ -138,6 +148,18 @@ jobs:
docker:
- image: node:4
<<: *test_steps
test-macos-node10:
<<: *macos_defaults
steps:
- run:
name: Install Node 10
command: |
brew uninstall --ignore-dependencies node
brew update
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@10
- *attach_workspace
- *test_build
- *test_run
test-macos-node8:
<<: *macos_defaults
steps:
Expand Down Expand Up @@ -221,10 +243,18 @@ workflows:
filters: *default_filters
requires:
- install
- test-pkg-tests-linux-node10:
filters: *default_filters
requires:
- install
- test-pkg-tests-linux-node8:
filters: *default_filters
requires:
- install
- test-linux-node10:
filters: *default_filters
requires:
- install
- test-linux-node8:
filters: *default_filters
requires:
Expand All @@ -237,14 +267,18 @@ workflows:
filters: *default_filters
requires:
- install
- test-macos-node6:
- test-macos-node10:
filters: *default_filters
requires:
- install
- test-macos-node8:
filters: *default_filters
requires:
- install
- test-macos-node6:
filters: *default_filters
requires:
- install
- build:
filters: *default_filters
requires:
Expand All @@ -255,10 +289,13 @@ workflows:
branches:
ignore: /.*/
requires:
- test-pkg-tests-linux-node10
- test-pkg-tests-linux-node8
- test-linux-node10
- test-linux-node8
- test-linux-node6
- test-linux-node4
- test-macos-node10
- test-macos-node8
- test-macos-node6
- lint
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile for building Yarn.
# docker build -t yarnpkg/dev -f Dockerfile.dev .

FROM node:8
FROM node:10

# Debian packages
RUN apt-get -y update && \
Expand Down
1 change: 1 addition & 0 deletions __tests__/commands/_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export async function run<T, R>(
} catch (err) {
throw new Error(`${err && err.stack} \nConsole output:\n ${out}`);
} finally {
reporter.close();
await fs.unlink(cwd);
}
}
Loading

0 comments on commit eee5bee

Please sign in to comment.