Skip to content

Commit

Permalink
Drop node 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
xg-wang committed Mar 28, 2020
1 parent 8d79b45 commit 0fc27e5
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "8"
- "10"

addons:
chrome: stable
Expand Down
38 changes: 38 additions & 0 deletions addon/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import Mix from '@ember/polyfills/types';

export type Nullable<T> = T | null | undefined;

export type PlainObject<T = string | number | boolean> = {
[key: string]: T | PlainObject<T> | PlainObject<T>[];
}

export type PlainHeaders = {
[key: string]: string;
}

export type Method =
| 'HEAD'
| 'GET'
| 'POST'
| 'PUT'
| 'PATCH'
| 'DELETE'
| 'OPTIONS';

export type AjaxOptions = {
url: string;
type: Method;
data?: PlainObject<string> | BodyInit;
headers?: PlainHeaders;
};

export type Credentials = 'omit' | 'same-origin' | 'include';

export type FetchOptions = Mix<
AjaxOptions,
{ body?: BodyInit | null; method?: Method, credentials: Credentials }
>;

export function isPlainObject(obj: any): obj is PlainObject {
return Object.prototype.toString.call(obj) === '[object Object]';
}
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ init:
environment:
MOCHA_REPORTER: "mocha-appveyor-reporter"
matrix:
- nodejs_version: "8"
- nodejs_version: "10"
- nodejs_version: "12"

# Install scripts. (runs after repo cloning)
install:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"**/engine.io": "~3.3.0"
},
"engines": {
"node": "8.* || >= 10"
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
Expand Down

0 comments on commit 0fc27e5

Please sign in to comment.