Skip to content

Commit 2a94baa

Browse files
committed
Configure npm to enforce standard project Node.js version
This will produce an error if a contributor attempts to run an npm command in the project using an unsupported version of Node.js.
1 parent 5827836 commit 2a94baa

10 files changed

+21
-0
lines changed

.github/workflows/check-action-metadata-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
push:
66
paths:
77
- ".github/workflows/check-action-metadata-task.ya?ml"
8+
- ".npmrc"
89
- "action.ya?ml"
910
- "package.json"
1011
- "package-lock.json"
1112
- "Taskfile.ya?ml"
1213
pull_request:
1314
paths:
1415
- ".github/workflows/check-action-metadata-task.ya?ml"
16+
- ".npmrc"
1517
- "action.ya?ml"
1618
- "package.json"
1719
- "package-lock.json"

.github/workflows/check-markdown-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths:
88
- ".github/workflows/check-markdown-task.ya?ml"
99
- ".markdown-link-check.json"
10+
- ".npmrc"
1011
- "package.json"
1112
- "package-lock.json"
1213
- "Taskfile.ya?ml"
@@ -19,6 +20,7 @@ on:
1920
paths:
2021
- ".github/workflows/check-markdown-task.ya?ml"
2122
- ".markdown-link-check.json"
23+
- ".npmrc"
2224
- "package.json"
2325
- "package-lock.json"
2426
- "Taskfile.ya?ml"

.github/workflows/check-npm-dependencies-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- ".licensed.ya?ml"
1313
- "Taskfile.ya?ml"
1414
- "**/.gitmodules"
15+
- "**/.npmrc"
1516
- "**/package.json"
1617
- "**/package-lock.json"
1718
pull_request:
@@ -22,6 +23,7 @@ on:
2223
- ".licensed.ya?ml"
2324
- "Taskfile.ya?ml"
2425
- "**/.gitmodules"
26+
- "**/.npmrc"
2527
- "**/package.json"
2628
- "**/package-lock.json"
2729
schedule:

.github/workflows/check-npm-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
push:
77
paths:
88
- ".github/workflows/check-npm-task.ya?ml"
9+
- "**/.npmrc"
910
- "**/package.json"
1011
- "**/package-lock.json"
1112
- "Taskfile.ya?ml"
1213
pull_request:
1314
paths:
1415
- ".github/workflows/check-npm-task.ya?ml"
16+
- "**/.npmrc"
1517
- "**/package.json"
1618
- "**/package-lock.json"
1719
- "Taskfile.ya?ml"

.github/workflows/check-prettier-formatting-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
paths:
88
- ".github/workflows/check-prettier-formatting-task.ya?ml"
99
- "Taskfile.ya?ml"
10+
- "**/.npmrc"
1011
- "**/.prettierignore"
1112
- "**/.prettierrc*"
1213
# CSS
@@ -103,6 +104,7 @@ on:
103104
paths:
104105
- ".github/workflows/check-prettier-formatting-task.ya?ml"
105106
- "Taskfile.ya?ml"
107+
- "**/.npmrc"
106108
- "**/.prettierignore"
107109
- "**/.prettierrc*"
108110
# CSS

.github/workflows/check-tsconfig-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ on:
66
paths:
77
- ".github/workflows/check-tsconfig-task.ya?ml"
88
- "**/tsconfig*.json"
9+
- ".npmrc"
910
- "package.json"
1011
- "package-lock.json"
1112
- "Taskfile.ya?ml"
1213
pull_request:
1314
paths:
1415
- ".github/workflows/check-tsconfig-task.ya?ml"
1516
- "**/tsconfig*.json"
17+
- ".npmrc"
1618
- "package.json"
1719
- "package-lock.json"
1820
- "Taskfile.ya?ml"

.github/workflows/check-typescript-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- ".github/workflows/check-typescript-task.ya?ml"
88
- ".eslintignore"
99
- "**/.eslintrc*"
10+
- ".npmrc"
1011
- "package.json"
1112
- "package-lock.json"
1213
- "Taskfile.ya?ml"
@@ -21,6 +22,7 @@ on:
2122
- ".github/workflows/check-typescript-task.ya?ml"
2223
- ".eslintignore"
2324
- "**/.eslintrc*"
25+
- ".npmrc"
2426
- "package.json"
2527
- "package-lock.json"
2628
- "Taskfile.ya?ml"

.github/workflows/sync-labels-npm.yml

+2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ on:
1111
paths:
1212
- ".github/workflows/sync-labels-npm.ya?ml"
1313
- ".github/label-configuration-files/*.ya?ml"
14+
- ".npmrc"
1415
- "package.json"
1516
- "package-lock.json"
1617
pull_request:
1718
paths:
1819
- ".github/workflows/sync-labels-npm.ya?ml"
1920
- ".github/label-configuration-files/*.ya?ml"
21+
- ".npmrc"
2022
- "package.json"
2123
- "package-lock.json"
2224
schedule:

.github/workflows/test-typescript-task.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
paths:
66
- ".github/workflows/test-typescript-task.ya?ml"
7+
- ".npmrc"
78
- "jest.config.js"
89
- "package.json"
910
- "package-lock.json"
@@ -17,6 +18,7 @@ on:
1718
pull_request:
1819
paths:
1920
- ".github/workflows/test-typescript-task.ya?ml"
21+
- ".npmrc"
2022
- "jest.config.js"
2123
- "package.json"
2224
- "package-lock.json"

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See: https://docs.npmjs.com/cli/configuring-npm/npmrc
2+
3+
engine-strict = true

0 commit comments

Comments
 (0)