Epic React update-deps script

Whenever I update react-workshop-app, I need to update all my EpicReact workshop repos. I have a script in each one called update-deps which looks like this:

https://github.com/kentcdodds/react-hooks/blob/119a8c9182664e7b28e6a426b7ca861f045f729e/scripts/update-deps

So I've put together a little script that opens an individual terminal window for each of the repos and runs the update-deps script and pushes. Really straightforward and saves me a lot of time.

// Menu: Update EpicReact deps
// Description: Update all the dependencies in the epicreact workshop repos
const repos = [
'advanced-react-hooks',
'advanced-react-patterns',
'bookshelf',
'react-fundamentals',
'react-hooks',
'react-performance',
'react-suspense',
'testing-react-apps',
]
const script = `git add -A && git stash && git checkout main && git pull && ./scripts/update-deps && git commit -am "update all deps" --no-verify && git push && git status`
for (const repo of repos) {
const scriptString = JSON.stringify(
`cd ~/code/epic-react/${repo} && ${script}`,
)
exec(
`osascript -e 'tell application "Terminal" to activate' -e 'tell application "Terminal" to do script ${scriptString}'`,
)
}