Skip to content

Commit 002b6f9

Browse files
authored
chore: Improve npm install debug logging (#652)
1 parent 4b8b675 commit 002b6f9

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ integ-test:
1717
LAMBDA_BUILDERS_DEV=1 pytest tests/integration
1818

1919
lint:
20-
# Liner performs static analysis to catch latent bugs
21-
ruff aws_lambda_builders
20+
# Linter performs static analysis to catch latent bugs
21+
ruff check aws_lambda_builders
2222

2323
lint-fix:
2424
ruff aws_lambda_builders --fix
@@ -35,4 +35,4 @@ black-check:
3535
# Verifications to run before sending a pull request
3636
pr: init dev black-check
3737

38-
format: lint-fix black
38+
format: lint-fix black

aws_lambda_builders/workflows/nodejs_npm/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def execute(self):
108108
:raises lambda_builders.actions.ActionFailedError: when NPM execution fails
109109
"""
110110
try:
111-
LOG.debug("NODEJS installing in: %s", self.install_dir)
111+
LOG.debug("NODEJS installing production dependencies in: %s", self.install_dir)
112112

113113
command = ["install", "-q", "--no-audit", "--no-save", "--unsafe-perm", "--production"]
114114
self.subprocess_npm.run(command, cwd=self.install_dir)
@@ -132,7 +132,7 @@ def execute(self):
132132
:raises lambda_builders.actions.ActionFailedError: when NPM execution fails
133133
"""
134134
try:
135-
LOG.debug("NODEJS updating in: %s", self.install_dir)
135+
LOG.debug("NODEJS updating production dependencies in: %s", self.install_dir)
136136

137137
command = [
138138
"update",

aws_lambda_builders/workflows/nodejs_npm/workflow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ def get_install_action(
243243
if build_options and isinstance(build_options, dict):
244244
npm_ci_option = build_options.get("use_npm_ci", False)
245245

246+
LOG.debug(
247+
"npm installation actions install only production dependencies. "
248+
"Dev dependencies are omitted from the Lambda artifacts package"
249+
)
250+
246251
if (osutils.file_exists(lockfile_path) or osutils.file_exists(shrinkwrap_path)) and npm_ci_option:
247252
return NodejsNpmCIAction(
248253
install_dir=install_dir, subprocess_npm=subprocess_npm, install_links=is_building_in_source

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
[tool.ruff]
22
line-length = 120
33

4+
[tool.ruff.lint]
5+
46
select = [
5-
"E", # Pycodestyle
6-
"F", # Pyflakes
7-
"PL", # pylint
8-
"I", # isort
7+
"E", # Pycodestyle
8+
"F", # Pyflakes
9+
"PL", # pylint
10+
"I", # isort
911
]
1012
ignore = ["PLR0913"]
1113

12-
[tool.ruff.pylint]
14+
[tool.ruff.lint.pylint]
1315
max-branches = 13
1416

15-
[tool.ruff.per-file-ignores]
17+
[tool.ruff.lint.per-file-ignores]
1618
"__init__.py" = ["F401", "E501"]
1719
"aws_lambda_builders/workflow.py" = ["E501"]
1820

@@ -32,4 +34,4 @@ exclude = '''
3234
| pip-wheel-metadata
3335
)/
3436
)
35-
'''
37+
'''

0 commit comments

Comments
 (0)