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 #364

Merged
merged 4 commits into from
Sep 15, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const localConfigs = readdir(__dirname)
module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
'workspace/test-workspace/**',
],
extends: [
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down
3 changes: 1 addition & 2 deletions lib/content/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
{{#if workspaceGlobs}}
ignorePatterns: [
'tap-testdir*/',
{{#each workspaceGlobs}}
'{{ . }}',
{{/each}}
],
{{/if}}
extends: [
'@npmcli',
...localConfigs,
Expand Down
2 changes: 2 additions & 0 deletions lib/content/gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
{{#each ignorePaths}}
Expand Down
4 changes: 3 additions & 1 deletion lib/content/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ module.exports = {
'/LICENSE*',
'/CHANGELOG*',
],
ignorePaths: [],
ignorePaths: [
/* to be provided by consuming package */
],
ciVersions: {},
latestCiVersion: 20,
lockfile: false,
Expand Down
28 changes: 28 additions & 0 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand Down Expand Up @@ -1638,6 +1641,8 @@ jobs:

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down Expand Up @@ -1873,6 +1878,7 @@ const localConfigs = readdir(__dirname)
module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
'workspaces/a/**',
'workspaces/b/**',
],
Expand Down Expand Up @@ -3855,6 +3861,8 @@ jobs:

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down Expand Up @@ -4078,6 +4086,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand All @@ -4090,6 +4101,8 @@ workspaces/a/.gitignore

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down Expand Up @@ -4153,6 +4166,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand All @@ -4165,6 +4181,8 @@ workspaces/b/.gitignore

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down Expand Up @@ -5877,6 +5895,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand All @@ -5889,6 +5910,8 @@ workspaces/a/.gitignore

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down Expand Up @@ -5952,6 +5975,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand All @@ -5964,6 +5990,8 @@ workspaces/b/.gitignore

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
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 @@ -120,6 +120,7 @@ The following files are tracked by git but matching a pattern in .gitignore:
To correct it: move files to not match one of the following patterns:

/*
tap-testdir*/
!**/.gitignore
!/.commitlintrc.js
!/.eslintrc.js
Expand Down Expand Up @@ -159,6 +160,7 @@ The following files are tracked by git but matching a pattern in .gitignore:
To correct it: move files to not match one of the following patterns:

/*
tap-testdir*/
!**/.gitignore
!/.commitlintrc.js
!/.eslintrc.js
Expand Down Expand Up @@ -196,6 +198,7 @@ The following files are tracked by git but matching a pattern in workspaces/a/.g
To correct it: move files to not match one of the following patterns:

/*
tap-testdir*/
!**/.gitignore
!/.eslintrc.js
!/.eslintrc.local.*
Expand All @@ -221,6 +224,7 @@ The following files are tracked by git but matching a pattern in workspaces/b/.g
To correct it: move files to not match one of the following patterns:

/*
tap-testdir*/
!**/.gitignore
!/.eslintrc.js
!/.eslintrc.local.*
Expand Down
3 changes: 3 additions & 0 deletions workspace/test-workspace/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const localConfigs = readdir(__dirname)

module.exports = {
root: true,
ignorePatterns: [
'tap-testdir*/',
],
extends: [
'@npmcli',
...localConfigs,
Expand Down
2 changes: 2 additions & 0 deletions workspace/test-workspace/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# ignore everything in the root
/*
# transient test directories
tap-testdir*/

# keep these
!**/.gitignore
Expand Down