Skip to content

Commit

Permalink
💥 update dependencies and drop Node 4 support
Browse files Browse the repository at this point in the history
Some dependencies dropped Node 4 support
  • Loading branch information
mysticatea committed Dec 8, 2018
1 parent 0d285bf commit c909fcd
Show file tree
Hide file tree
Showing 26 changed files with 245 additions and 266 deletions.
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/.nyc_output
/coverage
/dist
/scripts/babel-register.js
/node_modules

!.eslintrc.js
35 changes: 35 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"

const { configs, utils } = require("@mysticatea/eslint-plugin")

module.exports = {
root: true,
extends: ["plugin:@mysticatea/es2015"],
rules: {
"import/exports-last": "off",
"import/first": "off",

// To reduce size for babel-translation.
"no-restricted-syntax": [
"error",
"ForOfStatement",
"BinaryExpression[left.operator='typeof'][right.value='object']",
],
"prefer-rest-params": "off",
"prefer-spread": "off",
"@mysticatea/prefer-for-of": "off",
},
overrides: [
utils.merge({ files: "*.mjs" }, configs["+modules"]),
{
files: "test/*.mjs",
rules: {
"new-cap": "off",
},
},
],
}
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sudo: false

language: node_js
node_js:
- "4"
- "6"
- "8"
- "10"
- "11"

script:
- npm run -s test:mocha
Expand Down
22 changes: 15 additions & 7 deletions dist/abort-controller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/abort-controller.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 15 additions & 7 deletions dist/abort-controller.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ class AbortSignal extends EventTarget {
get aborted() {
const aborted = abortedFlags.get(this);
if (typeof aborted !== "boolean") {
throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`)
throw new TypeError(
`Expected 'this' to be an 'AbortSignal' object, but got ${
this === null ? "null" : typeof this
}`
)
}
return Boolean(aborted)
return aborted
}

/**
Expand All @@ -54,8 +58,8 @@ Object.defineProperties(AbortSignal.prototype, {
},
});

if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { //eslint-disable-line node/no-unsupported-features
Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { //eslint-disable-line node/no-unsupported-features
if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {
configurable: true,
value: "AbortSignal",
});
Expand Down Expand Up @@ -102,7 +106,11 @@ const signals = new WeakMap();
function getSignal(controller) {
const signal = signals.get(controller);
if (signal == null) {
throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`)
throw new TypeError(
`Expected 'this' to be an 'AbortController' object, but got ${
controller === null ? "null" : typeof controller
}`
)
}
return signal
}
Expand Down Expand Up @@ -146,8 +154,8 @@ Object.defineProperties(AbortController.prototype, {
abort: { enumerable: true },
});

if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { //eslint-disable-line node/no-unsupported-features
Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { //eslint-disable-line node/no-unsupported-features
if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {
configurable: true,
value: "AbortController",
});
Expand Down

0 comments on commit c909fcd

Please sign in to comment.