From 5f57e84f83958d07f5178cd1d0e5af0c3341985c Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Wed, 10 Apr 2024 15:23:21 -0700 Subject: [PATCH] Node-Extensions workaround npm regression (#7022) 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. --- ...de-extensions-0f5d369f-db72-4b7d-b9c2-b2b29ba2fec6.json | 7 +++++++ extensions/msal-node-extensions/package.json | 1 + 2 files changed, 8 insertions(+) create mode 100644 change/@azure-msal-node-extensions-0f5d369f-db72-4b7d-b9c2-b2b29ba2fec6.json diff --git a/change/@azure-msal-node-extensions-0f5d369f-db72-4b7d-b9c2-b2b29ba2fec6.json b/change/@azure-msal-node-extensions-0f5d369f-db72-4b7d-b9c2-b2b29ba2fec6.json new file mode 100644 index 0000000000..f7723e457f --- /dev/null +++ b/change/@azure-msal-node-extensions-0f5d369f-db72-4b7d-b9c2-b2b29ba2fec6.json @@ -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": "thomas.norling@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/extensions/msal-node-extensions/package.json b/extensions/msal-node-extensions/package.json index 5f5fe19910..ec059ec0c4 100644 --- a/extensions/msal-node-extensions/package.json +++ b/extensions/msal-node-extensions/package.json @@ -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",