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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

donejs update #535

Closed
matthewp opened this issue Feb 11, 2016 · 3 comments
Closed

donejs update #535

matthewp opened this issue Feb 11, 2016 · 3 comments

Comments

@matthewp
Copy link
Contributor

It would be nice to have a mechanism to update your project to the next major/minor version of donejs. Consider you are on version 0.15 and you want to upgrade to 0.16. Currently you'd have to do something like:

before

{
  "can-ssr": "1.0.0",
  "done-autorender": "1.0.0"
}

after

{
  "can-ssr": "2.0.0",
  "done-autorender": "2.0.0"
}

You'd have to know which dependencies needed to be updated. In this example can-ssr might have a breaking change that doesn't work with done-autorender 1.0.0, so if you only updated can-ssr your app wouldn't work.

This makes upgrading to minor versions of donejs hard. The way I've done it myself is look at donejs-cli's package.json. But users don't know about that (and shouldn't).

Maybe we could have:

donejs update 0.16

Which would upgrade all of your dependencies to 0.16.

@marshallswain
Copy link
Member

This would be a much easier upgrade path than what I've been doing:

  • rename old app folder
  • donejs init app-name
  • copy over old app to new app.

@matthewp
Copy link
Contributor Author

Now that there are codemods in canjs we could have that as part of this.

Probably by default? Can't see why not.

donejs upgrade

Without codemods:

donejs upgrade --no-codemods

matthewp added a commit that referenced this issue Feb 19, 2018
This adds the `upgrade` command. This command has 2 pieces of
functionality:

* Updates the project's package.json file with the newest versions of all of the donejs projects (including canjs, stealjs, etc.).
* Runs can-migrate with the corresponding canjs version number. This
means that for donejs 2.0 it will run the canjs 4.0 codemods.

This should make the 2.0 migration guide much much easier.

Closes #535
@matthewp
Copy link
Contributor Author

Fixed in #1080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants