Skip to content

Commit 9551603

Browse files
committed
fix: upgrade deps
BREAKING CHANGE: remove a lot of code transforms, support node higher than 10.15.x
1 parent 94c1b50 commit 9551603

8 files changed

Lines changed: 3006 additions & 61 deletions

File tree

.babelrc

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{
22
"plugins": [
3-
"transform-es2015-spread",
4-
"transform-es2015-destructuring",
5-
"transform-strict-mode",
6-
"transform-es2015-parameters",
7-
"transform-es2015-shorthand-properties",
8-
"transform-object-rest-spread",
9-
"transform-class-properties"
3+
"@babel/plugin-transform-strict-mode"
104
]
11-
}
5+
}

.eslintrc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"extends": "airbnb/base",
3-
"parser": "babel-eslint",
4-
"rules": {
5-
"no-param-reassign": [2,{"props": false}],
6-
"max-len": [2, 150],
7-
}
8-
}
2+
"extends": "makeomatic"
3+
}

.npmignore

Lines changed: 0 additions & 28 deletions
This file was deleted.

package.json

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
"description": "Put your callbacks into queue to make sure that concurrent requests that you might want to perform will only be executed once",
55
"main": "./lib/callback-queue.js",
66
"scripts": {
7-
"test": "./node_modules/.bin/mocha -r babel-register -R spec test",
8-
"prepublish": "npm run compile",
9-
"pretest": "npm run compile",
10-
"compile": "./node_modules/.bin/babel -d ./lib src"
7+
"test": "yarn lint && mocha -r @babel/register -R spec test",
8+
"lint": "eslint ./src",
9+
"prepublishOnly": "yarn compile",
10+
"pretest": "yarn compile",
11+
"compile": "babel -d ./lib src"
1112
},
1213
"repository": {
1314
"type": "git",
@@ -25,17 +26,25 @@
2526
"author": "Vitaly Aminev <v@aminev.me>",
2627
"license": "MIT",
2728
"dependencies": {
28-
"debug": "^2.2.0"
29+
"debug": "^4.1.1"
30+
},
31+
"engine": {
32+
"node": "^10.15.x"
2933
},
3034
"devDependencies": {
31-
"babel-cli": "^6.4.5",
32-
"babel-eslint": "^5.0.0",
33-
"babel-preset-es2015": "^6.3.13",
34-
"babel-preset-stage-0": "^6.3.13",
35-
"babel-register": "^6.5.2",
36-
"chai": "^3.5.0",
37-
"eslint": "^1.10.3",
38-
"eslint-config-airbnb": "^5.0.1",
39-
"mocha": "^2.4.5"
40-
}
35+
"@babel/cli": "^7.0.0",
36+
"@babel/core": "^7.0.0",
37+
"@babel/plugin-transform-strict-mode": "^7.2.0",
38+
"@babel/register": "^7.0.0",
39+
"chai": "^4.2.0",
40+
"chai-spies": "^1.0.0",
41+
"eslint": "^6.3.0",
42+
"eslint-config-makeomatic": "^3.1.0",
43+
"eslint-plugin-import": "^2.18.2",
44+
"mocha": "^6.2.0"
45+
},
46+
"files": [
47+
"src/",
48+
"lib/"
49+
]
4150
}

src/callback-queue.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ const assert = require('assert');
66
* @type {Map}
77
*/
88
const callbackQueue = new Map();
9+
910
// cache reference
10-
const nextTick = typeof setImmediate === 'function' && setImmediate || process.nextTick;
11+
const nextTick = (typeof setImmediate === 'function' && setImmediate) || process.nextTick;
1112

1213
/**
1314
* Iterates over callbacks and calls them with passed args

test/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"mocha": true
4+
}
5+
}

test/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* global describe, it */
2-
31
const chai = require('chai');
42
const spies = require('chai-spies');
53
const expect = chai.expect;

0 commit comments

Comments
 (0)