Only ignore node_modules at the top of the tree.

Review Request #14146 — Created Sept. 5, 2024 and updated

Information

Review Board
release-7.1.x

Reviewers

If there's a node_modules unintentionally created anywhere but at the
top of the tree, it's possible for this to interfere when loading
modules in Review Board. For example, Vite (used by Storybook) will
consider it a candidate for module lookup, and could find stale modules.

To make this problem more obvious, we no longer ignore node_modules
anywhere but the top of the tree. git status will then report any
stray copies, helping address the problem.

Installed packages in a subdirectory and ran git status. Saw the
stray `node_modules.

Summary ID
Only ignore node_modules at the top of the tree.
If there's a `node_modules` unintentionally created anywhere but at the top of the tree, it's possible for this to interfere when loading modules in Review Board. For example, Vite (used by Storybook) will consider it a candidate for module lookup, and could find stale modules. To make this problem more obvious, we no longer ignore `node_modules` anywhere but the top of the tree. `git status` will then report any stray copies, helping address the problem.
b2a119c128e08de8460a65902585eea3f7988345
chipx86
Review request changed
Change Summary:

Added a comment explaining why we're ignoring only the top-level node_modules.

Commits:
Summary ID
Only ignore node_modules at the top of the tree.
If there's a `node_modules` unintentionally created anywhere but at the top of the tree, it's possible for this to interfere when loading modules in Review Board. For example, Vite (used by Storybook) will consider it a candidate for module lookup, and could find stale modules. To make this problem more obvious, we no longer ignore `node_modules` anywhere but the top of the tree. `git status` will then report any stray copies, helping address the problem.
7e749ed0e426cec98997d47b246cd43603a403c9
Only ignore node_modules at the top of the tree.
If there's a `node_modules` unintentionally created anywhere but at the top of the tree, it's possible for this to interfere when loading modules in Review Board. For example, Vite (used by Storybook) will consider it a candidate for module lookup, and could find stale modules. To make this problem more obvious, we no longer ignore `node_modules` anywhere but the top of the tree. `git status` will then report any stray copies, helping address the problem.
b2a119c128e08de8460a65902585eea3f7988345

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. Ship It!
  2.