@@ -80,6 +80,7 @@ describe("updateLocalFiles", () => {
80
80
[
81
81
[
82
82
{
83
+ "allowEmptyPaths": true,
83
84
"files": [
84
85
"./.github/**/*",
85
86
"./*.*",
@@ -90,6 +91,7 @@ describe("updateLocalFiles", () => {
90
91
],
91
92
[
92
93
{
94
+ "allowEmptyPaths": true,
93
95
"files": [
94
96
"./.github/**/*",
95
97
"./*.*",
@@ -100,6 +102,7 @@ describe("updateLocalFiles", () => {
100
102
],
101
103
[
102
104
{
105
+ "allowEmptyPaths": true,
103
106
"files": [
104
107
"./.github/**/*",
105
108
"./*.*",
@@ -110,69 +113,79 @@ describe("updateLocalFiles", () => {
110
113
],
111
114
[
112
115
{
116
+ "allowEmptyPaths": true,
113
117
"files": ".eslintrc.cjs",
114
118
"from": /\\\\/\\\\\\*\\\\n\\.\\+\\\\\\*\\\\/\\\\n\\\\n/gs,
115
119
"to": "",
116
120
},
117
121
],
118
122
[
119
123
{
124
+ "allowEmptyPaths": true,
120
125
"files": "./package.json",
121
126
"from": /"author": "\\.\\+"/g,
122
127
"to": "\\"author\\": \\"undefined\\"",
123
128
},
124
129
],
125
130
[
126
131
{
132
+ "allowEmptyPaths": true,
127
133
"files": "./package.json",
128
134
"from": /"bin": "\\.\\+\\\\n/g,
129
135
"to": "",
130
136
},
131
137
],
132
138
[
133
139
{
140
+ "allowEmptyPaths": true,
134
141
"files": "./package.json",
135
142
"from": /"test:create": "\\.\\+\\\\n/g,
136
143
"to": "",
137
144
},
138
145
],
139
146
[
140
147
{
148
+ "allowEmptyPaths": true,
141
149
"files": "./package.json",
142
150
"from": /"test:initialize": "\\.\\*/g,
143
151
"to": "",
144
152
},
145
153
],
146
154
[
147
155
{
156
+ "allowEmptyPaths": true,
148
157
"files": "./package.json",
149
158
"from": /"initialize": "\\.\\*/g,
150
159
"to": "",
151
160
},
152
161
],
153
162
[
154
163
{
164
+ "allowEmptyPaths": true,
155
165
"files": "./package.json",
156
166
"from": /"test:migrate": "\\.\\+\\\\n/g,
157
167
"to": "",
158
168
},
159
169
],
160
170
[
161
171
{
172
+ "allowEmptyPaths": true,
162
173
"files": "./README.md",
163
174
"from": /## Getting Started\\.\\*## Development/gs,
164
175
"to": "## Development",
165
176
},
166
177
],
167
178
[
168
179
{
180
+ "allowEmptyPaths": true,
169
181
"files": "./.github/DEVELOPMENT.md",
170
182
"from": /\\\\n## Setup Scripts\\.\\*\\$/gs,
171
183
"to": "",
172
184
},
173
185
],
174
186
[
175
187
{
188
+ "allowEmptyPaths": true,
176
189
"files": "./knip.jsonc",
177
190
"from": " \\"src/initialize/index.ts\\",
178
191
",
@@ -181,6 +194,7 @@ describe("updateLocalFiles", () => {
181
194
],
182
195
[
183
196
{
197
+ "allowEmptyPaths": true,
184
198
"files": "./knip.jsonc",
185
199
"from": " \\"src/migrate/index.ts\\",
186
200
",
@@ -189,20 +203,23 @@ describe("updateLocalFiles", () => {
189
203
],
190
204
[
191
205
{
206
+ "allowEmptyPaths": true,
192
207
"files": "./knip.jsonc",
193
208
"from": "[\\"src/index.ts!\\", \\"script/initialize*.js\\"]",
194
209
"to": "\\"src/index.ts!\\"",
195
210
},
196
211
],
197
212
[
198
213
{
214
+ "allowEmptyPaths": true,
199
215
"files": "./knip.jsonc",
200
216
"from": "[\\"src/**/*.ts!\\", \\"script/**/*.js\\"]",
201
217
"to": "\\"src/**/*.ts!\\"",
202
218
},
203
219
],
204
220
[
205
221
{
222
+ "allowEmptyPaths": true,
206
223
"files": "./README.md",
207
224
"from": "> 💙 This package is based on [@StubOwner](https://github.com/StubOwner)'s [stub-repository](https://github.com/JoshuaKGoldberg/stub-repository).",
208
225
"to": "> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).",
@@ -222,6 +239,7 @@ describe("updateLocalFiles", () => {
222
239
[
223
240
[
224
241
{
242
+ "allowEmptyPaths": true,
225
243
"files": [
226
244
"./.github/**/*",
227
245
"./*.*",
@@ -232,6 +250,7 @@ describe("updateLocalFiles", () => {
232
250
],
233
251
[
234
252
{
253
+ "allowEmptyPaths": true,
235
254
"files": [
236
255
"./.github/**/*",
237
256
"./*.*",
@@ -242,6 +261,7 @@ describe("updateLocalFiles", () => {
242
261
],
243
262
[
244
263
{
264
+ "allowEmptyPaths": true,
245
265
"files": [
246
266
"./.github/**/*",
247
267
"./*.*",
@@ -252,69 +272,79 @@ describe("updateLocalFiles", () => {
252
272
],
253
273
[
254
274
{
275
+ "allowEmptyPaths": true,
255
276
"files": ".eslintrc.cjs",
256
277
"from": /\\\\/\\\\\\*\\\\n\\.\\+\\\\\\*\\\\/\\\\n\\\\n/gs,
257
278
"to": "",
258
279
},
259
280
],
260
281
[
261
282
{
283
+ "allowEmptyPaths": true,
262
284
"files": "./package.json",
263
285
"from": /"author": "\\.\\+"/g,
264
286
"to": "\\"author\\": \\"undefined\\"",
265
287
},
266
288
],
267
289
[
268
290
{
291
+ "allowEmptyPaths": true,
269
292
"files": "./package.json",
270
293
"from": /"bin": "\\.\\+\\\\n/g,
271
294
"to": "",
272
295
},
273
296
],
274
297
[
275
298
{
299
+ "allowEmptyPaths": true,
276
300
"files": "./package.json",
277
301
"from": /"test:create": "\\.\\+\\\\n/g,
278
302
"to": "",
279
303
},
280
304
],
281
305
[
282
306
{
307
+ "allowEmptyPaths": true,
283
308
"files": "./package.json",
284
309
"from": /"test:initialize": "\\.\\*/g,
285
310
"to": "",
286
311
},
287
312
],
288
313
[
289
314
{
315
+ "allowEmptyPaths": true,
290
316
"files": "./package.json",
291
317
"from": /"initialize": "\\.\\*/g,
292
318
"to": "",
293
319
},
294
320
],
295
321
[
296
322
{
323
+ "allowEmptyPaths": true,
297
324
"files": "./package.json",
298
325
"from": /"test:migrate": "\\.\\+\\\\n/g,
299
326
"to": "",
300
327
},
301
328
],
302
329
[
303
330
{
331
+ "allowEmptyPaths": true,
304
332
"files": "./README.md",
305
333
"from": /## Getting Started\\.\\*## Development/gs,
306
334
"to": "## Development",
307
335
},
308
336
],
309
337
[
310
338
{
339
+ "allowEmptyPaths": true,
311
340
"files": "./.github/DEVELOPMENT.md",
312
341
"from": /\\\\n## Setup Scripts\\.\\*\\$/gs,
313
342
"to": "",
314
343
},
315
344
],
316
345
[
317
346
{
347
+ "allowEmptyPaths": true,
318
348
"files": "./knip.jsonc",
319
349
"from": " \\"src/initialize/index.ts\\",
320
350
",
@@ -323,6 +353,7 @@ describe("updateLocalFiles", () => {
323
353
],
324
354
[
325
355
{
356
+ "allowEmptyPaths": true,
326
357
"files": "./knip.jsonc",
327
358
"from": " \\"src/migrate/index.ts\\",
328
359
",
@@ -331,20 +362,23 @@ describe("updateLocalFiles", () => {
331
362
],
332
363
[
333
364
{
365
+ "allowEmptyPaths": true,
334
366
"files": "./knip.jsonc",
335
367
"from": "[\\"src/index.ts!\\", \\"script/initialize*.js\\"]",
336
368
"to": "\\"src/index.ts!\\"",
337
369
},
338
370
],
339
371
[
340
372
{
373
+ "allowEmptyPaths": true,
341
374
"files": "./knip.jsonc",
342
375
"from": "[\\"src/**/*.ts!\\", \\"script/**/*.js\\"]",
343
376
"to": "\\"src/**/*.ts!\\"",
344
377
},
345
378
],
346
379
[
347
380
{
381
+ "allowEmptyPaths": true,
348
382
"files": "./README.md",
349
383
"from": "> 💙 This package is based on [@StubOwner](https://github.com/StubOwner)'s [stub-repository](https://github.com/JoshuaKGoldberg/stub-repository).",
350
384
"to": "> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).",
@@ -361,6 +395,7 @@ describe("updateLocalFiles", () => {
361
395
await updateLocalFiles ( { ...options , mode : "initialize" } ) ;
362
396
363
397
expect ( mockReplaceInFile ) . not . toHaveBeenCalledWith ( {
398
+ allowEmptyPaths : true ,
364
399
files : [ "./.github/**/*" , "./*.*" ] ,
365
400
from : expect . anything ( ) ,
366
401
to : options . description ,
@@ -377,6 +412,7 @@ describe("updateLocalFiles", () => {
377
412
await updateLocalFiles ( { ...options , mode : "initialize" } ) ;
378
413
379
414
expect ( mockReplaceInFile ) . toHaveBeenCalledWith ( {
415
+ allowEmptyPaths : true ,
380
416
files : [ "./.github/**/*" , "./*.*" ] ,
381
417
from : existingDescription ,
382
418
to : options . description ,
@@ -392,6 +428,7 @@ describe("updateLocalFiles", () => {
392
428
await updateLocalFiles ( { ...options , mode : "initialize" } ) ;
393
429
394
430
expect ( mockReplaceInFile ) . toHaveBeenCalledWith ( {
431
+ allowEmptyPaths : true ,
395
432
files : "./package.json" ,
396
433
from : / " b i n " : " .+ \n / g,
397
434
to : "" ,
@@ -407,6 +444,7 @@ describe("updateLocalFiles", () => {
407
444
await updateLocalFiles ( { ...options , mode : "migrate" } ) ;
408
445
409
446
expect ( mockReplaceInFile ) . not . toHaveBeenCalledWith ( {
447
+ allowEmptyPaths : true ,
410
448
files : "./package.json" ,
411
449
from : / " b i n " : " .+ \n / g,
412
450
to : "" ,
@@ -422,6 +460,7 @@ describe("updateLocalFiles", () => {
422
460
await updateLocalFiles ( { ...options , mode : "initialize" } ) ;
423
461
424
462
expect ( mockReplaceInFile ) . toHaveBeenCalledWith ( {
463
+ allowEmptyPaths : true ,
425
464
files : "./package.json" ,
426
465
from : / " v e r s i o n " : " 1 .2 .3 " / g,
427
466
to : '"version": "0.0.0"' ,
@@ -437,6 +476,7 @@ describe("updateLocalFiles", () => {
437
476
await updateLocalFiles ( { ...options , mode : "migrate" } ) ;
438
477
439
478
expect ( mockReplaceInFile ) . not . toHaveBeenCalledWith ( {
479
+ allowEmptyPaths : true ,
440
480
files : "./package.json" ,
441
481
from : / " v e r s i o n " : " 1 .2 .3 " / g,
442
482
to : '"version": "0.0.0"' ,
0 commit comments