Commit a65de7d
committed
refactor(create): collapse bundled-resolution lets + cover gitignore edge cases
Post-simplify cleanup:
- `bin.ts` — replace four parallel `let`s (`bundledLocalPath`,
`bundledEntryName`, `bundledOrgScope`, `isBundledMonorepo`) with one
`bundled: Extract<OrgResolution, { kind: 'bundled' }> | undefined`.
Downstream uses `bundled?.<field>` everywhere; the `&& bundledOrgScope`
guard at the inject-call drops since the type guarantees `scope` is
set on the bundled variant. `isBundledMonorepo` is now a derived
`bundled?.monorepo === true` constant. Reduces stateful surface area
and tightens the link to the resolution shape.
- `utils.spec.ts` — three new `ensureGitignoreNodeModules` cases:
CRLF line endings (no-op), `node_modules/sub` subpath (must not
count as a match), and `!node_modules` un-ignore override (must
not silently re-exclude).
- `create-org-bundled-monorepo/tarballs/README.md` — document the
exact regeneration command. The mock manifest's `integrity` field
locks the bytes, and macOS's default `tar` injects AppleDouble
metadata that breaks the snap; spell out `COPYFILE_DISABLE=1` +
`--no-mac-metadata` for future maintainers.1 parent 27c91c2 commit a65de7d
3 files changed
Lines changed: 64 additions & 15 deletions
File tree
- packages/cli
- snap-tests/create-org-bundled-monorepo/tarballs
- src/create
- __tests__
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
141 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
442 | 446 | | |
443 | 447 | | |
444 | 448 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 449 | + | |
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
| 473 | + | |
476 | 474 | | |
477 | 475 | | |
478 | 476 | | |
| |||
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
| 510 | + | |
| 511 | + | |
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
| |||
636 | 635 | | |
637 | 636 | | |
638 | 637 | | |
639 | | - | |
640 | | - | |
| 638 | + | |
| 639 | + | |
641 | 640 | | |
642 | 641 | | |
643 | 642 | | |
| |||
800 | 799 | | |
801 | 800 | | |
802 | 801 | | |
803 | | - | |
| 802 | + | |
804 | 803 | | |
805 | 804 | | |
806 | 805 | | |
| |||
903 | 902 | | |
904 | 903 | | |
905 | 904 | | |
906 | | - | |
| 905 | + | |
907 | 906 | | |
908 | 907 | | |
909 | 908 | | |
910 | 909 | | |
911 | 910 | | |
912 | 911 | | |
913 | | - | |
| 912 | + | |
914 | 913 | | |
915 | 914 | | |
916 | 915 | | |
| |||
0 commit comments