zile 0.0.13 → 0.0.15

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.
@@ -17,6 +17,7 @@ describe('Packages.find', () => {
17
17
  expect(relative(result)).toMatchInlineSnapshot(`
18
18
  [
19
19
  "/",
20
+ "/test/repos/wildcard-exports",
20
21
  "/test/repos/single-entrypoint",
21
22
  "/test/repos/multiple-entrypoint",
22
23
  "/test/repos/error-module-resolution",
@@ -26,6 +27,8 @@ describe('Packages.find', () => {
26
27
  "/test/repos/error-exports-object-not-exists",
27
28
  "/test/repos/error-bin-string-not-exists",
28
29
  "/test/repos/error-bin-object-not-exists",
30
+ "/test/repos/dts-exports-object",
31
+ "/test/repos/dts-exports",
29
32
  "/test/repos/basic-object-exports",
30
33
  "/test/repos/basic",
31
34
  "/template",
@@ -45,6 +48,7 @@ describe('Packages.find', () => {
45
48
 
46
49
  expect(relative(result)).toMatchInlineSnapshot(`
47
50
  [
51
+ "/test/repos/wildcard-exports",
48
52
  "/test/repos/single-entrypoint",
49
53
  "/test/repos/multiple-entrypoint",
50
54
  "/test/repos/error-module-resolution",
@@ -54,6 +58,8 @@ describe('Packages.find', () => {
54
58
  "/test/repos/error-exports-object-not-exists",
55
59
  "/test/repos/error-bin-string-not-exists",
56
60
  "/test/repos/error-bin-object-not-exists",
61
+ "/test/repos/dts-exports-object",
62
+ "/test/repos/dts-exports",
57
63
  "/test/repos/basic-object-exports",
58
64
  "/test/repos/basic",
59
65
  ]
@@ -94,6 +100,7 @@ describe('Packages.find', () => {
94
100
 
95
101
  expect(relative(result)).toMatchInlineSnapshot(`
96
102
  [
103
+ "/test/repos/wildcard-exports",
97
104
  "/test/repos/single-entrypoint",
98
105
  "/test/repos/multiple-entrypoint",
99
106
  "/test/repos/error-module-resolution",
@@ -103,6 +110,8 @@ describe('Packages.find', () => {
103
110
  "/test/repos/error-exports-object-not-exists",
104
111
  "/test/repos/error-bin-string-not-exists",
105
112
  "/test/repos/error-bin-object-not-exists",
113
+ "/test/repos/dts-exports-object",
114
+ "/test/repos/dts-exports",
106
115
  "/test/repos/basic-object-exports",
107
116
  "/test/repos/basic",
108
117
  ]
@@ -166,6 +175,7 @@ describe('Packages.find', () => {
166
175
  expect(relative(result)).toMatchInlineSnapshot(`
167
176
  [
168
177
  "/",
178
+ "/test/repos/wildcard-exports",
169
179
  "/test/repos/single-entrypoint",
170
180
  "/test/repos/multiple-entrypoint",
171
181
  "/test/repos/error-module-resolution",
@@ -175,6 +185,8 @@ describe('Packages.find', () => {
175
185
  "/test/repos/error-exports-object-not-exists",
176
186
  "/test/repos/error-bin-string-not-exists",
177
187
  "/test/repos/error-bin-object-not-exists",
188
+ "/test/repos/dts-exports-object",
189
+ "/test/repos/dts-exports",
178
190
  "/test/repos/basic-object-exports",
179
191
  "/test/repos/basic",
180
192
  "/template",
@@ -31,13 +31,13 @@ exports[`'/basic': Cli.run > default > output 1`] = `
31
31
  "main": "./dist/index.js",
32
32
  "exports": {
33
33
  ".": {
34
- "src": "./index.ts",
35
34
  "types": "./dist/index.d.ts",
35
+ "src": "./index.ts",
36
36
  "default": "./dist/index.js"
37
37
  },
38
38
  "./foo": {
39
- "src": "./foo.ts",
40
39
  "types": "./dist/foo.d.ts",
40
+ "src": "./foo.ts",
41
41
  "default": "./dist/foo.js"
42
42
  },
43
43
  "./config": "./dist/config.json"
@@ -103,13 +103,13 @@ exports[`'/basic': Cli.run > link > output 1`] = `
103
103
  "main": "./dist/index.js",
104
104
  "exports": {
105
105
  ".": {
106
- "src": "./index.ts",
107
106
  "types": "./dist/index.d.ts",
107
+ "src": "./index.ts",
108
108
  "default": "./dist/index.js"
109
109
  },
110
110
  "./foo": {
111
- "src": "./foo.ts",
112
111
  "types": "./dist/foo.d.ts",
112
+ "src": "./foo.ts",
113
113
  "default": "./dist/foo.js"
114
114
  },
115
115
  "./config": "./dist/config.json"
@@ -163,8 +163,8 @@ exports[`'/basic-object-exports': Cli.run > default > output 1`] = `
163
163
  "type": "module",
164
164
  "exports": {
165
165
  ".": {
166
- "src": "./index.ts",
167
166
  "types": "./dist/index.d.ts",
167
+ "src": "./index.ts",
168
168
  "default": "./dist/index.js"
169
169
  }
170
170
  },
@@ -218,8 +218,8 @@ exports[`'/basic-object-exports': Cli.run > link > output 1`] = `
218
218
  "type": "module",
219
219
  "exports": {
220
220
  ".": {
221
- "src": "./index.ts",
222
221
  "types": "./dist/index.d.ts",
222
+ "src": "./index.ts",
223
223
  "default": "./dist/index.js"
224
224
  }
225
225
  },
@@ -243,6 +243,182 @@ exports[`'/basic-object-exports': Cli.run > link > output 1`] = `
243
243
 
244
244
  exports[`'/basic-object-exports': Cli.run > link > types-target 1`] = `"../index.ts"`;
245
245
 
246
+ exports[`'/dts-exports': Cli.run > default > main 1`] = `
247
+ "export const foo = 'bar';
248
+ //# sourceMappingURL=index.js.map"
249
+ `;
250
+
251
+ exports[`'/dts-exports': Cli.run > default > output 1`] = `
252
+ "{
253
+ "name": "dts-exports",
254
+ "version": "0.0.0",
255
+ "type": "module",
256
+ "main": "./dist/index.js",
257
+ "exports": {
258
+ ".": {
259
+ "types": "./dist/index.d.ts",
260
+ "src": "./src/index.ts",
261
+ "default": "./dist/index.js"
262
+ },
263
+ "./globals": {
264
+ "types": "./dist/globals.d.ts",
265
+ "src": "./src/globals.d.ts"
266
+ }
267
+ },
268
+ "sideEffects": false,
269
+ "module": "./dist/index.js",
270
+ "types": "./dist/index.d.ts"
271
+ }
272
+
273
+
274
+
275
+ ├── dist
276
+ │ ├── globals.d.ts
277
+ │ ├── index.d.ts
278
+ │ ├── index.d.ts.map
279
+ │ ├── index.js
280
+ │ └── index.js.map
281
+ ├── src
282
+ │ ├── globals.d.ts
283
+ │ └── index.ts
284
+ ├── package.json
285
+ └── tsconfig.json
286
+ "
287
+ `;
288
+
289
+ exports[`'/dts-exports': Cli.run > default > types 1`] = `
290
+ "export declare const foo = "bar";
291
+ //# sourceMappingURL=index.d.ts.map"
292
+ `;
293
+
294
+ exports[`'/dts-exports': Cli.run > link > main-target 1`] = `"../src/index.ts"`;
295
+
296
+ exports[`'/dts-exports': Cli.run > link > output 1`] = `
297
+ "{
298
+ "name": "dts-exports",
299
+ "version": "0.0.0",
300
+ "type": "module",
301
+ "main": "./dist/index.js",
302
+ "exports": {
303
+ ".": {
304
+ "types": "./dist/index.d.ts",
305
+ "src": "./src/index.ts",
306
+ "default": "./dist/index.js"
307
+ },
308
+ "./globals": {
309
+ "types": "./dist/globals.d.ts",
310
+ "src": "./src/globals.d.ts"
311
+ }
312
+ },
313
+ "sideEffects": false,
314
+ "module": "./dist/index.js",
315
+ "types": "./dist/index.d.ts"
316
+ }
317
+
318
+
319
+
320
+ ├── dist
321
+ │ ├── globals.d.ts -> ../src/globals.d.ts
322
+ │ ├── index.d.ts -> ../src/index.ts
323
+ │ └── index.js -> ../src/index.ts
324
+ ├── src
325
+ │ ├── globals.d.ts
326
+ │ └── index.ts
327
+ ├── package.json
328
+ └── tsconfig.json
329
+ "
330
+ `;
331
+
332
+ exports[`'/dts-exports': Cli.run > link > types-target 1`] = `"../src/index.ts"`;
333
+
334
+ exports[`'/dts-exports-object': Cli.run > default > main 1`] = `
335
+ "export const foo = 'bar';
336
+ //# sourceMappingURL=index.js.map"
337
+ `;
338
+
339
+ exports[`'/dts-exports-object': Cli.run > default > output 1`] = `
340
+ "{
341
+ "name": "dts-exports-object",
342
+ "version": "0.0.0",
343
+ "type": "module",
344
+ "main": "./dist/index.js",
345
+ "exports": {
346
+ ".": {
347
+ "types": "./dist/index.d.ts",
348
+ "src": "./src/index.ts",
349
+ "default": "./dist/index.js"
350
+ },
351
+ "./globals": {
352
+ "types": "./dist/globals.d.ts",
353
+ "src": "./src/globals.d.ts"
354
+ }
355
+ },
356
+ "sideEffects": false,
357
+ "module": "./dist/index.js",
358
+ "types": "./dist/index.d.ts"
359
+ }
360
+
361
+
362
+
363
+ ├── dist
364
+ │ ├── globals.d.ts
365
+ │ ├── index.d.ts
366
+ │ ├── index.d.ts.map
367
+ │ ├── index.js
368
+ │ └── index.js.map
369
+ ├── src
370
+ │ ├── globals.d.ts
371
+ │ └── index.ts
372
+ ├── package.json
373
+ └── tsconfig.json
374
+ "
375
+ `;
376
+
377
+ exports[`'/dts-exports-object': Cli.run > default > types 1`] = `
378
+ "export declare const foo = "bar";
379
+ //# sourceMappingURL=index.d.ts.map"
380
+ `;
381
+
382
+ exports[`'/dts-exports-object': Cli.run > link > main-target 1`] = `"../src/index.ts"`;
383
+
384
+ exports[`'/dts-exports-object': Cli.run > link > output 1`] = `
385
+ "{
386
+ "name": "dts-exports-object",
387
+ "version": "0.0.0",
388
+ "type": "module",
389
+ "main": "./dist/index.js",
390
+ "exports": {
391
+ ".": {
392
+ "types": "./dist/index.d.ts",
393
+ "src": "./src/index.ts",
394
+ "default": "./dist/index.js"
395
+ },
396
+ "./globals": {
397
+ "types": "./dist/globals.d.ts",
398
+ "src": "./src/globals.d.ts"
399
+ }
400
+ },
401
+ "sideEffects": false,
402
+ "module": "./dist/index.js",
403
+ "types": "./dist/index.d.ts"
404
+ }
405
+
406
+
407
+
408
+ ├── dist
409
+ │ ├── globals.d.ts -> ../src/globals.d.ts
410
+ │ ├── index.d.ts -> ../src/index.ts
411
+ │ └── index.js -> ../src/index.ts
412
+ ├── src
413
+ │ ├── globals.d.ts
414
+ │ └── index.ts
415
+ ├── package.json
416
+ └── tsconfig.json
417
+ "
418
+ `;
419
+
420
+ exports[`'/dts-exports-object': Cli.run > link > types-target 1`] = `"../src/index.ts"`;
421
+
246
422
  exports[`'/multiple-entrypoint': Cli.run > default > main 1`] = `
247
423
  "import { bar as bar1, foo as foo1 } from './foo.js';
248
424
  export function foo(options = {}) {
@@ -269,18 +445,18 @@ exports[`'/multiple-entrypoint': Cli.run > default > output 1`] = `
269
445
  "type": "module",
270
446
  "exports": {
271
447
  ".": {
272
- "src": "./src/index.ts",
273
448
  "types": "./dist/index.d.ts",
449
+ "src": "./src/index.ts",
274
450
  "default": "./dist/index.js"
275
451
  },
276
452
  "./foo": {
277
- "src": "./src/foo.ts",
278
453
  "types": "./dist/foo.d.ts",
454
+ "src": "./src/foo.ts",
279
455
  "default": "./dist/foo.js"
280
456
  },
281
457
  "./nested/dir": {
282
- "src": "./src/nested/dir/bar.ts",
283
458
  "types": "./dist/nested/dir/bar.d.ts",
459
+ "src": "./src/nested/dir/bar.ts",
284
460
  "default": "./dist/nested/dir/bar.js"
285
461
  }
286
462
  },
@@ -344,18 +520,18 @@ exports[`'/multiple-entrypoint': Cli.run > link > output 1`] = `
344
520
  "type": "module",
345
521
  "exports": {
346
522
  ".": {
347
- "src": "./src/index.ts",
348
523
  "types": "./dist/index.d.ts",
524
+ "src": "./src/index.ts",
349
525
  "default": "./dist/index.js"
350
526
  },
351
527
  "./foo": {
352
- "src": "./src/foo.ts",
353
528
  "types": "./dist/foo.d.ts",
529
+ "src": "./src/foo.ts",
354
530
  "default": "./dist/foo.js"
355
531
  },
356
532
  "./nested/dir": {
357
- "src": "./src/nested/dir/bar.ts",
358
533
  "types": "./dist/nested/dir/bar.d.ts",
534
+ "src": "./src/nested/dir/bar.ts",
359
535
  "default": "./dist/nested/dir/bar.js"
360
536
  }
361
537
  },
@@ -419,8 +595,8 @@ exports[`'/single-entrypoint': Cli.run > default > output 1`] = `
419
595
  "types": "./dist/index.d.ts",
420
596
  "exports": {
421
597
  ".": {
422
- "src": "./index.ts",
423
598
  "types": "./dist/index.d.ts",
599
+ "src": "./index.ts",
424
600
  "default": "./dist/index.js"
425
601
  }
426
602
  }
@@ -474,8 +650,8 @@ exports[`'/single-entrypoint': Cli.run > link > output 1`] = `
474
650
  "types": "./dist/index.d.ts",
475
651
  "exports": {
476
652
  ".": {
477
- "src": "./index.ts",
478
653
  "types": "./dist/index.d.ts",
654
+ "src": "./index.ts",
479
655
  "default": "./dist/index.js"
480
656
  }
481
657
  }
@@ -494,3 +670,102 @@ exports[`'/single-entrypoint': Cli.run > link > output 1`] = `
494
670
  `;
495
671
 
496
672
  exports[`'/single-entrypoint': Cli.run > link > types-target 1`] = `"../index.ts"`;
673
+
674
+ exports[`'/wildcard-exports': Cli.run > default > main 1`] = `
675
+ "export const name = 'wildcard-exports';
676
+ //# sourceMappingURL=index.js.map"
677
+ `;
678
+
679
+ exports[`'/wildcard-exports': Cli.run > default > output 1`] = `
680
+ "{
681
+ "name": "wildcard-exports",
682
+ "version": "0.0.0",
683
+ "type": "module",
684
+ "exports": {
685
+ ".": {
686
+ "types": "./dist/index.d.ts",
687
+ "src": "./index.ts",
688
+ "default": "./dist/index.js"
689
+ },
690
+ "./utils/*": {
691
+ "types": "./dist/utils/*.d.ts",
692
+ "src": "./utils/*",
693
+ "default": "./dist/utils/*.js"
694
+ }
695
+ },
696
+ "sideEffects": false,
697
+ "main": "./dist/index.js",
698
+ "module": "./dist/index.js",
699
+ "types": "./dist/index.d.ts"
700
+ }
701
+
702
+
703
+
704
+ ├── dist
705
+ │ ├── utils
706
+ │ │ ├── format.d.ts
707
+ │ │ ├── format.d.ts.map
708
+ │ │ ├── format.js
709
+ │ │ ├── format.js.map
710
+ │ │ ├── helper.d.ts
711
+ │ │ ├── helper.d.ts.map
712
+ │ │ ├── helper.js
713
+ │ │ └── helper.js.map
714
+ │ ├── index.d.ts
715
+ │ ├── index.d.ts.map
716
+ │ ├── index.js
717
+ │ └── index.js.map
718
+ ├── utils
719
+ │ ├── format.ts
720
+ │ └── helper.ts
721
+ ├── index.ts
722
+ ├── package.json
723
+ └── tsconfig.json
724
+ "
725
+ `;
726
+
727
+ exports[`'/wildcard-exports': Cli.run > default > types 1`] = `
728
+ "export declare const name = "wildcard-exports";
729
+ //# sourceMappingURL=index.d.ts.map"
730
+ `;
731
+
732
+ exports[`'/wildcard-exports': Cli.run > link > main-target 1`] = `"../index.ts"`;
733
+
734
+ exports[`'/wildcard-exports': Cli.run > link > output 1`] = `
735
+ "{
736
+ "name": "wildcard-exports",
737
+ "version": "0.0.0",
738
+ "type": "module",
739
+ "exports": {
740
+ ".": {
741
+ "types": "./dist/index.d.ts",
742
+ "src": "./index.ts",
743
+ "default": "./dist/index.js"
744
+ },
745
+ "./utils/*": {
746
+ "types": "./dist/utils/*.d.ts",
747
+ "src": "./utils/*",
748
+ "default": "./dist/utils/*.js"
749
+ }
750
+ },
751
+ "sideEffects": false,
752
+ "main": "./dist/index.js",
753
+ "module": "./dist/index.js",
754
+ "types": "./dist/index.d.ts"
755
+ }
756
+
757
+
758
+
759
+ ├── dist
760
+ │ ├── index.d.ts -> ../index.ts
761
+ │ └── index.js -> ../index.ts
762
+ ├── utils
763
+ │ ├── format.ts
764
+ │ └── helper.ts
765
+ ├── index.ts
766
+ ├── package.json
767
+ └── tsconfig.json
768
+ "
769
+ `;
770
+
771
+ exports[`'/wildcard-exports': Cli.run > link > types-target 1`] = `"../index.ts"`;