Skip to content

Commit

Permalink
Node-Extensions workaround npm regression (#7022)
Browse files Browse the repository at this point in the history
npm version 10.4.0 introduced a regression where it auto-adds a default
install script during publish when a binding.gyp file exists. This
install script attempts to recompile binaries upon install. This is
breaking installation of node-extensions as we ship precompiled binaries
and don't include the .gyp file in the package.

To workaround this I've added an explicit install script that simply
exits so npm doesn't add its own.
  • Loading branch information
tnorling authored Apr 10, 2024
1 parent b7c2309 commit 5f57e84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Add install script to workaround regression in npm version 10.4.0",
"packageName": "@azure/msal-node-extensions",
"email": "[email protected]",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions extensions/msal-node-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"scripts": {
"compile": "node-gyp rebuild",
"install": "exit 0",
"clean": "shx rm -rf dist bin",
"build": "npm run clean && rollup -c --strictDeprecations --bundleConfigAsCjs && node ./scripts/buildBinaries.cjs",
"build:all": "cd ../.. && npm run build --workspace=@azure/msal-common --workspace=@azure/msal-node-extensions",
Expand Down

0 comments on commit 5f57e84

Please sign in to comment.