Skip to content

Commit

Permalink
fix(node): fix node 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
solkimicreb committed Apr 19, 2020
1 parent 8139ff5 commit 0bc26e5
Show file tree
Hide file tree
Showing 5 changed files with 1,115 additions and 532 deletions.
55 changes: 28 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
test:
test-and-build:
working_directory: ~/repo
docker:
# specify the version you desire here
- image: circleci/node:10

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/

- image: circleci/node:12
steps:
- checkout
- run: sudo npm install -g [email protected]
- run: npm install
- run: npm run lint
# run the tests on the original source to get coverage info
Expand All @@ -25,31 +15,42 @@ jobs:
# test the final bundled builds
- run: npm run build
- run: npm run test-builds
- persist_to_workspace:
root: ~/repo
paths: .

test-node-support:
working_directory: ~/repo
docker:
- image: circleci/node:6
steps:
- attach_workspace:
at: ~/repo
# test the final build in Node 6 for platform support
- run: npm run test-node-support

release:
working_directory: ~/repo
docker:
- image: circleci/node:10
- image: circleci/node:12
steps:
- checkout
- run:
name: Install dependencies
command: |
npm install
- run:
name: Build /dist folder
command: npm run build
- run:
name: Release to NPM
command: npm run semantic-release
- attach_workspace:
at: ~/repo
# test the final bundled builds again right before release
- run: npm run test-builds
- run: npm run semantic-release

workflows:
version: 2
test_and_release:
jobs:
- test
- test-and-build
- test-node-support:
requires:
- test-and-build
- release:
requires:
- test
- test-node-support
filters:
branches:
only: master
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const development = {
plugins: [
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
],
};
const test = {
Expand All @@ -11,6 +12,7 @@ const test = {
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-object-rest-spread',
],
};

Expand Down
Loading

0 comments on commit 0bc26e5

Please sign in to comment.