@@ -3,64 +3,125 @@ import {fileURLToPath} from 'node:url';
3
3
4
4
const dirname = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
5
5
6
+ function normalizeProject ( project ) {
7
+ if ( typeof project === 'string' ) {
8
+ project = { repository : project } ;
9
+ }
10
+
11
+ const {
12
+ repository,
13
+ name = repository . split ( '/' ) . pop ( ) ,
14
+ ignore = [ ] ,
15
+ } = project ;
16
+
17
+ return {
18
+ location : path . join ( dirname , 'fixtures' , name ) ,
19
+ ...project ,
20
+ name,
21
+ repository,
22
+ ignore,
23
+ } ;
24
+ }
25
+
6
26
export default [
7
- {
8
- name : 'fixtures-local' ,
9
- location : path . join ( dirname , 'fixtures-local' ) ,
10
- } ,
11
- {
12
- repository : 'https://github.com/avajs/ava' ,
13
- ignore : [
14
- 'test/node_modules' ,
15
- ] ,
16
- } ,
17
- 'https://github.com/chalk/chalk' ,
18
- 'https://github.com/chalk/wrap-ansi' ,
19
- 'https://github.com/sindresorhus/np' ,
20
- 'https://github.com/sindresorhus/ora' ,
21
- 'https://github.com/sindresorhus/p-map' ,
22
- 'https://github.com/sindresorhus/os-locale' ,
23
- 'https://github.com/sindresorhus/execa' ,
24
- 'https://github.com/sindresorhus/pify' ,
25
- 'https://github.com/sindresorhus/boxen' ,
26
- 'https://github.com/sindresorhus/make-dir' ,
27
- 'https://github.com/SamVerschueren/listr' ,
28
- 'https://github.com/SamVerschueren/listr-update-renderer' ,
29
- 'https://github.com/SamVerschueren/clinton' ,
30
- 'https://github.com/SamVerschueren/bragg' ,
31
- 'https://github.com/SamVerschueren/bragg-router' ,
32
- 'https://github.com/SamVerschueren/dev-time' ,
33
- 'https://github.com/SamVerschueren/decode-uri-component' ,
34
- 'https://github.com/kevva/to-ico' ,
35
- 'https://github.com/kevva/download' ,
36
- 'https://github.com/kevva/brightness' ,
37
- 'https://github.com/kevva/decompress' ,
38
- 'https://github.com/kevva/npm-conf' ,
39
- 'https://github.com/imagemin/imagemin' ,
40
- 'https://github.com/qix-/color-convert' ,
41
- 'https://github.com/sindresorhus/ky' ,
42
- 'https://github.com/sindresorhus/query-string' ,
43
- 'https://github.com/sindresorhus/meow' ,
44
- 'https://github.com/sindresorhus/globby' ,
45
- 'https://github.com/sindresorhus/emittery' ,
46
- 'https://github.com/sindresorhus/p-queue' ,
47
- 'https://github.com/sindresorhus/pretty-bytes' ,
48
- 'https://github.com/sindresorhus/normalize-url' ,
49
- 'https://github.com/sindresorhus/pageres' ,
50
- {
51
- repository : 'https://github.com/sindresorhus/got' ,
52
- ignore : [
53
- // This file use `package` keyword as variable
54
- 'documentation/examples/gh-got.js' ,
55
- ] ,
56
- } ,
27
+ [
28
+ {
29
+ name : 'fixtures-local' ,
30
+ location : path . join ( dirname , 'fixtures-local' ) ,
31
+ } ,
32
+ {
33
+ repository : 'https://github.com/avajs/ava' ,
34
+ ignore : [
35
+ 'test/node_modules' ,
36
+ 'test-tap/fixture/report/edgecases/ast-syntax-error.cjs' ,
37
+ ] ,
38
+ } ,
39
+ 'https://github.com/chalk/chalk' ,
40
+ 'https://github.com/chalk/wrap-ansi' ,
41
+ 'https://github.com/sindresorhus/np' ,
42
+ 'https://github.com/sindresorhus/ora' ,
43
+ 'https://github.com/sindresorhus/p-map' ,
44
+ 'https://github.com/sindresorhus/os-locale' ,
45
+ 'https://github.com/sindresorhus/execa' ,
46
+ 'https://github.com/sindresorhus/pify' ,
47
+ 'https://github.com/sindresorhus/boxen' ,
48
+ 'https://github.com/sindresorhus/make-dir' ,
49
+ 'https://github.com/sindresorhus/ky' ,
50
+ 'https://github.com/sindresorhus/query-string' ,
51
+ 'https://github.com/sindresorhus/meow' ,
52
+ 'https://github.com/sindresorhus/globby' ,
53
+ 'https://github.com/sindresorhus/emittery' ,
54
+ 'https://github.com/sindresorhus/p-queue' ,
55
+ 'https://github.com/sindresorhus/pretty-bytes' ,
56
+ 'https://github.com/sindresorhus/normalize-url' ,
57
+ 'https://github.com/sindresorhus/pageres' ,
58
+ {
59
+ repository : 'https://github.com/sindresorhus/got' ,
60
+ ignore : [
61
+ // This file use `package` keyword as variable
62
+ 'documentation/examples/gh-got.js' ,
63
+ ] ,
64
+ } ,
65
+ 'https://github.com/sindresorhus/create-dmg' ,
66
+ 'https://github.com/sindresorhus/cp-file' ,
67
+ 'https://github.com/sindresorhus/capture-website' ,
68
+ {
69
+ repository : 'https://github.com/sindresorhus/file-type' ,
70
+ ignore : [
71
+ // Contains non-text `.mts` file
72
+ 'fixture/**' ,
73
+ ] ,
74
+ } ,
75
+ 'https://github.com/sindresorhus/slugify' ,
76
+ 'https://github.com/SamVerschueren/listr' ,
77
+ 'https://github.com/SamVerschueren/listr-update-renderer' ,
78
+ 'https://github.com/SamVerschueren/clinton' ,
79
+ 'https://github.com/SamVerschueren/bragg' ,
80
+ 'https://github.com/SamVerschueren/bragg-router' ,
81
+ 'https://github.com/SamVerschueren/dev-time' ,
82
+ 'https://github.com/SamVerschueren/decode-uri-component' ,
83
+ 'https://github.com/kevva/to-ico' ,
84
+ 'https://github.com/kevva/download' ,
85
+ 'https://github.com/kevva/brightness' ,
86
+ 'https://github.com/kevva/decompress' ,
87
+ 'https://github.com/kevva/npm-conf' ,
88
+ 'https://github.com/imagemin/imagemin' ,
89
+ 'https://github.com/qix-/color-convert' ,
90
+ {
91
+ repository : 'https://github.com/prettier/prettier' ,
92
+ ignore : [
93
+ 'tests/**' ,
94
+ ] ,
95
+ } ,
96
+ {
97
+ repository : 'https://github.com/puppeteer/puppeteer' ,
98
+ ignore : [
99
+ // Parser error on `await page.evaluate(() => delete Node);`
100
+ // https://github.com/puppeteer/puppeteer/blob/0b1a9ceee2f05f534f0d50079ece172d627a93c7/test/jshandle.spec.js#L151
101
+ 'test/jshandle.spec.js' ,
102
+
103
+ // `package` keyword
104
+ // https://github.com/puppeteer/puppeteer/blob/0b1a9ceee2f05f534f0d50079ece172d627a93c7/utils/apply_next_version.js#L17
105
+ 'utils/apply_next_version.js' ,
106
+
107
+ // Global return
108
+ 'utils/fetch_devices.js' ,
109
+ ] ,
110
+ } ,
111
+ 'https://github.com/ReactTraining/react-router' ,
112
+ // #902
113
+ {
114
+ repository : 'https://github.com/reakit/reakit' ,
115
+ ignore : [
116
+ 'packages/reakit/jest.config.js' , // This file use `package` keyword as variable
117
+ ] ,
118
+ } ,
119
+ // #1030
120
+ 'https://github.com/astrofox-io/astrofox' ,
121
+ // #1075
122
+ 'https://github.com/jaredLunde/masonic' ,
123
+ ] ,
57
124
// 'https://github.com/eslint/eslint',
58
- {
59
- repository : 'https://github.com/prettier/prettier' ,
60
- ignore : [
61
- 'tests/**' ,
62
- ] ,
63
- } ,
64
125
{
65
126
repository : 'https://github.com/angular/angular' ,
66
127
ignore : [
@@ -79,42 +140,20 @@ export default [
79
140
'build/**' ,
80
141
] ,
81
142
} ,
82
- // This repo use `override` keyword which is not avaiable before TS4.3, temporary disable
83
- // https://github.com/microsoft/vscode/pull/120690/files
84
- // {
85
- // repository: 'https://github.com/microsoft/vscode',
86
- // ignore: [
87
- // // This file use `'\033'`
88
- // 'build/**'
89
- // ]
90
- // },
91
- // 'https://github.com/ElemeFE/element',
92
- // 'https://github.com/iview/iview',
93
- 'https://github.com/sindresorhus/create-dmg' ,
94
- 'https://github.com/sindresorhus/cp-file' ,
95
- 'https://github.com/sindresorhus/capture-website' ,
96
- 'https://github.com/sindresorhus/file-type' ,
97
- 'https://github.com/sindresorhus/slugify' ,
98
143
{
99
- repository : 'https://github.com/gatsbyjs/gatsby ' ,
144
+ repository : 'https://github.com/microsoft/vscode ' ,
100
145
ignore : [
101
- // These files use `flow `
102
- '**/*.js ' ,
146
+ // This file use `'\033' `
147
+ 'build/** ' ,
103
148
] ,
104
149
} ,
150
+ 'https://github.com/element-plus/element-plus' ,
151
+ 'https://github.com/tusen-ai/naive-ui' ,
105
152
{
106
- repository : 'https://github.com/puppeteer/puppeteer ' ,
153
+ repository : 'https://github.com/gatsbyjs/gatsby ' ,
107
154
ignore : [
108
- // Parser error on `await page.evaluate(() => delete Node);`
109
- // https://github.com/puppeteer/puppeteer/blob/0b1a9ceee2f05f534f0d50079ece172d627a93c7/test/jshandle.spec.js#L151
110
- 'test/jshandle.spec.js' ,
111
-
112
- // `package` keyword
113
- // https://github.com/puppeteer/puppeteer/blob/0b1a9ceee2f05f534f0d50079ece172d627a93c7/utils/apply_next_version.js#L17
114
- 'utils/apply_next_version.js' ,
115
-
116
- // Global return
117
- 'utils/fetch_devices.js' ,
155
+ // These files use `flow`
156
+ '**/*.js' ,
118
157
] ,
119
158
} ,
120
159
{
@@ -132,7 +171,6 @@ export default [
132
171
'scripts/create-package.js' , // This file use `package` keyword as variable
133
172
] ,
134
173
} ,
135
- 'https://github.com/ReactTraining/react-router' ,
136
174
'https://github.com/mozilla/pdf.js' ,
137
175
// #912
138
176
{
@@ -146,37 +184,13 @@ export default [
146
184
'scripts/cypress.js' ,
147
185
] ,
148
186
} ,
149
- // #902
150
- {
151
- repository : 'https://github.com/reakit/reakit' ,
152
- ignore : [
153
- 'packages/reakit/jest.config.js' , // This file use `package` keyword as variable
154
- ] ,
155
- } ,
156
187
// #903
157
188
'https://github.com/mattermost/mattermost-webapp' ,
158
- // #1030
159
- 'https://github.com/astrofox-io/astrofox' ,
160
- // #1075
161
- 'https://github.com/jaredLunde/masonic' ,
162
189
// These two project use `decorator`, try to enable when we use `@babel/eslint-parser`
163
190
// 'https://github.com/untitled-labs/metabase-custom',
164
191
// 'https://github.com/TheThingsNetwork/lorawan-stack',
165
- ] . map ( project => {
166
- if ( typeof project === 'string' ) {
167
- project = { repository : project } ;
168
- }
169
-
170
- const {
171
- repository,
172
- name = repository . split ( '/' ) . pop ( ) ,
173
- ignore = [ ] ,
174
- } = project ;
175
-
176
- return {
177
- ...project ,
178
- name,
179
- repository,
180
- ignore,
181
- } ;
182
- } ) ;
192
+ ] . flatMap ( ( projectOrProjects , index ) =>
193
+ Array . isArray ( projectOrProjects )
194
+ ? projectOrProjects . map ( project => ( { ...normalizeProject ( project ) , group : index } ) )
195
+ : [ { ...normalizeProject ( projectOrProjects ) , group : index } ] ,
196
+ ) ;
0 commit comments