You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quill's use of an exact version for its quill-delta dependency leads to undesirable behavior when used in code which itself directly uses quill-delta but which specifies it with a ^ or ~ dependency spec.
Steps for Reproduction
Make a package which uses both quill and quill-delta directly. Use ^ on the version numbers of each so as to be reasonably flexible with versions.
Observe the resulting node_modules directory.
Expected behavior:
The build would only end up with one copy of quill-delta.
Actual behavior:
The build ends up with two copies of quill-delta, at different versions.
This happens because quill specifies its own quill-delta dependency as an absolute version instead of being flexible with a ^ or ~ in the version string (for example).
Platforms:
n/a
Version:
Note: This is a simplification. In reality, my project has multiple package.json files, and the one that uses quill directly is semi-independent of the one that uses quill-delta. For example, parts of the built product are server-side only, so they don't actually use quill at all, just quill-delta.
I noticed this problem on v1.3.2, when my package.json specified:
With this spec, before Quill v1.3.3 was published, this meant that I got quill v1.3.2 and quill-delta v3.6.2. However, Quill v1.3.2 requires exactly quill-delta v3.6.1. So, I ended up with a node_modules that also had v3.6.1. And my code that uses both quill and quill-delta directly would end up running with a mish-mash of instances of Delta, some the v3.6.1 version and others the v3.6.2 version.
In this particular case, the only problem was undesired code bloat. However, it's conceivable that a subtle difference in behavior between two versions of quill-delta might ultimately lead to a more nefarious (and hard to track down) problem.
Because I never want to ship bloated code, I've moved to specifying my project's own quill-delta version as an inflexible spec which I copy from quill, while I still refer to quill flexibly as ^1.3.3 (or similar). However, this means that whenever quill gets updated I have to manually track that change, lest I run into the reverse problem where a quill update specifies a newer quill-delta than I have. So, I now have code which explicitly tests to see if I ended up with two versions of quill-delta, and complains loudly if that happens. It'd be great if I could just go back to using ^ for quill-delta and stop worrying about all this.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered:
Quill's use of an exact version for its
quill-delta
dependency leads to undesirable behavior when used in code which itself directly usesquill-delta
but which specifies it with a^
or~
dependency spec.Steps for Reproduction
quill
andquill-delta
directly. Use^
on the version numbers of each so as to be reasonably flexible with versions.node_modules
directory.Expected behavior:
The build would only end up with one copy of
quill-delta
.Actual behavior:
The build ends up with two copies of
quill-delta
, at different versions.This happens because
quill
specifies its ownquill-delta
dependency as an absolute version instead of being flexible with a^
or~
in the version string (for example).Platforms:
n/a
Version:
Note: This is a simplification. In reality, my project has multiple
package.json
files, and the one that usesquill
directly is semi-independent of the one that usesquill-delta
. For example, parts of the built product are server-side only, so they don't actually usequill
at all, justquill-delta.
I noticed this problem on v1.3.2, when my
package.json
specified:With this spec, before Quill v1.3.3 was published, this meant that I got
quill
v1.3.2 andquill-delta
v3.6.2. However, Quill v1.3.2 requires exactlyquill-delta
v3.6.1. So, I ended up with anode_modules
that also had v3.6.1. And my code that uses bothquill
andquill-delta
directly would end up running with a mish-mash of instances ofDelta
, some the v3.6.1 version and others the v3.6.2 version.In this particular case, the only problem was undesired code bloat. However, it's conceivable that a subtle difference in behavior between two versions of
quill-delta
might ultimately lead to a more nefarious (and hard to track down) problem.Because I never want to ship bloated code, I've moved to specifying my project's own
quill-delta
version as an inflexible spec which I copy fromquill
, while I still refer toquill
flexibly as^1.3.3
(or similar). However, this means that wheneverquill
gets updated I have to manually track that change, lest I run into the reverse problem where aquill
update specifies a newerquill-delta
than I have. So, I now have code which explicitly tests to see if I ended up with two versions ofquill-delta
, and complains loudly if that happens. It'd be great if I could just go back to using^
forquill-delta
and stop worrying about all this.Thanks for your consideration!
The text was updated successfully, but these errors were encountered: