Skip to content

Commit ae40e36

Browse files
authored
chore: 🤖 Add strict .npmrc file (#389)
* chore: 🤖 Add strict `.npmrc` file Add `.npmrc` with sane defaults * Add Node.js version requirement to package.json Add engines field to specify Node.js version requirement.
1 parent d006c27 commit ae40e36

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.npmrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# If set to false, then ignore package-lock.json files when installing. This will also prevent writing package-lock.json if save is true. source: https://docs.npmjs.com/cli/v11/using-npm/config
2+
package-lock=true
3+
# If true, npm does not run scripts specified in package.json files. source: https://docs.npmjs.com/cli/v11/using-npm/config#ignore-scripts
4+
ignore-scripts=true
5+
# Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. source: https://docs.npmjs.com/cli/v11/using-npm/config#save-exact
6+
save-exact=true
7+
# If set to true, then npm will stubbornly refuse to install (or even consider installing) any package that claims to not be compatible with the current Node.js version. source: https://docs.npmjs.com/cli/v11/using-npm/config#engine-strict
8+
engine-strict=true

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@
2828
"sass": "^1.93.2",
2929
"vue": "^3.2.31"
3030
},
31-
"private": true
31+
"private": true,
32+
"engines": {
33+
"node": ">= 22"
34+
}
3235
}

0 commit comments

Comments
 (0)