@atlaspack/core 2.12.1-dev.3368 → 2.12.1-dev.3401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/index.d.ts +8 -0
  2. package/lib/AtlaspackConfig.js +3 -3
  3. package/lib/AtlaspackConfig.schema.js +10 -6
  4. package/lib/BundleGraph.js +3 -3
  5. package/lib/PackagerRunner.js +1 -1
  6. package/lib/dumpGraphToGraphViz.js +1 -1
  7. package/lib/index.js +7 -0
  8. package/lib/loadAtlaspackPlugin.js +6 -6
  9. package/lib/public/PluginOptions.js +5 -5
  10. package/lib/requests/AtlaspackConfigRequest.js +8 -8
  11. package/lib/resolveOptions.js +3 -3
  12. package/package.json +16 -16
  13. package/src/AtlaspackConfig.js +3 -3
  14. package/src/AtlaspackConfig.schema.js +10 -7
  15. package/src/BundleGraph.js +3 -3
  16. package/src/PackagerRunner.js +1 -1
  17. package/src/dumpGraphToGraphViz.js +1 -1
  18. package/src/index.js +1 -0
  19. package/src/loadAtlaspackPlugin.js +14 -14
  20. package/src/public/PluginOptions.js +5 -5
  21. package/src/requests/AtlaspackConfigRequest.js +8 -8
  22. package/src/resolveOptions.js +3 -3
  23. package/src/types.js +5 -3
  24. package/test/Atlaspack.test.js +1 -1
  25. package/test/AtlaspackConfig.test.js +27 -27
  26. package/test/AtlaspackConfigRequest.test.js +158 -162
  27. package/test/fixtures/config/{.atlaspackrc → .parcelrc} +1 -1
  28. package/test/fixtures/config/subfolder/.parcelrc +6 -0
  29. package/test/fixtures/config-extends-not-found/.parcelrc +3 -0
  30. package/test/fixtures/config-extends-not-found/.parcelrc-json5 +3 -0
  31. package/test/fixtures/config-extends-not-found/.parcelrc-multiple +3 -0
  32. package/test/fixtures/local-plugin-config-pkg/.parcelrc +3 -0
  33. package/test/fixtures/local-plugin-config-pkg/node_modules/parcel-config-local/package.json +7 -0
  34. package/test/fixtures/plugins/node_modules/parcel-transformer-bad-engines/package.json +7 -0
  35. package/test/fixtures/plugins/node_modules/parcel-transformer-no-engines/package.json +4 -0
  36. package/test/test-utils.js +1 -1
  37. package/test/fixtures/config/subfolder/.atlaspackrc +0 -6
  38. package/test/fixtures/config-extends-not-found/.atlaspackrc +0 -3
  39. package/test/fixtures/config-extends-not-found/.atlaspackrc-json5 +0 -3
  40. package/test/fixtures/config-extends-not-found/.atlaspackrc-multiple +0 -3
  41. package/test/fixtures/local-plugin-config-pkg/.atlaspackrc +0 -3
  42. package/test/fixtures/local-plugin-config-pkg/node_modules/atlaspack-config-local/package.json +0 -7
  43. package/test/fixtures/plugins/node_modules/atlaspack-transformer-bad-engines/package.json +0 -7
  44. package/test/fixtures/plugins/node_modules/atlaspack-transformer-no-engines/package.json +0 -4
  45. /package/test/fixtures/config-extends-not-found/{.atlaspackrc-node-modules → .parcelrc-node-modules} +0 -0
  46. /package/test/fixtures/config-malformed/{.atlaspackrc → .parcelrc} +0 -0
  47. /package/test/fixtures/config-node-pipeline/{.atlaspackrc → .parcelrc} +0 -0
  48. /package/test/fixtures/config-plugin-not-found/{.atlaspackrc → .parcelrc} +0 -0
  49. /package/test/fixtures/local-plugin-config-pkg/node_modules/{atlaspack-config-local → parcel-config-local}/index.json +0 -0
  50. /package/test/fixtures/local-plugin-config-pkg/node_modules/{atlaspack-config-local → parcel-config-local}/local-plugin.js +0 -0
  51. /package/test/fixtures/plugins/node_modules/{atlaspack-transformer-bad-engines → parcel-transformer-bad-engines}/index.js +0 -0
  52. /package/test/fixtures/plugins/node_modules/{atlaspack-transformer-no-engines → parcel-transformer-no-engines}/index.js +0 -0
