Skip to content

Commit 2ea83b3

Browse files
committed
Upgrade node and modules
Checked https://nodejs.dev/en/about/releases/ for up-to-date information on the latest versions. Added engine conditons and npm versions that are tested Added .npmrc file to make sure that the versions of your local environment matches.
1 parent bd79460 commit 2ea83b3

File tree

8 files changed

+4457
-3975
lines changed

8 files changed

+4457
-3975
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
lib/
22
build/
33
build-*/
4+
dist/
45
.vscode/
56
node_modules/
67
coverage/

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [14.x, 15.x]
11+
# Current versions not in maintainance
12+
node-version: [16.x, 18.x, 20.x]
1213

1314
steps:
1415
- uses: actions/checkout@v2

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# .npmrc
2+
engine-strict=true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Example
22

3-
Example of typescript-eslint- etc
3+
Example of typescript, eslint, and jest with property based testing.
44

55
Possibly, you might want to delete the `.pre-commit-config.yaml` file if you are not using python anywhere.
6+
7+
This is only tested with certain versions of node and npm, it might work with others, disable the `engine-strict=true` in the `.npmrc` file at your discretion.

__tests__/replace.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('Ignoring values', () => {
4848
test('should leave json objects alone', () => {
4949
const throwOnReplace = replace(f, (t): t is any => false);
5050
fc.assert(
51-
fc.property(fc.jsonObject(), (json) => {
51+
fc.property(fc.json(), (json) => {
5252
expect(() => expect(throwOnReplace(json)).toStrictEqual(json)).not.toThrow();
5353
}),
5454
);

package-lock.json

Lines changed: 4420 additions & 3954 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"type": "git",
99
"url": "https://github.com/alexrecuenco/typescript-eslint-prettier-jest-example.git"
1010
},
11+
"engines": {
12+
"npm": ">=8.0.0 <10.0.0",
13+
"node": ">=16.0.0 <21.0.0"
14+
},
1115
"bin": "./build/bin/cli.js",
1216
"scripts": {
1317
"start": "npm run build && node .",
@@ -27,22 +31,21 @@
2731
"internationalization"
2832
],
2933
"devDependencies": {
30-
"@jest/types": "^27.4.2",
31-
"@types/jest": "^27.0.3",
34+
"@types/jest": "^29.5.3",
3235
"@types/node": "^15.6.1",
33-
"@typescript-eslint/eslint-plugin": "^5.8.1",
34-
"@typescript-eslint/parser": "^5.8.1",
35-
"eslint": "^8.5.0",
36-
"eslint-config-prettier": "^8.3.0",
37-
"eslint-plugin-import": "^2.25.3",
38-
"eslint-plugin-jest": "^25.3.2",
39-
"eslint-plugin-prettier": "^4.0.0",
40-
"fast-check": "^2.20.0",
41-
"jest": "^27.4.5",
42-
"prettier": "^2.5.1",
43-
"supports-color": "^9.2.1",
44-
"ts-jest": "^27.1.2",
45-
"tsc-watch": "^4.6.0",
46-
"typescript": "^4.5.4"
36+
"@typescript-eslint/eslint-plugin": "^6.2.0",
37+
"@typescript-eslint/parser": "^6.2.0",
38+
"eslint": "^8.46.0",
39+
"eslint-config-prettier": "^8.9.0",
40+
"eslint-plugin-import": "^2.28.0",
41+
"eslint-plugin-jest": "^27.2.3",
42+
"eslint-plugin-prettier": "^5.0.0",
43+
"fast-check": "^3.12.0",
44+
"jest": "^29.6.2",
45+
"prettier": "^3.0.0",
46+
"supports-color": "^9.4.0",
47+
"ts-jest": "^29.1.1",
48+
"tsc-watch": "^6.0.4",
49+
"typescript": "^5.1.6"
4750
}
4851
}

tsconfig.prod.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4+
"outDir": "./dist",
45
"declaration": false,
56
/* Generates corresponding '.d.ts' file. */
67
"declarationMap": false,
78
"sourceMap": false,
89
"rootDir": ".",
9-
"types": ["node"]
10-
}
10+
"types": [
11+
"node"
12+
]
13+
},
14+
"include": [
15+
"src/**/*",
16+
"bin/**/*"
17+
],
1118
}

0 commit comments

Comments
 (0)