Skip to content

Commit 29bf19d

Browse files
authored
fix: Ignore transient tap test directories (#364)
Running tests causes a lot of file churn. Although (usually) ephemeral, these files cause high CPU usage and can make developer tools difficult to use. These files also make linting fail. Now the files will be ignored by git and by eslint. ## References Fixes #348 Fixes #359 This is a rebase of #350 since it had yet another conflict. --------- Authored-by: Dan <[email protected]>
1 parent cf286f5 commit 29bf19d

File tree

9 files changed

+46
-3
lines changed

9 files changed

+46
-3
lines changed

Diff for: .eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const localConfigs = readdir(__dirname)
1111
module.exports = {
1212
root: true,
1313
ignorePatterns: [
14+
'tap-testdir*/',
1415
'workspace/test-workspace/**',
1516
],
1617
extends: [

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# ignore everything in the root
44
/*
5+
# transient test directories
6+
tap-testdir*/
57

68
# keep these
79
!**/.gitignore

Diff for: lib/content/eslintrc.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ const localConfigs = readdir(__dirname)
88

99
module.exports = {
1010
root: true,
11-
{{#if workspaceGlobs}}
1211
ignorePatterns: [
12+
'tap-testdir*/',
1313
{{#each workspaceGlobs}}
1414
'{{ . }}',
1515
{{/each}}
1616
],
17-
{{/if}}
1817
extends: [
1918
'@npmcli',
2019
...localConfigs,

Diff for: lib/content/gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ignore everything in the root
22
/*
3+
# transient test directories
4+
tap-testdir*/
35

46
# keep these
57
{{#each ignorePaths}}

Diff for: lib/content/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ module.exports = {
157157
'/LICENSE*',
158158
'/CHANGELOG*',
159159
],
160-
ignorePaths: [],
160+
ignorePaths: [
161+
/* to be provided by consuming package */
162+
],
161163
ciVersions: {},
162164
latestCiVersion: 20,
163165
lockfile: false,

Diff for: tap-snapshots/test/apply/source-snapshots.js.test.cjs

+28
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const localConfigs = readdir(__dirname)
3333
3434
module.exports = {
3535
root: true,
36+
ignorePatterns: [
37+
'tap-testdir*/',
38+
],
3639
extends: [
3740
'@npmcli',
3841
...localConfigs,
@@ -1638,6 +1641,8 @@ jobs:
16381641
16391642
# ignore everything in the root
16401643
/*
1644+
# transient test directories
1645+
tap-testdir*/
16411646
16421647
# keep these
16431648
!**/.gitignore
@@ -1873,6 +1878,7 @@ const localConfigs = readdir(__dirname)
18731878
module.exports = {
18741879
root: true,
18751880
ignorePatterns: [
1881+
'tap-testdir*/',
18761882
'workspaces/a/**',
18771883
'workspaces/b/**',
18781884
],
@@ -3855,6 +3861,8 @@ jobs:
38553861
38563862
# ignore everything in the root
38573863
/*
3864+
# transient test directories
3865+
tap-testdir*/
38583866
38593867
# keep these
38603868
!**/.gitignore
@@ -4078,6 +4086,9 @@ const localConfigs = readdir(__dirname)
40784086
40794087
module.exports = {
40804088
root: true,
4089+
ignorePatterns: [
4090+
'tap-testdir*/',
4091+
],
40814092
extends: [
40824093
'@npmcli',
40834094
...localConfigs,
@@ -4090,6 +4101,8 @@ workspaces/a/.gitignore
40904101
40914102
# ignore everything in the root
40924103
/*
4104+
# transient test directories
4105+
tap-testdir*/
40934106
40944107
# keep these
40954108
!**/.gitignore
@@ -4153,6 +4166,9 @@ const localConfigs = readdir(__dirname)
41534166
41544167
module.exports = {
41554168
root: true,
4169+
ignorePatterns: [
4170+
'tap-testdir*/',
4171+
],
41564172
extends: [
41574173
'@npmcli',
41584174
...localConfigs,
@@ -4165,6 +4181,8 @@ workspaces/b/.gitignore
41654181
41664182
# ignore everything in the root
41674183
/*
4184+
# transient test directories
4185+
tap-testdir*/
41684186
41694187
# keep these
41704188
!**/.gitignore
@@ -5877,6 +5895,9 @@ const localConfigs = readdir(__dirname)
58775895
58785896
module.exports = {
58795897
root: true,
5898+
ignorePatterns: [
5899+
'tap-testdir*/',
5900+
],
58805901
extends: [
58815902
'@npmcli',
58825903
...localConfigs,
@@ -5889,6 +5910,8 @@ workspaces/a/.gitignore
58895910
58905911
# ignore everything in the root
58915912
/*
5913+
# transient test directories
5914+
tap-testdir*/
58925915
58935916
# keep these
58945917
!**/.gitignore
@@ -5952,6 +5975,9 @@ const localConfigs = readdir(__dirname)
59525975
59535976
module.exports = {
59545977
root: true,
5978+
ignorePatterns: [
5979+
'tap-testdir*/',
5980+
],
59555981
extends: [
59565982
'@npmcli',
59575983
...localConfigs,
@@ -5964,6 +5990,8 @@ workspaces/b/.gitignore
59645990
59655991
# ignore everything in the root
59665992
/*
5993+
# transient test directories
5994+
tap-testdir*/
59675995
59685996
# keep these
59695997
!**/.gitignore

Diff for: tap-snapshots/test/check/snapshots.js.test.cjs

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ The following files are tracked by git but matching a pattern in .gitignore:
120120
To correct it: move files to not match one of the following patterns:
121121
122122
/*
123+
tap-testdir*/
123124
!**/.gitignore
124125
!/.commitlintrc.js
125126
!/.eslintrc.js
@@ -159,6 +160,7 @@ The following files are tracked by git but matching a pattern in .gitignore:
159160
To correct it: move files to not match one of the following patterns:
160161
161162
/*
163+
tap-testdir*/
162164
!**/.gitignore
163165
!/.commitlintrc.js
164166
!/.eslintrc.js
@@ -196,6 +198,7 @@ The following files are tracked by git but matching a pattern in workspaces/a/.g
196198
To correct it: move files to not match one of the following patterns:
197199
198200
/*
201+
tap-testdir*/
199202
!**/.gitignore
200203
!/.eslintrc.js
201204
!/.eslintrc.local.*
@@ -221,6 +224,7 @@ The following files are tracked by git but matching a pattern in workspaces/b/.g
221224
To correct it: move files to not match one of the following patterns:
222225
223226
/*
227+
tap-testdir*/
224228
!**/.gitignore
225229
!/.eslintrc.js
226230
!/.eslintrc.local.*

Diff for: workspace/test-workspace/.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ const localConfigs = readdir(__dirname)
1010

1111
module.exports = {
1212
root: true,
13+
ignorePatterns: [
14+
'tap-testdir*/',
15+
],
1316
extends: [
1417
'@npmcli',
1518
...localConfigs,

Diff for: workspace/test-workspace/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# ignore everything in the root
44
/*
5+
# transient test directories
6+
tap-testdir*/
57

68
# keep these
79
!**/.gitignore

0 commit comments

Comments
 (0)