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
Dependency updates and package-lock #1164
Comments
Downside to the |
I think the “easiest” solution might be the best one. It’s what we recommend in our setup guide anyway, and I feel like the idea is somewhat validated in that it’s what’s being recommended in Ryan Dahl’s Deno project:
From https://github.com/denoland/deno/blob/master/Docs.md#linking-to-third-party-code |
A local can.js doesn't help people who already switched to can 5 though. :-( |
I'm a little torn on this. More and more it feels to me like import "bit-tabs/unstyled";
import { Component } from "can";
Component.extend({
tag: "my-app",
view: `
<bit-tabs>
<bit-panel title="CanJS">
CanJS provides the MV*
</bit-panel>
<bit-panel title="StealJS">
StealJS provides the infrastructure.
</bit-panel>
</bit-tabs>
`,
ViewModel: {}
}); Using package-lock.json. It seems like as it is today, |
From a high level I think we need to decide:
Stop-gaps:
|
i am for a alternate option and that is maybe not what you like but i think its the best i am not for the reexport method as this leads to some other bugs with tree shaking also it would be a good idea to investigate on some packages that are using can packages via a i call it side effect. when we would code some parts in a more FRP like style this would help a lot with the state as we don't need global state then we would reduce overall state fullness. when you would consider my idea i would also dedicate my time for creation and identification of a roadmap to do that. |
DoneJS 3 apps have a problem where an update to any canjs package can result in multiple versions of certain packages when using package-lock (or even in newly generated apps).
The cause is that because
can
has pinned versions, but other donejs projects such asdone-autorender
anddone-component
do not, those packages might load a newer version of can-stache, butcan
itself depends on an older version.Solutions
These are the possible solutions I can think of
Move all can-dependant packages into can
Any package that uses
can
, such asdone-autorender
anddone-component
could become a dependency of canjs. Then the user would not use any can package except throughcan
.Problems
can
itself loads).index.stache!done-autorender
main. To work around this we'd need acan/done-autorender
or something.Create a can5 package
This idea is to create a package that uses the latest versions of packages. This prevents the multiple versions problem because any compatible version would be included.
We'd likely want to do this as a part of the build of
can
somehow.Then in donejs we'd create a steal map of
"can": "can5"
so that users could writeimport { Component } from "can";
.Create a local
can.js
Another option is to go back to depending on individual packages and having a local
can.js
that contains all of the exports.It should probably only be core and a few other select things (like can-stache-route-helpers) that are steal related.
This is likely the easiest solution.
The text was updated successfully, but these errors were encountered: