Skip to content

Commit 69f26d3

Browse files
fix: don't remove package.json bin in migration (#853)
## PR Checklist - [x] Addresses an existing open issue: fixes #797 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview This is now the second piece of conditional logic in `updateLocalFiles`, so I switched its config parameter to directly take in `mode: Mode`. This particular change also finally got its snapshot tests past my personal _"tl;dr"_ threshold. I switched the logic based on `logic` to use more targeted `toHaveBeenCalledWith`s instead.
1 parent 9b7333a commit 69f26d3

File tree

4 files changed

+56
-310
lines changed

4 files changed

+56
-310
lines changed

src/initialize/initializeWithOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function initializeWithOptions({
1919
[
2020
"Updating local files",
2121
async () => {
22-
await updateLocalFiles(options, { resetPackageVersion: true });
22+
await updateLocalFiles(options, "initialize");
2323
},
2424
],
2525
["Updating README.md", updateReadme],

src/migrate/migrateWithOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function migrateWithOptions({
3131
[
3232
"Updating local files",
3333
async () => {
34-
await updateLocalFiles(options);
34+
await updateLocalFiles(options, "migrate");
3535
},
3636
],
3737
[

0 commit comments

Comments
 (0)