@@ -44,30 +44,26 @@ describe('AtlaspackConfigRequest', () => {
44
44
  it('should error on an invalid community package', () => {
45
45
  assert.throws(() => {
46
46
  validatePackageName('foo-bar', 'transform', 'transformers');
47
- }, /Atlaspack transform packages must be named according to "atlaspack-transform-{name}"/);
47
+ }, /Atlaspack transform packages must be named according to "parcel-transform-{name}"/);
48
48
 
49
49
  assert.throws(() => {
50
- validatePackageName('atlaspack-foo-bar', 'transform', 'transformers');
51
- }, /Atlaspack transform packages must be named according to "atlaspack-transform-{name}"/);
50
+ validatePackageName('parcel-foo-bar', 'transform', 'transformers');
51
+ }, /Atlaspack transform packages must be named according to "parcel-transform-{name}"/);
52
52
 
53
53
  assert.throws(() => {
54
- validatePackageName('atlaspack-transform', 'transform', 'transformers');
55
- }, /Atlaspack transform packages must be named according to "atlaspack-transform-{name}"/);
54
+ validatePackageName('parcel-transform', 'transform', 'transformers');
55
+ }, /Atlaspack transform packages must be named according to "parcel-transform-{name}"/);
56
56
  });
57
57
 
58
58
  it('should succeed on a valid community package', () => {
59
- validatePackageName(
60
- 'atlaspack-transform-bar',
61
- 'transform',
62
- 'transformers',
63
- );
59
+ validatePackageName('parcel-transform-bar', 'transform', 'transformers');
64
60
  });
65
61
 
66
- // Skipping this while the migration to atlaspack occurs
62
+ // Skipping this while the migration to parcel occurs
67
63
  it.skip('should error on an invalid scoped package', () => {
68
64
  assert.throws(() => {
69
65
  validatePackageName('@test/foo-bar', 'transform', 'transformers');
70
- }, /Scoped atlaspack transform packages must be named according to "@test\/atlaspack-transform\[-{name}\]"/);
66
+ }, /Scoped atlaspack transform packages must be named according to "@test\/parcel-transform\[-{name}\]"/);
71
67
 
72
68
  assert.throws(() => {
73
69
  validatePackageName(
@@ -75,7 +71,7 @@ describe('AtlaspackConfigRequest', () => {
75
71
  'transform',
76
72
  'transformers',
77
73
  );
78
- }, /Scoped atlaspack transform packages must be named according to "@test\/atlaspack-transform\[-{name}\]"/);
74
+ }, /Scoped atlaspack transform packages must be named according to "@test\/parcel-transform\[-{name}\]"/);
79
75
  });
80
76
 
81
77
  it('should succeed on a valid scoped package', () => {
@@ -107,13 +103,13 @@ describe('AtlaspackConfigRequest', () => {
107
103
  assert.throws(() => {
108
104
  validateConfigFile(
109
105
  {
110
- filePath: '.atlaspackrc',
111
- extends: 'atlaspack-config-foo',
106
+ filePath: '.parcelrc',
107
+ extends: 'parcel-config-foo',
112
108
  transformers: {
113
- '*.js': ['atlaspack-invalid-plugin'],
109
+ '*.js': ['parcel-invalid-plugin'],
114
110
  },
115
111
  },
116
- '.atlaspackrc',
112
+ '.parcelrc',
117
113
  );
118
114
  });
119
115
  });
@@ -123,10 +119,10 @@ describe('AtlaspackConfigRequest', () => {
123
119
  validateConfigFile(
124
120
  // $FlowExpectedError[incompatible-call]
125
121
  {
126
- filePath: '.atlaspackrc',
122
+ filePath: '.parcelrc',
127
123
  resolvers: '123',
128
124
  },
129
- '.atlaspackrc',
125
+ '.parcelrc',
130
126
  );
131
127
  });
132
128
  });
@@ -135,11 +131,11 @@ describe('AtlaspackConfigRequest', () => {
135
131
  assert.throws(() => {
136
132
  validateConfigFile(
137
133
  {
138
- filePath: '.atlaspackrc',
134
+ filePath: '.parcelrc',
139
135
  // $FlowExpectedError[incompatible-call]
140
136
  resolvers: [1, '123', 5],
141
137
  },
142
- '.atlaspackrc',
138
+ '.parcelrc',
143
139
  );
144
140
  });
145
141
  });
@@ -148,10 +144,10 @@ describe('AtlaspackConfigRequest', () => {
148
144
  assert.throws(() => {
149
145
  validateConfigFile(
150
146
  {
151
- filePath: '.atlaspackrc',
152
- resolvers: ['atlaspack-foo-bar'],
147
+ filePath: '.parcelrc',
148
+ resolvers: ['parcel-foo-bar'],
153
149
  },
154
- '.atlaspackrc',
150
+ '.parcelrc',
155
151
  );
156
152
  });
157
153
  });
