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
6 changes: 6 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`uv venv` and `uv sync` to populate the scaffolded project's virtualenv.
`uv` installs as a self-contained wheel from PyPI alongside `rsconnect`.

### Fixed

- Python virtual environments (e.g. `.venv`) in a Node.js project directory are
now excluded from the generated `manifest.json`, matching the behavior of the
Python and Quarto content types.

## [1.29.0] - 2026-04-29

- Added `rsconnect deploy nodejs` command for deploying Node.js applications
Expand Down
1 change: 1 addition & 0 deletions rsconnect/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1438,6 +1438,7 @@ def make_nodejs_manifest(
excludes = list(excludes) if excludes else []
excludes.append("manifest.json")
excludes.append("node_modules")
excludes.extend(list_environment_dirs(directory))

relevant_files = create_file_list(directory, extra_files, excludes)

Expand Down
15 changes: 15 additions & 0 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3167,6 +3167,21 @@ def test_manifest_includes_lock_file(self, tmp_path):

assert "package-lock.json" in manifest["files"]

def test_manifest_excludes_python_virtual_environment(self, tmp_path):
(tmp_path / "package.json").write_text('{"dependencies":{}}')
(tmp_path / "app.js").write_text("// app")
# Make a directory that looks like a Python virtualenv (has bin/python).
venv_bin = tmp_path / ".venv" / "bin"
venv_bin.mkdir(parents=True)
(venv_bin / "python").write_text("")
(tmp_path / ".venv" / "pyvenv.cfg").write_text("")

env = _make_node_env()
manifest, files = make_nodejs_manifest(str(tmp_path), "app.js", env, [], [])

for f in manifest["files"]:
assert ".venv" not in f


class TestNodeJSBundle:
def test_bundle_contents(self):
Expand Down
Loading