Skip to content

Commit

Permalink
feat: upgrade deps, many dropped nodejs v8 support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drop nodejs v8 support
  • Loading branch information
3cp committed Apr 30, 2020
1 parent c0e3489 commit 0249227
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 9,858 deletions.
37 changes: 19 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ workflows:
version: 2
node-multi-build:
jobs:
- test_node_8
- test_node_10
- test_node_12
- test_docker_1
- test_docker_2
- test_docker_3
Expand All @@ -20,7 +20,7 @@ version: 2
jobs:
test_docker_1:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

test_docker_2:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:

test_docker_3:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

test_docker_4:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:

test_docker_5:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:

test_docker_7:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:

test_docker_8:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand Down Expand Up @@ -254,9 +254,9 @@ jobs:
- run: sudo npm link
- run: au new eighth -u -s cli-bundler,alameda,http2,dotnet-core,htmlmin-min,sass,postcss-typical,karma,cypress,scaffold-navigation,docker && cd ./eighth && npm install && npm link aurelia-cli && npm run docker:build

test_node_8:
test_node_10:
docker:
- image: circleci/node:8-browsers
- image: circleci/node:10-browsers

working_directory: ~/repo

Expand All @@ -266,23 +266,23 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- node8-dependencies-{{ checksum "package.json" }}
- node10-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- node8-dependencies-
- node10-dependencies-

- run: npm install

- save_cache:
paths:
- node_modules
key: node8-dependencies-{{ checksum "package.json" }}
key: node10-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm test

test_node_10:
test_node_12:
docker:
- image: circleci/node:10-browsers
- image: circleci/node:12-browsers

working_directory: ~/repo

Expand All @@ -292,16 +292,17 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- node10-dependencies-{{ checksum "package.json" }}
- node8-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- node10-dependencies-
- node8-dependencies-

- run: npm install

- save_cache:
paths:
- node_modules
key: node10-dependencies-{{ checksum "package.json" }}
key: node8-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm test

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ dist
/release-checks-results
/.nyc_output
/coverage
/package-lock.json
/yarn.lock
5 changes: 2 additions & 3 deletions lib/file-system.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const fs = require('fs');
const nodePath = require('path');
const mkdirp = require('mkdirp');

exports.fs = fs;

Expand Down Expand Up @@ -38,7 +37,7 @@ exports.mkdir = function(path) {

exports.mkdirp = function(path) {
return new Promise((resolve, reject) => {
mkdirp(path, error => {
fs.mkdir(path, {recursive: true}, error => {
if (error) reject(error);
else resolve();
});
Expand Down Expand Up @@ -121,7 +120,7 @@ exports.isDirectory = function(path) {

exports.writeFile = function(path, content, encoding) {
return new Promise((resolve, reject) => {
mkdirp(nodePath.dirname(path), err => {
fs.mkdir(nodePath.dirname(path), {recursive: true}, err => {
if (err) reject(err);
else {
fs.writeFile(path, content, encoding || 'utf8', error => {
Expand Down
Loading

0 comments on commit 0249227

Please sign in to comment.