@@ -159,20 +155,20 @@ describe('AtlaspackConfigRequest', () => {
159
155
  it('should succeed with an array of valid package names', () => {
160
156
  validateConfigFile(
161
157
  {
162
- filePath: '.atlaspackrc',
163
- resolvers: ['atlaspack-resolver-test'],
158
+ filePath: '.parcelrc',
159
+ resolvers: ['parcel-resolver-test'],
164
160
  },
165
- '.atlaspackrc',
161
+ '.parcelrc',
166
162
  );
167
163
  });
168
164
 
169
165
  it('should support spread elements', () => {
170
166
  validateConfigFile(
171
167
  {
172
- filePath: '.atlaspackrc',
173
- resolvers: ['atlaspack-resolver-test', '...'],
168
+ filePath: '.parcelrc',
169
+ resolvers: ['parcel-resolver-test', '...'],
174
170
  },
175
- '.atlaspackrc',
171
+ '.parcelrc',
176
172
  );
177
173
  });
178
174
 
@@ -180,11 +176,11 @@ describe('AtlaspackConfigRequest', () => {
180
176
  assert.throws(() => {
181
177
  validateConfigFile(
182
178
  {
183
- filePath: '.atlaspackrc',
179
+ filePath: '.parcelrc',
184
180
  // $FlowExpectedError[incompatible-call]
185
- transformers: ['atlaspack-transformer-test', '...'],
181
+ transformers: ['parcel-transformer-test', '...'],
186
182
  },
187
- '.atlaspackrc',
183
+ '.parcelrc',
188
184
  );
189
185
  });
190
186
  });
@@ -193,13 +189,13 @@ describe('AtlaspackConfigRequest', () => {
193
189
  assert.throws(() => {
194
190
  validateConfigFile(
195
191
  {
196
- filePath: '.atlaspackrc',
192
+ filePath: '.parcelrc',
197
193
  transformers: {
198
194
  'types:*.{ts,tsx}': ['@atlaspack/transformer-typescript-types'],
199
195
  'bundle-text:*': ['-inline-string', '...'],
200
196
  },
201
197
  },
202
- '.atlaspackrc',
198
+ '.parcelrc',
203
199
  );
204
200
  });
205
201
  });
@@ -209,21 +205,21 @@ describe('AtlaspackConfigRequest', () => {
209
205
  validateConfigFile(
210
206
  // $FlowExpectedError[incompatible-call]
211
207
  {
212
- filePath: '.atlaspackrc',
208
+ filePath: '.parcelrc',
213
209
  extends: 2,
214
210
  },
215
- '.atlaspackrc',
211
+ '.parcelrc',
216
212
  );
217
213
  });
218
214
 
219
215
  assert.throws(() => {
220
216
  validateConfigFile(
221
217
  {
222
- filePath: '.atlaspackrc',
218
+ filePath: '.parcelrc',
223
219
  // $FlowExpectedError[incompatible-call]
224
220
  extends: [2, 7],
225
221
  },
226
- '.atlaspackrc',
222
+ '.parcelrc',
227
223
  );
228
224
  });
229
225
  });
@@ -231,18 +227,18 @@ describe('AtlaspackConfigRequest', () => {
231
227
  it('should support relative paths', () => {
232
228
  validateConfigFile(
233
229
  {
234
- filePath: '.atlaspackrc',
230
+ filePath: '.parcelrc',
235
231
  extends: './foo',
236
232
  },
237
- '.atlaspackrc',
233
+ '.parcelrc',
238
234
  );
239
235
 
240
236
  validateConfigFile(
241
237
  {
242
- filePath: '.atlaspackrc',
238
+ filePath: '.parcelrc',
243
239
  extends: ['./foo', './bar'],
244
240
  },
245
- '.atlaspackrc',
241
+ '.parcelrc',
246
242
  );
247
243
  });
248
244
 
@@ -250,37 +246,37 @@ describe('AtlaspackConfigRequest', () => {
250
246
  assert.throws(() => {
251
247
  validateConfigFile(
252
248
  {
253
- filePath: '.atlaspackrc',
249
+ filePath: '.parcelrc',
254
250
  extends: 'foo',
255
251
  },
256
- '.atlaspackrc',
252
+ '.parcelrc',
257
253
  );
258
254
  });
259
255
 
260
256
  assert.throws(() => {
261
257
  validateConfigFile(
262
258
  {
263
- filePath: '.atlaspackrc',
259
+ filePath: '.parcelrc',
264
260
  extends: ['foo', 'bar'],
265
261
  },
266
- '.atlaspackrc',
262
+ '.parcelrc',
267
263
  );
268
264
  });
269
265
 
270
266
  validateConfigFile(
271
267
  {
272
- filePath: '.atlaspackrc',
273
- extends: 'atlaspack-config-foo',
268
+ filePath: '.parcelrc',
269
+ extends: 'parcel-config-foo',
274
270
  },
275
- '.atlaspackrc',
271
+ '.parcelrc',
276
272
  );
277
273
 
278
274
  validateConfigFile(
279
275
  {
280
- filePath: '.atlaspackrc',
281
- extends: ['atlaspack-config-foo', 'atlaspack-config-bar'],
276
+ filePath: '.parcelrc',
277
+ extends: ['parcel-config-foo', 'parcel-config-bar'],
282
278
  },
283
- '.atlaspackrc',
279
+ '.parcelrc',
284
280
  );
285
281
  });
286
282
 
@@ -295,7 +291,7 @@ describe('AtlaspackConfigRequest', () => {
295
291
  inlineEnvironment: false,
296
292
  },
297
293
  },
298
- '.atlaspackrc',
294
+ '.parcelrc',
299
295
  );
300
296
  },
