Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ignore transient tap test directories #350

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!/SECURITY.md
!/tap-snapshots/
!/test/
tap-testdir-*/
!/workspace/
/workspace/*
!/workspace/test-workspace/
4 changes: 3 additions & 1 deletion lib/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ module.exports = {
'/LICENSE*',
'/CHANGELOG*',
],
ignorePaths: [],
ignorePaths: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let @lukekarrys weigh in here since it's surprising to me coming in fresh on this that we don't have anything in here already.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rotu the current pattern is to put these paths in lib/content/gitignore and leave ignorePaths as a config to be set by consumers. can you make that change? apologies that this is not discoverable! 🙇🏼

Copy link
Contributor Author

@rotu rotu Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. I can add the breadcrumbs that would have retroactively helped me. The lib/content/gitignore file is clearly a template of some sort. What instantiates this template?

EDIT: nvm found it: https://github.com/npm/template-oss/blob/2a5e18677f6de45d903b7d06ec7780c7d31b6963/lib/util/template.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, any reason why allowPaths and distPaths are inlined in this file but ignorePaths is not?

'tap-testdir-*/',
],
ciVersions: ['14.17.0', '14.x', '16.13.0', '16.x', '18.0.0', '18.x'],
lockfile: false,
codeowner: '@npm/cli-team',
Expand Down
6 changes: 6 additions & 0 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,7 @@ jobs:
!/SECURITY.md
!/tap-snapshots/
!/test/
tap-testdir-*/

.npmrc
========================================
Expand Down Expand Up @@ -2941,6 +2942,7 @@ jobs:
!/SECURITY.md
!/tap-snapshots/
!/test/
tap-testdir-*/
!/workspaces/
/workspaces/*
!/workspaces/a/
Expand Down Expand Up @@ -3171,6 +3173,7 @@ workspaces/a/.gitignore
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

workspaces/a/package.json
========================================
Expand Down Expand Up @@ -3249,6 +3252,7 @@ workspaces/b/.gitignore
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

workspaces/b/package.json
========================================
Expand Down Expand Up @@ -4549,6 +4553,7 @@ workspaces/a/.gitignore
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

workspaces/a/package.json
========================================
Expand Down Expand Up @@ -4627,6 +4632,7 @@ workspaces/b/.gitignore
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

workspaces/b/package.json
========================================
Expand Down
4 changes: 4 additions & 0 deletions tap-snapshots/test/check/snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ To correct it: move files to not match one of the following patterns:
!/SECURITY.md
!/tap-snapshots/
!/test/
tap-testdir-*/

-------------------------------------------------------------------
`
Expand Down Expand Up @@ -185,6 +186,7 @@ To correct it: move files to not match one of the following patterns:
!/SECURITY.md
!/tap-snapshots/
!/test/
tap-testdir-*/
!/workspaces/
/workspaces/*
!/workspaces/a/
Expand Down Expand Up @@ -214,6 +216,7 @@ To correct it: move files to not match one of the following patterns:
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

-------------------------------------------------------------------

Expand All @@ -239,6 +242,7 @@ To correct it: move files to not match one of the following patterns:
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/

-------------------------------------------------------------------
`
Expand Down
1 change: 1 addition & 0 deletions workspace/test-workspace/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
!/scripts/
!/tap-snapshots/
!/test/
tap-testdir-*/