paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
684 stars 54 forks source link

How to do releases upgrade ? #137

Closed sondh0127 closed 3 years ago

sondh0127 commented 3 years ago

Did we have any approach to upgrade the current project?

I create a project with "@paljs/generator": "^2.3.1". so how can I update to ^2.3.2 automatically or provide some way to resolve the conflict?

AhmedElywa commented 3 years ago

Hi @sondh0127, you always can look to releases notes here and see if there any breaking changes, or you can just update without any change in your code

Also, you can watch release notes. to get an email when any new release released image

sondh0127 commented 3 years ago

@AhmedElywa Thank you for your answer but this isn't what I mean. I would like to do that with paljs/cli instead. Something like:

  1. npm install -g @paljs/cli
  2. Go to the folder containing the old generated app
  3. pal c <the_old_foldername>

After that, I'll be able to see the diff of each file.

I ended up with the following step with the help of Vscode + Git

  1. git commit <old-app>
  2. npm install -g @paljs/cli
  3. generate new app with pal c <new-app>
  4. drop all new file from <new-app> to <old-app> folder => choose replace for all files
  5. revert unwanted changed

Screen Capture_select-area_20201016155451

Sometimes I think we also have to clean up node_modules yarn.lock.

rm -rf .next node_modules yarn.lock
yarn
  1. Generate with new cli
    pal g
    yarn generate
    yarn dev

Hope this helps!

AhmedElywa commented 3 years ago

we don't make many changes in the examples files, but if you need to know what we change in these examples, there is an easier way to do this look to the new commit into this folder and see what we change. and by clicking on History you will see the last commits in this folder