Vue.Draggable
Vue.Draggable copied to clipboard
How to update sortable.js library?
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?
You have two options:
- Wait for the author(s) to update this project.
- Create a pull request with your required change, then wait some more unit the author(s) merge your pull request.
Thanks. I updated the library using selective dependency resolution.
@animeshsa Could you share your solution?
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
[email protected], 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.
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.
I ended up using a branch from a fork
npm install git+https://github.com/apodacaduron/vue.draggable.next.git\#update-sortablejs-version
NPM v8+ https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides
{
"overrides": {
"sortablejs": "~1.15"
}
}