Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- The "no package-lock.json" error when deploying Node.js content now states
that Connect installs Node.js dependencies with npm, helping publishers who
build with yarn or pnpm understand why a `package-lock.json` is required.
- `pyproject.toml` can now be supplied via `--requirements-file` for deploy and
write-manifest.
- Perform case insensitive matching of the configured Snowflake connection authenticator.
Expand Down
1 change: 1 addition & 0 deletions rsconnect/environment_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def create(
if not has_lock_file:
raise RSConnectException(
f"No package-lock.json found in '{directory}'. "
"Connect installs Node.js dependencies with npm. "
"Both package.json and package-lock.json are required to deploy Node.js content."
)

Expand Down
5 changes: 4 additions & 1 deletion tests/test_environment_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def test_create_basic(self, mock_run):
def test_create_no_lock_file(self, mock_run, tmp_path):
(tmp_path / "package.json").write_text(json.dumps({"dependencies": {"express": "^4.21.0"}}))
(tmp_path / "app.js").write_text("// app")
with pytest.raises(RSConnectException, match="No package-lock.json found"):
with pytest.raises(
RSConnectException,
match="No package-lock.json found.*Connect installs Node.js dependencies with npm",
):
NodeEnvironment.create(str(tmp_path))

@patch("rsconnect.environment_node.subprocess.run", side_effect=_mock_run)
Expand Down
Loading