diff --git a/.eslintrc.json b/.eslintrc.json index 95f2a35..8c47821 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/.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/.github/workflows/test.yml b/.github/workflows/test.yml index 1b20384..1c17b15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: - uses: actions/checkout@v2 - 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 run lint diff --git a/jest.config.json b/jest.config.json index 6bbdc2d..060d8d1 100644 --- a/jest.config.json +++ b/jest.config.json @@ -1,4 +1,5 @@ { + "testEnvironment": "jsdom", "transform": { "^.+\\.(t|j)sx?$": "ts-jest" }, diff --git a/package.json b/package.json index 31eb669..d359ee6 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,10 @@ "main": "dist/index.js", "module": "dist/esm/index.js", "sideEffects": false, + "engines": { + "npm": "^8", + "node": "^16" + }, "scripts": { "build": "npm run build:node && npm run build:esm", "build:node": "tsc", @@ -42,26 +46,27 @@ "access": "public" }, "devDependencies": { - "@testing-library/jest-dom": "^5.11.10", - "@testing-library/react": "^11.2.6", - "@testing-library/react-hooks": "^5.1.1", + "@testing-library/jest-dom": "^5.16.4", + "@testing-library/react": "^12.0.0", + "@testing-library/react-hooks": "^8.0.1", "@types/css-mediaquery": "^0.1.1", - "@types/jest": "^26.0.22", - "@types/react": "^17.0.3", - "@typescript-eslint/eslint-plugin": "^4.21.0", - "@typescript-eslint/parser": "^4.21.0", + "@types/jest": "^28.1.3", + "@types/react": "^17.0.0", + "@typescript-eslint/eslint-plugin": "^5.30.0", + "@typescript-eslint/parser": "^5.30.0", "css-mediaquery": "^0.1.2", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.3.4", - "eslint-plugin-prettier": "^3.3.1", - "jest": "^26.6.3", - "prettier": "^2.2.1", + "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.1", + "jest-environment-jsdom": "^28.1.1", + "prettier": "^2.7.1", "react": "^17.0.2", "react-dom": "^17.0.2", - "ts-jest": "^26.5.4", - "typescript": "^4.2.4" + "ts-jest": "^28.0.5", + "typescript": "^4.7.4" }, "peerDependencies": { "react": "^16.0.0 || ^17.0.0"