Skip to content

Commit eee5bee

Browse files
imsnifBYK
authored andcommitted
fix: Add Node 10 support (#5769)
**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!)
1 parent c506764 commit eee5bee

File tree

14 files changed

+463
-620
lines changed

14 files changed

+463
-620
lines changed

.circleci/config.yml

+38-1
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,21 @@ jobs:
122122
root: ~/project
123123
paths:
124124
- yarn
125+
test-pkg-tests-linux-node10:
126+
<<: *docker_defaults
127+
docker:
128+
- image: node:10
129+
<<: *pkg_tests
125130
test-pkg-tests-linux-node8:
126131
<<: *docker_defaults
127132
<<: *pkg_tests
133+
test-linux-node10:
134+
<<: *docker_defaults
135+
<<: *test_steps
128136
test-linux-node8:
129137
<<: *docker_defaults
138+
docker:
139+
- image: node:8
130140
<<: *test_steps
131141
test-linux-node6:
132142
<<: *docker_defaults
@@ -138,6 +148,18 @@ jobs:
138148
docker:
139149
- image: node:4
140150
<<: *test_steps
151+
test-macos-node10:
152+
<<: *macos_defaults
153+
steps:
154+
- run:
155+
name: Install Node 10
156+
command: |
157+
brew uninstall --ignore-dependencies node
158+
brew update
159+
HOMEBREW_NO_AUTO_UPDATE=1 brew install node@10
160+
- *attach_workspace
161+
- *test_build
162+
- *test_run
141163
test-macos-node8:
142164
<<: *macos_defaults
143165
steps:
@@ -221,10 +243,18 @@ workflows:
221243
filters: *default_filters
222244
requires:
223245
- install
246+
- test-pkg-tests-linux-node10:
247+
filters: *default_filters
248+
requires:
249+
- install
224250
- test-pkg-tests-linux-node8:
225251
filters: *default_filters
226252
requires:
227253
- install
254+
- test-linux-node10:
255+
filters: *default_filters
256+
requires:
257+
- install
228258
- test-linux-node8:
229259
filters: *default_filters
230260
requires:
@@ -237,14 +267,18 @@ workflows:
237267
filters: *default_filters
238268
requires:
239269
- install
240-
- test-macos-node6:
270+
- test-macos-node10:
241271
filters: *default_filters
242272
requires:
243273
- install
244274
- test-macos-node8:
245275
filters: *default_filters
246276
requires:
247277
- install
278+
- test-macos-node6:
279+
filters: *default_filters
280+
requires:
281+
- install
248282
- build:
249283
filters: *default_filters
250284
requires:
@@ -255,10 +289,13 @@ workflows:
255289
branches:
256290
ignore: /.*/
257291
requires:
292+
- test-pkg-tests-linux-node10
258293
- test-pkg-tests-linux-node8
294+
- test-linux-node10
259295
- test-linux-node8
260296
- test-linux-node6
261297
- test-linux-node4
298+
- test-macos-node10
262299
- test-macos-node8
263300
- test-macos-node6
264301
- lint

Dockerfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile for building Yarn.
22
# docker build -t yarnpkg/dev -f Dockerfile.dev .
33

4-
FROM node:8
4+
FROM node:10
55

66
# Debian packages
77
RUN apt-get -y update && \

__tests__/commands/_helpers.js

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export async function run<T, R>(
181181
} catch (err) {
182182
throw new Error(`${err && err.stack} \nConsole output:\n ${out}`);
183183
} finally {
184+
reporter.close();
184185
await fs.unlink(cwd);
185186
}
186187
}

0 commit comments

Comments
 (0)