mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 12:36:33 +00:00
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:
parent
b3bbab4e6b
commit
930537d53f
5 changed files with 1370 additions and 1992 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -6,7 +6,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: ['10', '12', '14']
|
node-version: ['10', '12', '14', '15']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -25,7 +25,7 @@ jobs:
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: npm run test:coverage
|
run: npm run test:coverage
|
||||||
- name: Upload Coverage
|
- name: Upload Coverage
|
||||||
if: ${{ matrix.node-version == '14' }}
|
if: ${{ matrix.node-version == '15' }}
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
file: ./coverage/lcov.info
|
file: ./coverage/lcov.info
|
||||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -7,7 +7,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
}));
|
}));
|
||||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
__exportStar(require("./types"), exports);
|
__exportStar(require("./types"), exports);
|
||||||
|
|
3310
package-lock.json
generated
3310
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28
package.json
28
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "holidayapi",
|
"name": "holidayapi",
|
||||||
"version": "4.1.0",
|
"version": "4.2.0",
|
||||||
"description": "Official Node.js library for Holiday API",
|
"description": "Official Node.js library for Holiday API",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -24,23 +24,23 @@
|
||||||
"node": ">= 10.0.0"
|
"node": ">= 10.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.0",
|
"@types/jest": "^26.0.19",
|
||||||
"@types/nock": "^11.1.0",
|
"@types/nock": "^11.1.0",
|
||||||
"@types/node": "^14.0.13",
|
"@types/node": "^14.14.16",
|
||||||
"@types/node-fetch": "^2.5.7",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
"@typescript-eslint/eslint-plugin": "^4.11.1",
|
||||||
"@typescript-eslint/parser": "^3.3.0",
|
"@typescript-eslint/parser": "^4.11.1",
|
||||||
"eslint": "~7.2.0",
|
"eslint": "^7.16.0",
|
||||||
"eslint-config-airbnb-base": "^14.2.0",
|
"eslint-config-airbnb-base": "^14.2.1",
|
||||||
"eslint-plugin-import": "^2.21.2",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-jest": "^23.13.2",
|
"eslint-plugin-jest": "^24.1.3",
|
||||||
"jest": "^26.0.1",
|
"jest": "^26.6.3",
|
||||||
"nock": "^12.0.3",
|
"nock": "^13.0.5",
|
||||||
"ts-jest": "^26.1.0",
|
"ts-jest": "^26.4.4",
|
||||||
"typescript": "^3.9.5"
|
"typescript": "^4.1.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-fetch": "^2.6.0"
|
"node-fetch": "^2.6.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
|
18
src/types.ts
18
src/types.ts
|
@ -19,8 +19,6 @@ type Request = {
|
||||||
search?: string;
|
search?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Requests = CountriesRequest | HolidaysRequest | LanguagesRequest | WorkdayRequest;
|
|
||||||
|
|
||||||
export type CountriesRequest = Request & {
|
export type CountriesRequest = Request & {
|
||||||
country?: string;
|
country?: string;
|
||||||
public?: boolean;
|
public?: boolean;
|
||||||
|
@ -58,8 +56,6 @@ export type Response = {
|
||||||
error?: string;
|
error?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Responses = CountriesResponse | HolidaysResponse | LanguagesResponse | WorkdayResponse;
|
|
||||||
|
|
||||||
export type CountriesResponse = Response & {
|
export type CountriesResponse = Response & {
|
||||||
countries?: {
|
countries?: {
|
||||||
code: string;
|
code: string;
|
||||||
|
@ -108,3 +104,17 @@ export type WorkdayResponse = Response & {
|
||||||
weekday: Weekday;
|
weekday: Weekday;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type Requests = (
|
||||||
|
| CountriesRequest
|
||||||
|
| HolidaysRequest
|
||||||
|
| LanguagesRequest
|
||||||
|
| WorkdayRequest
|
||||||
|
);
|
||||||
|
|
||||||
|
export type Responses = (
|
||||||
|
| CountriesResponse
|
||||||
|
| HolidaysResponse
|
||||||
|
| LanguagesResponse
|
||||||
|
| WorkdayResponse
|
||||||
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue