Skip to content

Commit 0bc26e5

Browse files
committed
fix(node): fix node 6 support
1 parent 8139ff5 commit 0bc26e5

File tree

5 files changed

+1115
-532
lines changed

5 files changed

+1115
-532
lines changed

.circleci/config.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
1-
# Javascript Node CircleCI 2.0 configuration file
2-
#
3-
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4-
#
51
version: 2
62
jobs:
7-
test:
3+
test-and-build:
4+
working_directory: ~/repo
85
docker:
9-
# specify the version you desire here
10-
- image: circleci/node:10
11-
12-
# Specify service dependencies here if necessary
13-
# CircleCI maintains a library of pre-built images
14-
# documented at https://circleci.com/docs/2.0/circleci-images/
15-
6+
- image: circleci/node:12
167
steps:
178
- checkout
18-
- run: sudo npm install -g [email protected]
199
- run: npm install
2010
- run: npm run lint
2111
# run the tests on the original source to get coverage info
@@ -25,31 +15,42 @@ jobs:
2515
# test the final bundled builds
2616
- run: npm run build
2717
- run: npm run test-builds
18+
- persist_to_workspace:
19+
root: ~/repo
20+
paths: .
21+
22+
test-node-support:
23+
working_directory: ~/repo
24+
docker:
25+
- image: circleci/node:6
26+
steps:
27+
- attach_workspace:
28+
at: ~/repo
29+
# test the final build in Node 6 for platform support
30+
- run: npm run test-node-support
2831

2932
release:
33+
working_directory: ~/repo
3034
docker:
31-
- image: circleci/node:10
35+
- image: circleci/node:12
3236
steps:
33-
- checkout
34-
- run:
35-
name: Install dependencies
36-
command: |
37-
npm install
38-
- run:
39-
name: Build /dist folder
40-
command: npm run build
41-
- run:
42-
name: Release to NPM
43-
command: npm run semantic-release
37+
- attach_workspace:
38+
at: ~/repo
39+
# test the final bundled builds again right before release
40+
- run: npm run test-builds
41+
- run: npm run semantic-release
4442

4543
workflows:
4644
version: 2
4745
test_and_release:
4846
jobs:
49-
- test
47+
- test-and-build
48+
- test-node-support:
49+
requires:
50+
- test-and-build
5051
- release:
5152
requires:
52-
- test
53+
- test-node-support
5354
filters:
5455
branches:
5556
only: master

babel.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const development = {
22
plugins: [
33
'@babel/plugin-proposal-export-default-from',
44
'@babel/plugin-proposal-class-properties',
5+
'@babel/plugin-proposal-object-rest-spread',
56
],
67
};
78
const test = {
@@ -11,6 +12,7 @@ const test = {
1112
'@babel/plugin-proposal-class-properties',
1213
'@babel/plugin-transform-async-to-generator',
1314
'@babel/plugin-transform-modules-commonjs',
15+
'@babel/plugin-proposal-object-rest-spread',
1416
],
1517
};
1618

0 commit comments

Comments
 (0)