From 95f8800d3837541504ae66579751eeea309b6c7b Mon Sep 17 00:00:00 2001 From: Keith Wade Date: Wed, 15 Jul 2026 13:07:17 -0400 Subject: [PATCH] Remove deprecated `--unsafe-perm` from npm commands --- aws_lambda_builders/workflows/nodejs_npm/actions.py | 3 +-- tests/unit/workflows/nodejs_npm/test_actions.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/aws_lambda_builders/workflows/nodejs_npm/actions.py b/aws_lambda_builders/workflows/nodejs_npm/actions.py index de745cdc7..c1aa9f00b 100644 --- a/aws_lambda_builders/workflows/nodejs_npm/actions.py +++ b/aws_lambda_builders/workflows/nodejs_npm/actions.py @@ -111,7 +111,7 @@ def execute(self): try: LOG.debug("NODEJS installing production dependencies in: %s", self.install_dir) - command = ["install", "-q", "--no-audit", "--no-save", "--unsafe-perm", "--omit=dev"] + command = ["install", "-q", "--no-audit", "--no-save", "--omit=dev"] self.subprocess_npm.run(command, cwd=self.install_dir) except NpmExecutionError as ex: @@ -139,7 +139,6 @@ def execute(self): "update", "--no-audit", "--no-save", - "--unsafe-perm", "--omit=dev", "--no-package-lock", "--install-links", diff --git a/tests/unit/workflows/nodejs_npm/test_actions.py b/tests/unit/workflows/nodejs_npm/test_actions.py index 2592944ac..a63337330 100644 --- a/tests/unit/workflows/nodejs_npm/test_actions.py +++ b/tests/unit/workflows/nodejs_npm/test_actions.py @@ -67,7 +67,7 @@ def test_installs_npm_production_dependencies_for_npm_project(self, SubprocessNp action.execute() - expected_args = ["install", "-q", "--no-audit", "--no-save", "--unsafe-perm", "--omit=dev"] + expected_args = ["install", "-q", "--no-audit", "--no-save", "--omit=dev"] subprocess_npm.run.assert_called_with(expected_args, cwd="artifacts")