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

How to update sortable.js library? #1053

Open
animeshsarkar-bct opened this issue Jun 16, 2021 · 7 comments
Open

How to update sortable.js library? #1053

animeshsarkar-bct opened this issue Jun 16, 2021 · 7 comments

Comments

@animeshsarkar-bct
Copy link

I used this plugin and found that it used sortable js old version. Sortable js fixed some Safari issue in their latest version. How to update?

@Heartnett
Copy link

You have two options:

  1. Wait for the author(s) to update this project.
  2. Create a pull request with your required change, then wait some more unit the author(s) merge your pull request.

@animeshsarkar-bct
Copy link
Author

animeshsarkar-bct commented Jun 22, 2021

Thanks. I updated the library using selective dependency resolution.

@apodacaduron
Copy link

@AnimesHSa Could you share your solution?

@animeshsarkar-bct
Copy link
Author

I used yarn for package management. Use this link
https://classic.yarnpkg.com/en/docs/selective-version-resolutions/
in package,json write

"resolutions": {
   "sortablejs": "^1.13.0"
 },

and in yarn.lock looks like this

sortablejs@1.10.2, sortablejs@^1.13.0:
  version "1.13.0"
  resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.13.0.tgz#3ab2473f8c69ca63569e80b1cd1b5669b51269e9"
  integrity sha512-RBJirPY0spWCrU5yCmWM1eFs/XgX2J5c6b275/YyxFRgnzPhKl/TDeU2hNR8Dt7ITq66NRPM4UlOt+e5O4CFHg==

so now all libraries that usage sortable js use this version 1.13.0.
There is another dirty solution that is to update the lock file manually.

@joshbuker
Copy link

Just a heads up, I think resolutions will disregard version locks, so if there's any incompatibilities you won't be warned / won't know until it breaks.

@apodacaduron
Copy link

I ended up using a branch from a fork
npm install git+https://github.com/apodacaduron/vue.draggable.next.git\#update-sortablejs-version

@Mihailoff
Copy link

NPM v8+ https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

{
  "overrides": {
    "sortablejs": "~1.15"
  }
}

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

No branches or pull requests

5 participants