Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Add a way to apply known file changes after migration #1184

Open
3 tasks done
JoshuaKGoldberg opened this issue Jan 3, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

Right now, if you want to run npx create-typescript-app --mode migrate on an existing repository that doesn't use exactly what the template sets up, there'll likely be some changes to tooling. For example, a GitHub Action that uses ncc instead of tsx to build might see a change like:

// package.json
- "build": "tsx"
+ "build": "tsx"
...
+ "ncc": "^1.2.3",
- "tsx": "^1.2.3",

This is annoying and inconvenient. I'd like to allow repositories to store their own description of changes to be made after migration. That way they can run migration mode, then those changes - and end up with no unintended changes.

I suspect there may be two kinds of changes to be made:

  • Terminal commands: running installs, uninstalls, and the like
  • Text (diff): directly modifying built files

Additional Info

This is essentially a re-file of #498. Spinning out into a new issue as the comment history on that one includes a good bit of discussion to get us to this point.

This is essentially turning the end-to-end test snapshots into a real feature. Better documenting those snapshots is tracked in #1141.

There's also a similarity to how https://github.com/ds300/patch-package allows applying changes after installation...

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Jan 3, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Jan 3, 2024
@JoshuaKGoldberg JoshuaKGoldberg added this to the Simpler Snapshots milestone Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

1 participant