301
297
  e => {
@@ -311,22 +307,22 @@ describe('AtlaspackConfigRequest', () => {
311
307
  it('should succeed on valid config', () => {
312
308
  validateConfigFile(
313
309
  {
314
- filePath: '.atlaspackrc',
315
- extends: 'atlaspack-config-foo',
310
+ filePath: '.parcelrc',
311
+ extends: 'parcel-config-foo',
316
312
  transformers: {
317
- '*.js': ['atlaspack-transformer-foo'],
313
+ '*.js': ['parcel-transformer-foo'],
318
314
  },
319
315
  },
320
- '.atlaspackrc',
316
+ '.parcelrc',
321
317
  );
322
318
  });
323
319
 
324
320
  it('should throw error on empty config file', () => {
325
321
  assert.throws(
326
322
  () => {
327
- validateConfigFile({}, '.atlaspackrc');
323
+ validateConfigFile({}, '.parcelrc');
328
324
  },
329
- {name: 'Error', message: ".atlaspackrc can't be empty"},
325
+ {name: 'Error', message: ".parcelrc can't be empty"},
330
326
  );
331
327
  });
332
328
  });
@@ -341,8 +337,8 @@ describe('AtlaspackConfigRequest', () => {
341
337
  mergePipelines(
342
338
  [
343
339
  {
344
- packageName: 'atlaspack-transform-foo',
345
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
340
+ packageName: 'parcel-transform-foo',
341
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
346
342
  keyPath: '/transformers/*.js/0',
347
343
  },
348
344
  ],
@@ -350,8 +346,8 @@ describe('AtlaspackConfigRequest', () => {
350
346
  ),
351
347
  [
352
348
  {
353
- packageName: 'atlaspack-transform-foo',
354
- resolveFrom: '.atlaspackrc',
349
+ packageName: 'parcel-transform-foo',
350
+ resolveFrom: '.parcelrc',
355
351
  keyPath: '/transformers/*.js/0',
356
352
  },
357
353
  ],
@@ -362,15 +358,15 @@ describe('AtlaspackConfigRequest', () => {
362
358
  assert.deepEqual(
363
359
  mergePipelines(null, [
364
360
  {
365
- packageName: 'atlaspack-transform-bar',
366
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
361
+ packageName: 'parcel-transform-bar',
362
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
367
363
  keyPath: '/transformers/*.js/0',
368
364
  },
369
365
  ]),
370
366
  [
371
367
  {
372
- packageName: 'atlaspack-transform-bar',
373
- resolveFrom: '.atlaspackrc',
368
+ packageName: 'parcel-transform-bar',
369
+ resolveFrom: '.parcelrc',
374
370
  keyPath: '/transformers/*.js/0',
375
371
  },
376
372
  ],
@@ -382,23 +378,23 @@ describe('AtlaspackConfigRequest', () => {
382
378
  mergePipelines(
383
379
  [
384
380
  {
385
- packageName: 'atlaspack-transform-foo',
386
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
381
+ packageName: 'parcel-transform-foo',
382
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
387
383
  keyPath: '/transformers/*.js/0',
388
384
  },
389
385
  ],
390
386
  [
391
387
  {
392
- packageName: 'atlaspack-transform-bar',
393
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
388
+ packageName: 'parcel-transform-bar',
389
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
394
390
  keyPath: '/transformers/*.js/0',
395
391
  },
396
392
  ],
397
393
  ),
398
394
  [
399
395
  {
400
- packageName: 'atlaspack-transform-bar',
401
- resolveFrom: '.atlaspackrc',
396
+ packageName: 'parcel-transform-bar',
397
+ resolveFrom: '.parcelrc',
402
398
  keyPath: '/transformers/*.js/0',
403
399
  },
404
400
  ],
@@ -410,39 +406,39 @@ describe('AtlaspackConfigRequest', () => {
410
406
  mergePipelines(
411
407
  [
412
408
  {
413
- packageName: 'atlaspack-transform-foo',
414
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
409
+ packageName: 'parcel-transform-foo',
410
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
415
411
  keyPath: '/transformers/*.js/0',
416
412
  },
417
413
  ],
418
414
  [
419
415
  {
420
- packageName: 'atlaspack-transform-bar',
421
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
416
+ packageName: 'parcel-transform-bar',
417
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
422
418
  keyPath: '/transformers/*.js/0',
423
419
  },
424
420
  '...',
425
421
  {
426
- packageName: 'atlaspack-transform-baz',
427
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
422
+ packageName: 'parcel-transform-baz',
423
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
428
424
  keyPath: '/transformers/*.js/2',
429
425
  },
430
426
  ],
431
427
  ),
432
428
  [
433
429
  {
434
- packageName: 'atlaspack-transform-bar',
435
- resolveFrom: '.atlaspackrc',
430
+ packageName: 'parcel-transform-bar',
431
+ resolveFrom: '.parcelrc',
436
432
  keyPath: '/transformers/*.js/0',
437
433
  },
438
434
  {
439
- packageName: 'atlaspack-transform-foo',
440
- resolveFrom: '.atlaspackrc',
435
+ packageName: 'parcel-transform-foo',
436
+ resolveFrom: '.parcelrc',
441
437
  keyPath: '/transformers/*.js/0',
442
438
  },
443
439
  {
444
- packageName: 'atlaspack-transform-baz',
445
- resolveFrom: '.atlaspackrc',
440
+ packageName: 'parcel-transform-baz',
441
+ resolveFrom: '.parcelrc',
446
442
  keyPath: '/transformers/*.js/2',
447
443
  },
448
444
  ],
@@ -454,21 +450,21 @@ describe('AtlaspackConfigRequest', () => {
454
450
  mergePipelines(
455
451
  [
456
452
  {
457
- packageName: 'atlaspack-transform-foo',
458
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
453
+ packageName: 'parcel-transform-foo',
454
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
459
455
  keyPath: '/transformers/*.js/0',
460
456
  },
461
457
  ],
462
458
  [
463
459
  {
464
- packageName: 'atlaspack-transform-bar',
465
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
460
+ packageName: 'parcel-transform-bar',
461
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
466
462
  keyPath: '/transformers/*.js/0',
467
463
  },
468
464
  '...',
469
465
  {
470
- packageName: 'atlaspack-transform-baz',
471
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
466
+ packageName: 'parcel-transform-baz',
467
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
472
468
  keyPath: '/transformers/*.js/2',
473
469
  },
474
470
  '...',
@@ -481,26 +477,26 @@ describe('AtlaspackConfigRequest', () => {
481
477
  assert.deepEqual(
482
478
  mergePipelines(null, [
483
479
  {
484
- packageName: 'atlaspack-transform-bar',
485
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
480
+ packageName: 'parcel-transform-bar',
481
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
486
482
  keyPath: '/transformers/*.js/0',
487
483
  },
488
484
  '...',
489
485
  {
490
- packageName: 'atlaspack-transform-baz',
491
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
486
+ packageName: 'parcel-transform-baz',
487
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
492
488
  keyPath: '/transformers/*.js/2',
493
489
  },
494
490
  ]),
495
491
  [
496
492
  {
497
- packageName: 'atlaspack-transform-bar',
498
- resolveFrom: '.atlaspackrc',
493
+ packageName: 'parcel-transform-bar',
494
+ resolveFrom: '.parcelrc',
499
495
  keyPath: '/transformers/*.js/0',
500
496
  },
501
497
  {
502
- packageName: 'atlaspack-transform-baz',
503
- resolveFrom: '.atlaspackrc',
498
+ packageName: 'parcel-transform-baz',
499
+ resolveFrom: '.parcelrc',
504
500
  keyPath: '/transformers/*.js/2',
505
501
  },
506
502
  ],
@@ -511,14 +507,14 @@ describe('AtlaspackConfigRequest', () => {
511
507
  assert.throws(() => {
512
508
  mergePipelines(null, [
513
509
  {
514
- packageName: 'atlaspack-transform-bar',
515
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
510
+ packageName: 'parcel-transform-bar',
511
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
516
512
  keyPath: '/transformers/*.js/0',
517
513
  },
518
514
  '...',
519
515
  {
520
- packageName: 'atlaspack-transform-baz',
521
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
516
+ packageName: 'parcel-transform-baz',
517
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
522
518
  keyPath: '/transformers/*.js/2',
523
519
  },
524
520
  '...',
@@ -570,33 +566,33 @@ describe('AtlaspackConfigRequest', () => {
570
566
  it('should merge configs', () => {
571
567
  let base = new AtlaspackConfig(
572
568
  {
573
- filePath: toProjectPath('/', '/.atlaspackrc'),
569
+ filePath: toProjectPath('/', '/.parcelrc'),
574
570
  resolvers: [
575
571
  {
576
- packageName: 'atlaspack-resolver-base',
577
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
572
+ packageName: 'parcel-resolver-base',
573
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
578
574
  keyPath: '/resolvers/0',
579
575
  },
580
576
  ],
581
577
  transformers: {
582
578
  '*.js': [
583
579
  {
584
- packageName: 'atlaspack-transform-base',
585
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
580
+ packageName: 'parcel-transform-base',
581
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
586
582
  keyPath: '/transformers/*.js/0',
587
583
  },
588
584
  ],
589
585
  '*.css': [
590
586
  {
591
- packageName: 'atlaspack-transform-css',
592
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
587
+ packageName: 'parcel-transform-css',
588
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
593
589
  keyPath: '/transformers/*.css/0',
594
590
  },
595
591
  ],
596
592
  },
597
593
  bundler: {
598
- packageName: 'atlaspack-bundler-base',
599
- resolveFrom: toProjectPath('/', '/.atlaspackrc'),
594
+ packageName: 'parcel-bundler-base',
595
+ resolveFrom: toProjectPath('/', '/.parcelrc'),
600
596
  keyPath: '/bundler',
601
597
  },
602
598
  },
@@ -604,11 +600,11 @@ describe('AtlaspackConfigRequest', () => {
604
600
  );
605
601
 
606
602
  let ext = {
607
- filePath: '.atlaspackrc',
603
+ filePath: '.parcelrc',
608
604
  resolvers: [
609
605
  {
610
- packageName: 'atlaspack-resolver-ext',
611
- resolveFrom: '.atlaspackrc',
606
+ packageName: 'parcel-resolver-ext',
607
+ resolveFrom: '.parcelrc',
612
608
  keyPath: '/resolvers/0',
613
609
  },
614
610
  '...',
@@ -616,8 +612,8 @@ describe('AtlaspackConfigRequest', () => {
616
612
  transformers: {
617
613
  '*.js': [
618
614
  {
619
- packageName: 'atlaspack-transform-ext',
620
- resolveFrom: '.atlaspackrc',
615
+ packageName: 'parcel-transform-ext',
616
+ resolveFrom: '.parcelrc',
621
617
  keyPath: '/transformers/*.js/0',
622
618
  },
623
619
  '...',
@@ -626,43 +622,43 @@ describe('AtlaspackConfigRequest', () => {
626
622
  };
627
623
 
628
624
  let merged = {
629
- filePath: '.atlaspackrc',
625
+ filePath: '.parcelrc',
630
626
  resolvers: [
631
627
  {
632
- packageName: 'atlaspack-resolver-ext',
633
- resolveFrom: '.atlaspackrc',
628
+ packageName: 'parcel-resolver-ext',
629
+ resolveFrom: '.parcelrc',
634
630
  keyPath: '/resolvers/0',
635
631
  },
636
632
  {
637
- packageName: 'atlaspack-resolver-base',
638
- resolveFrom: '.atlaspackrc',
633
+ packageName: 'parcel-resolver-base',
634
+ resolveFrom: '.parcelrc',
639
635
  keyPath: '/resolvers/0',
640
636
  },
641
637
  ],
642
638
  transformers: {
643
639
  '*.js': [
644
640
  {
645
- packageName: 'atlaspack-transform-ext',
646
- resolveFrom: '.atlaspackrc',
641
+ packageName: 'parcel-transform-ext',
642
+ resolveFrom: '.parcelrc',
647
643
  keyPath: '/transformers/*.js/0',
648
644
  },
649
645
  {
650
- packageName: 'atlaspack-transform-base',
651
- resolveFrom: '.atlaspackrc',
646
+ packageName: 'parcel-transform-base',
647
+ resolveFrom: '.parcelrc',
652
648
  keyPath: '/transformers/*.js/0',
653
649
  },
654
650
  ],
655
651
  '*.css': [
656
652
  {
657
- packageName: 'atlaspack-transform-css',
658
- resolveFrom: '.atlaspackrc',
653
+ packageName: 'parcel-transform-css',
654
+ resolveFrom: '.parcelrc',
659
655
  keyPath: '/transformers/*.css/0',
660
656
  },
661
657
  ],
662
658
  },
663
659
  bundler: {
664
- packageName: 'atlaspack-bundler-base',
665
- resolveFrom: '.atlaspackrc',
660
+ packageName: 'parcel-bundler-base',
661
+ resolveFrom: '.parcelrc',
666
662
  keyPath: '/bundler',
667
663
  },
668
664
  runtimes: [],
@@ -682,21 +678,21 @@ describe('AtlaspackConfigRequest', () => {
682
678
  describe('resolveExtends', () => {
683
679
  it('should resolve a relative path', async () => {
684
680
  let resolved = await resolveExtends(
685
- '../.atlaspackrc',
686
- path.join(__dirname, 'fixtures', 'config', 'subfolder', '.atlaspackrc'),
681
+ '../.parcelrc',
682
+ path.join(__dirname, 'fixtures', 'config', 'subfolder', '.parcelrc'),
687
683
  '/extends',
688
684
  DEFAULT_OPTIONS,
689
685
  );
690
686
  assert.equal(
691
687
  resolved,
692
- path.join(__dirname, 'fixtures', 'config', '.atlaspackrc'),
688
+ path.join(__dirname, 'fixtures', 'config', '.parcelrc'),
693
689
  );
694
690
  });
695
691
 
696
692
  it('should resolve a package name', async () => {
697
693
  let resolved = await resolveExtends(
698
694
  '@atlaspack/config-default',
699
- path.join(__dirname, 'fixtures', 'config', 'subfolder', '.atlaspackrc'),
695
+ path.join(__dirname, 'fixtures', 'config', 'subfolder', '.parcelrc'),
700
696
  '/extends',
701
697
  DEFAULT_OPTIONS,
702
698
  );
@@ -718,14 +714,14 @@ describe('AtlaspackConfigRequest', () => {
718
714
  __dirname,
719
715
  'fixtures',
720
716
  'config',
721
- '.atlaspackrc',
717
+ '.parcelrc',
722
718
  );
723
719
  let subConfigFilePath = path.join(
724
720
  __dirname,
725
721
  'fixtures',
726
722
  'config',
727
723
  'subfolder',
728
- '.atlaspackrc',
724
+ '.parcelrc',
729
725
  );
730
726
  let {config} = await parseAndProcessConfig(
731
727
  subConfigFilePath,
@@ -736,12 +732,12 @@ describe('AtlaspackConfigRequest', () => {
736
732
  let transformers = nullthrows(config.transformers);
737
733
  assert.deepEqual(transformers['*.js'], [
738
734
  {
739
- packageName: 'atlaspack-transformer-sub',
735
+ packageName: 'parcel-transformer-sub',
740
736
  resolveFrom: relative(subConfigFilePath),
741
737
  keyPath: '/transformers/*.js/0',
742
738
  },
743
739
  {
744
- packageName: 'atlaspack-transformer-base',
740
+ packageName: 'parcel-transformer-base',
745
741
  resolveFrom: relative(configFilePath),
746
742
  keyPath: '/transformers/*.js/0',
747
743
  },
@@ -756,12 +752,12 @@ describe('AtlaspackConfigRequest', () => {
756
752
  assert.deepEqual(config.reporters, defaultConfig.reporters || []);
757
753
  });
758
754
 
759
- it('should emit a codeframe.codeHighlights when a malformed .atlaspackrc was found', async () => {
755
+ it('should emit a codeframe.codeHighlights when a malformed .parcelrc was found', async () => {
760
756
  let configFilePath = path.join(
761
757
  __dirname,
762
758
  'fixtures',
763
759
  'config-malformed',
764
- '.atlaspackrc',
760
+ '.parcelrc',
765
761
  );
766
762
  let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');
767
763
 
@@ -777,7 +773,7 @@ describe('AtlaspackConfigRequest', () => {
777
773
  name: 'Error',
778
774
  diagnostics: [
779
775
  {
780
- message: 'Failed to parse .atlaspackrc',
776
+ message: 'Failed to parse .parcelrc',
781
777
  origin: '@atlaspack/core',
782
778
  codeFrames: [
783
779
  {
@@ -799,12 +795,12 @@ describe('AtlaspackConfigRequest', () => {
799
795
  );
800
796
  });
801
797
 
802
- it('should emit a codeframe when an extended atlaspack config file is not found', async () => {
798
+ it('should emit a codeframe when an extended parcel config file is not found', async () => {
803
799
  let configFilePath = path.join(
804
800
  __dirname,
805
801
  'fixtures',
806
802
  'config-extends-not-found',
807
- '.atlaspackrc',
803
+ '.parcelrc',
808
804
  );
809
805
  let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');
810
806
 
@@ -815,7 +811,7 @@ describe('AtlaspackConfigRequest', () => {
815
811
  name: 'Error',
816
812
  diagnostics: [
817
813
  {
818
- message: 'Cannot find extended atlaspack config',
814
+ message: 'Cannot find extended parcel config',
819
815
  origin: '@atlaspack/core',
820
816
  codeFrames: [
821
817
  {
@@ -825,9 +821,9 @@ describe('AtlaspackConfigRequest', () => {
825
821
  codeHighlights: [
826
822
  {
827
823
  message:
828
- '"./.atlaspckrc-node-modules" does not exist, did you mean "./.atlaspackrc-node-modules"?',
824
+ '"./.parclrc-node-modules" does not exist, did you mean "./.parcelrc-node-modules"?',
829
825
  start: {line: 2, column: 14},
830
- end: {line: 2, column: 41},
826
+ end: {line: 2, column: 38},
831
827
  },
832
828
  ],
833
829
  },
@@ -838,12 +834,12 @@ describe('AtlaspackConfigRequest', () => {
838
834
  );
839
835
  });
840
836
 
841
- it('should emit a codeframe when an extended atlaspack config file is not found in JSON5', async () => {
837
+ it('should emit a codeframe when an extended parcel config file is not found in JSON5', async () => {
842
838
  let configFilePath = path.join(
843
839
  __dirname,
844
840
  'fixtures',
845
841
  'config-extends-not-found',
846
- '.atlaspackrc-json5',
842
+ '.parcelrc-json5',
847
843
  );
848
844
  let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');
849
845
 
@@ -854,7 +850,7 @@ describe('AtlaspackConfigRequest', () => {
854
850
  name: 'Error',
855
851
  diagnostics: [
856
852
  {
857
- message: 'Cannot find extended atlaspack config',
853
+ message: 'Cannot find extended parcel config',
858
854
  origin: '@atlaspack/core',
859
855
  codeFrames: [
860
856
  {
@@ -864,9 +860,9 @@ describe('AtlaspackConfigRequest', () => {
864
860
  codeHighlights: [
865
861
  {
866
862
  message:
867
- '"./.atlaspckrc-node-modules" does not exist, did you mean "./.atlaspackrc-node-modules"?',
863
+ '"./.parclrc-node-modules" does not exist, did you mean "./.parcelrc-node-modules"?',
868
864
  start: {line: 2, column: 12},
869
- end: {line: 2, column: 39},
865
+ end: {line: 2, column: 36},
870
866
  },
871
867
  ],
872
868
  },
@@ -877,12 +873,12 @@ describe('AtlaspackConfigRequest', () => {
877
873
  );
878
874
  });
879
875
 
880
- it('should emit a codeframe when an extended atlaspack config node module is not found', async () => {
876
+ it('should emit a codeframe when an extended parcel config node module is not found', async () => {
881
877
  let configFilePath = path.join(
882
878
  __dirname,
883
879
  'fixtures',
884
880
  'config-extends-not-found',
885
- '.atlaspackrc-node-modules',
881
+ '.parcelrc-node-modules',
886
882
  );
887
883
  let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');
888
884
 
@@ -893,7 +889,7 @@ describe('AtlaspackConfigRequest', () => {
893
889
  name: 'Error',
894
890
  diagnostics: [
895
891
  {
896
- message: 'Cannot find extended atlaspack config',
892
+ message: 'Cannot find extended parcel config',
897
893
  origin: '@atlaspack/core',
898
894
  codeFrames: [
899
895
  {
@@ -921,7 +917,7 @@ describe('AtlaspackConfigRequest', () => {
921
917
  __dirname,
922
918
  'fixtures',
923
919
  'config-extends-not-found',
924
- '.atlaspackrc-multiple',
920
+ '.parcelrc-multiple',
925
921
  );
926
922
  let code = await DEFAULT_OPTIONS.inputFS.readFile(configFilePath, 'utf8');
927
923
 
@@ -932,7 +928,7 @@ describe('AtlaspackConfigRequest', () => {
932
928
  name: 'Error',
933
929
  diagnostics: [
934
930
  {
935
- message: 'Cannot find extended atlaspack config',
931
+ message: 'Cannot find extended parcel config',
936
932
  origin: '@atlaspack/core',
937
933
  codeFrames: [
938
934
  {
@@ -951,7 +947,7 @@ describe('AtlaspackConfigRequest', () => {
951
947
  ],
952
948
  },
953
949
  {
954
- message: 'Cannot find extended atlaspack config',
950
+ message: 'Cannot find extended parcel config',
955
951
  origin: '@atlaspack/core',
956
952
  codeFrames: [
957
953
  {
@@ -961,9 +957,9 @@ describe('AtlaspackConfigRequest', () => {
961
957
  codeHighlights: [
962
958
  {
963
959
  message:
964
- '"./.atlaspckrc" does not exist, did you mean "./.atlaspackrc"?',
960
+ '"./.parclrc" does not exist, did you mean "./.parcelrc"?',
965
961
  start: {line: 2, column: 42},
966
- end: {line: 2, column: 56},
962
+ end: {line: 2, column: 53},
967
963
  },
968
964
  ],
969
965
  },
@@ -976,12 +972,12 @@ describe('AtlaspackConfigRequest', () => {
976
972
  });
977
973
 
978
974
  describe('resolve', () => {
979
- it('should return null if there is no .atlaspackrc file found', async () => {
975
+ it('should return null if there is no .parcelrc file found', async () => {
980
976
  let resolved = await resolveAtlaspackConfig(DEFAULT_OPTIONS);
981
977
  assert.equal(resolved, null);
982
978
  });
983
979
 
984
- it('should resolve a config if a .atlaspackrc file is found', async () => {
980
+ it('should resolve a config if a .parcelrc file is found', async () => {
985
981
  let resolved = await resolveAtlaspackConfig({
986
982
  ...DEFAULT_OPTIONS,
987
983
  projectRoot: path.join(__dirname, 'fixtures', 'config', 'subfolder'),