nib icon indicating copy to clipboard operation
nib copied to clipboard

Loosen prosemirror-view dependency

Open aried3r opened this issue 5 years ago • 4 comments
trafficstars

Hey! Thanks for this great package! :)

I was wondering, I believe nib-core is using an outdated version of prosemirror-view since it locks it to 1.10.0. I might be wrong here, since other packages of prosemirror do request a newer version for themselves.

https://github.com/nib-edit/Nib/blob/8cc08f1b9e41c8bec5b6e170f9fc05ec60dee4f1/packages/core/package.json#L36

Could this be loosened like the other dependencies?

https://github.com/nib-edit/Nib/blob/8cc08f1b9e41c8bec5b6e170f9fc05ec60dee4f1/packages/core/package.json#L28-L35

Maybe these should even be peerDependencies since there's no way (at least as of now) in yarn to update nested dependencies (outside of using resolutions in package.json), see https://github.com/yarnpkg/yarn/issues/2394. Unless you want to stay in control of which prosemirror package versions nib uses.

aried3r avatar Jan 21 '20 16:01 aried3r

It will be useful for me to control which package of prosemirror Nib uses, I will upgrade this soon.

Thanks a lot, this helps.

jpuri avatar Jan 22 '20 12:01 jpuri

Hey, thanks for your reply! Since it's not (easily) possible to update subdependencies (basically, I am stuck with prosemirror package versions of the time I install nib-core), would it be possible for you to set the version constraint to the highest possible version that nib-core works with or is available?

Babel for example does it with @babel/core, with every release of @babel/core they also change the versions of its sub-dependencies.

WDYT?

https://github.com/babel/babel/blob/2486615a74580283c49475d66067bd7fcab3330e/packages/babel-core/package.json#L43-L49

https://github.com/babel/babel/blob/1815c349877acca1d3275ea72512ee7824db49e3/packages/babel-core/package.json#L42-L48

aried3r avatar Jan 22 '20 13:01 aried3r

I did a fix here: https://github.com/nib-edit/Nib/commit/c89a28e2776dc43eefbb957e33c3df2ec19f021a

@aried3r : can you plz add some details to above comment, do you mean that with each release I upgrade prosemirror versions to highest supported versions for Nib ?

jpuri avatar Apr 04 '20 12:04 jpuri

Hey!

do you mean that with each release I upgrade prosemirror versions to highest supported versions for Nib ?

Yes, exactly. Since these are dependencies of nib itself, I cannot (easily at least, there's resolutions, and in npm an RFC and another and a guide which works for security fixes as well as this use case) update prosemirror dependencies myself once an update is released.

As you can see above, that's also how babel keeps their own dependencies up to date (also for compatibility reasons, I believe).

aried3r avatar Apr 23 '20 11:04 aried3r