From 15d604cfc69a19840edee138e554ddd9008d24cc Mon Sep 17 00:00:00 2001 From: joshyam-k Date: Mon, 22 Jun 2026 10:42:18 -0700 Subject: [PATCH 1/2] add python env exclusion for nodejs manifest generation --- rsconnect/bundle.py | 1 + tests/test_bundle.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/rsconnect/bundle.py b/rsconnect/bundle.py index 4a221157..ae7defdc 100644 --- a/rsconnect/bundle.py +++ b/rsconnect/bundle.py @@ -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) diff --git a/tests/test_bundle.py b/tests/test_bundle.py index 591cbbda..332fae41 100644 --- a/tests/test_bundle.py +++ b/tests/test_bundle.py @@ -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): From 19aa6073acb6e5dec29bf2b341fdd010671f9b4b Mon Sep 17 00:00:00 2001 From: joshyam-k Date: Mon, 22 Jun 2026 10:54:37 -0700 Subject: [PATCH 2/2] update changelog --- docs/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0d7c2a9e..6e52bc83 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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