From 943888427f6d4ee57f1396c81e8d759ea2bab0ab Mon Sep 17 00:00:00 2001 From: Lukas Weiss Date: Wed, 29 Jun 2022 12:49:01 +0200 Subject: [PATCH 1/2] use node 16 with npm 8 --- .github/workflows/main.yml | 2 +- package.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9dc13c..033d2ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: prerelease: false - uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' registry-url: 'https://registry.npmjs.org' - run: npm install - run: npm publish diff --git a/package.json b/package.json index b601697..0051167 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,10 @@ "main": "dist/index.js", "module": "dist/esm/index.js", "typings": "dist/index.d.ts", + "engines": { + "npm": "^8", + "node": "^16" + }, "scripts": { "build": "npm run build:node && npm run build:esm", "build:node": "tsc", From 06e0af75f0f101601b2377afdc1ff4be7bea1e73 Mon Sep 17 00:00:00 2001 From: Lukas Weiss Date: Wed, 29 Jun 2022 12:49:14 +0200 Subject: [PATCH 2/2] update packages and adapt configs --- .eslintrc.json | 3 ++- jestconfig.json | 1 + package.json | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b826af9..ae644d5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,7 +14,8 @@ "prettier", "plugin:prettier/recommended", "plugin:@typescript-eslint/recommended", - "plugin:import/typescript" + "plugin:import/typescript", + "plugin:jest/recommended" ], "parserOptions": { "sourceType": "module", diff --git a/jestconfig.json b/jestconfig.json index d5929f1..eb79f0b 100644 --- a/jestconfig.json +++ b/jestconfig.json @@ -1,4 +1,5 @@ { + "testEnvironment": "jsdom", "transform": { "^.+\\.(t|j)sx?$": "ts-jest" }, diff --git a/package.json b/package.json index 0051167..cee209c 100644 --- a/package.json +++ b/package.json @@ -45,17 +45,17 @@ }, "homepage": "https://github.com/aboutbits/pagination#readme", "devDependencies": { - "@types/jest": "^26.0.9", - "@typescript-eslint/eslint-plugin": "^3.8.0", - "@typescript-eslint/parser": "^3.8.0", - "eslint": "^7.6.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-jest": "^23.20.0", - "eslint-plugin-prettier": "^3.1.4", - "jest": "^26.2.2", - "prettier": "^2.0.5", - "ts-jest": "^26.1.4", - "typescript": "^3.9.7" + "@types/jest": "^28.1.3", + "@typescript-eslint/eslint-plugin": "^5.30.0", + "@typescript-eslint/parser": "^5.30.0", + "eslint": "^8.18.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jest": "^26.5.3", + "eslint-plugin-prettier": "^4.1.0", + "jest": "^28.1.2", + "prettier": "^2.7.1", + "ts-jest": "^28.0.5", + "typescript": "^4.7.4" } }