Skip to content

Commit

Permalink
chore: Update to circleci v2 (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
tleunen committed Mar 18, 2018
1 parent c8202d8 commit 04ef195
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 53 deletions.
45 changes: 45 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2
jobs:
test_with_node_6:
docker:
- image: circleci/node:6
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- run:
name: Test
command: npm test
test_with_node_8:
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- run:
name: Test
command: npm test
test_with_node_9:
docker:
- image: circleci/node:9
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- run:
name: Test
command: npm run test:coverage
- run:
name: Deploy coverage
command: bash <(curl -s https://codecov.io/bash)
workflows:
version: 2
test_all:
jobs:
- test_with_node_6
- test_with_node_8
- test_with_node_9
9 changes: 6 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
'use strict';

module.exports = {
root: true,
extends: [
'airbnb-base',
],
extends: ['airbnb-base', 'prettier'],
rules: {
'no-param-reassign': [2, { props: false }],
},
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
3 changes: 3 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
singleQuote: true
printWidth: 100
trailingComma: es5
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
environment:
matrix:
- nodejs_version: '6'
- nodejs_version: '7'
- nodejs_version: '8'
- nodejs_version: '9'
install:
- ps: Install-Product node $env:nodejs_version
- set CI=true
Expand All @@ -18,4 +18,4 @@ clone_depth: 1
test_script:
- node --version
- npm --version
- npm run test:suite
- npm run test
18 changes: 0 additions & 18 deletions circle.yml

This file was deleted.

41 changes: 19 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"engines": {
"node": ">= 6.0.0"
},
"files": [
"lib"
],
"files": ["lib"],
"author": {
"name": "Tommy Leunen",
"email": "[email protected]",
Expand Down Expand Up @@ -42,40 +40,39 @@
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-jest": "^21.2.0",
"babel-jest": "^22.4.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"common-tags": "^1.4.0",
"eslint": "^4.9.0",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-plugin-import": "^2.8.0",
"jest": "^21.2.1",
"eslint": "^4.19.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.9.0",
"husky": "^0.14.3",
"jest": "^22.4.2",
"lint-staged": "^7.0.0",
"prettier-eslint-cli": "^4.7.1",
"standard-version": "^4.2.0"
},
"scripts": {
"lint": "eslint src test",
"compile": "babel src --out-dir lib",
"pretest": "npm run lint",
"test": "jest --coverage",
"test:suite": "jest",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"prepublish": "npm run compile",
"release": "standard-version"
"release": "standard-version",
"precommit": "lint-staged"
},
"lint-staged": {
"*.{json,md}": ["prettier-eslint --write", "git add"],
"*.{js}": ["prettier-eslint --write", "eslint --fix", "git add"]
},
"jest": {
"testRegex": "/test/.*\\.test\\.js$",
"collectCoverageFrom": [
"src/**/*.js",
"!src/log.js"
]
},
"greenkeeper": {
"ignore": [
"babel-jest",
"eslint",
"eslint-plugin-import"
]
"collectCoverageFrom": ["src/**/*.js", "!src/log.js"]
}
}
4 changes: 1 addition & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import path from 'path';

import resolve from 'resolve';


export function nodeResolvePath(modulePath, basedir, extensions) {
try {
return resolve.sync(modulePath, { basedir, extensions });
Expand All @@ -29,7 +27,7 @@ export function toLocalPath(modulePath) {

export function stripExtension(modulePath, stripExtensions) {
let name = path.basename(modulePath);
stripExtensions.some((extension) => {
stripExtensions.some(extension => {
if (name.endsWith(extension)) {
name = name.slice(0, name.length - extension.length);
return true;
Expand Down

0 comments on commit 04ef195

Please sign in to comment.