chore(deps): bump typescript to 4

Bumped `typescript` up to v4.x as well as a bunch of other dependencies,
including `jest` which had a moderate severity from it's `node-notifier`
dependency. Also added Node.js v15.x to the automated testing.
This commit is contained in:
Josh Sherman 2020-12-29 16:37:38 -06:00
parent b3bbab4e6b
commit 3eca80185c
5 changed files with 1370 additions and 1992 deletions

View file

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['10', '12', '14']
node-version: ['10', '12', '14', '15']
steps:
- name: Checkout Code
uses: actions/checkout@v2
@ -25,7 +25,7 @@ jobs:
- name: Run Tests
run: npm run test:coverage
- name: Upload Coverage
if: ${{ matrix.node-version == '14' }}
if: ${{ matrix.node-version == '15' }}
uses: codecov/codecov-action@v1
with:
file: ./coverage/lcov.info

2
dist/index.js vendored
View file

@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./types"), exports);

3298
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "holidayapi",
"version": "4.1.0",
"version": "4.2.0",
"description": "Official Node.js library for Holiday API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@ -24,23 +24,23 @@
"node": ">= 10.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.19",
"@types/nock": "^11.1.0",
"@types/node": "^14.0.13",
"@types/node": "^14.14.16",
"@types/node-fetch": "^2.5.7",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"eslint": "~7.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jest": "^23.13.2",
"jest": "^26.0.1",
"nock": "^12.0.3",
"ts-jest": "^26.1.0",
"typescript": "^3.9.5"
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"eslint": "^7.16.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"jest": "^26.6.3",
"nock": "^13.0.5",
"ts-jest": "^26.4.4",
"typescript": "^4.1.3"
},
"dependencies": {
"node-fetch": "^2.6.0"
"node-fetch": "^2.6.1"
},
"scripts": {
"build": "tsc",

View file

@ -19,8 +19,6 @@ type Request = {
search?: string;
};
export type Requests = CountriesRequest | HolidaysRequest | LanguagesRequest | WorkdayRequest;
export type CountriesRequest = Request & {
country?: string;
public?: boolean;
@ -58,8 +56,6 @@ export type Response = {
error?: string;
};
export type Responses = CountriesResponse | HolidaysResponse | LanguagesResponse | WorkdayResponse;
export type CountriesResponse = Response & {
countries?: {
code: string;
@ -108,3 +104,17 @@ export type WorkdayResponse = Response & {
weekday: Weekday;
}
};
export type Requests = (
| CountriesRequest
| HolidaysRequest
| LanguagesRequest
| WorkdayRequest
);
export type Responses = (
| CountriesResponse
| HolidaysResponse
| LanguagesResponse
| WorkdayResponse
);