Fixes#309
Unfortunately a lot of React.js apps have this problem with peer deps
because older dependencies specify pre-v19. Because Dyad app templates
do (and should) explicitly specify React as a dependnecy, using
`--legacy-peer-deps` gives us the right behavior where it effectively
does not install peer deps and avoids the React version errors.
For pnpm, we have an explicit lockfiles for our templates so there isn't
an issue.
Context:
https://stackoverflow.com/questions/66239691/what-does-npm-install-legacy-peer-deps-do-exactly-when-is-it-recommended-wh
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This is more important now that import app is available and not every
git repo will be initialized with `main` as the default branch. This
handles the other common case which is the `master` branch.
Whenever Dyad does a commit from a proposal, it will automatically amend
the commit with outside changes (e.g. made outside of Dyad).
This helps avoid a lot of user confusion, e.g.
https://github.com/dyad-sh/dyad/issues/187https://www.reddit.com/r/dyadbuilders/comments/1kjysc0/error_pushing_images/
Edge cases:
If a user adds a file outside of Dyad, and then they hit retry, it will
revert these outside changes, but it's still technically in the version
history, so I think it's OK. This should also be a pretty unusual
situation.
Fixes#164Fixes#187
things to test:
- [x] allow real URL to open in new window
- [x] packaging in electron?
- [ ] does it work on windows?
- [x] make sure it works with older apps
- [x] what about cache / reuse? - maybe use a bigger range of ports??