Skip to content

Commit e700ae5

Browse files
author
Ryan Sonshine
committed
Add strict check on npm version
This change adds a strict check on npm version since npm v7 introduced breaking changes related to the "preinstall" hook. Ref: bb2c74f#commitcomment-52655924
1 parent bb2c74f commit e700ae5

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

my-app/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

my-app/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.0.0",
44
"description": "A sample application consuming a private scoped npm package",
55
"main": "index.js",
6+
"engines": {
7+
"npm": "<=6"
8+
},
69
"scripts": {
710
"preinstall": "npm run co:login",
811
"co:login": "aws codeartifact login --tool npm --repository my-repo --domain my-domain"

my-package/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

my-package/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.0.0",
44
"description": "A sample private scoped npm package",
55
"main": "index.js",
6+
"engines": {
7+
"npm": "<=6"
8+
},
69
"scripts": {
710
"prepare": "npm run co:login",
811
"co:login": "aws codeartifact login --tool npm --repository my-repo --domain my-domain"

0 commit comments

Comments
 (0)