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
Some Morfeo's packages assumes that you already have have other packages installed, for example @morfeo/styled-components-web assume that you already have @morfeo/react in your dependencies; This behaviour it's simply implement by putting (in the previous example) @morfeo/react as peerDependency of @morfeo/styled-components-web.
Unfortunately, lerna does not handle peerDependencies pretty good, in fact for every package that has another Morfeo package as peerDependency we have to:
During development: Always add the dependency not only in peer but also inside the devDependencies
During versioning: Manually update peerDependencies according to the new version.
This issue is caused by the process of sym-linking of lerna that doesn't care about peerDependencies.
Solution
My idea it's to create a simple script to run post-versioning where we syncronized the new version of the morfeo's packages in all the peerDependecies.
To do this we can simply read what the new version is from the lerna.json file and wherever we find Morfeo's peerDependency inside any package.json, we put this new version: ^${versionReadFromLernaJson}.
Additional
All the custom scripts we currently have are written in .mjs files, it could be good to convert them in Typescript and use ts-node to run them, I think it could be good to integrate this activity in this task.
The text was updated successfully, but these errors were encountered:
The problem
Some Morfeo's packages assumes that you already have have other packages installed, for example
@morfeo/styled-components-web
assume that you already have@morfeo/react
in your dependencies; This behaviour it's simply implement by putting (in the previous example)@morfeo/react
aspeerDependency
of@morfeo/styled-components-web
.Unfortunately, lerna does not handle
peerDependencies
pretty good, in fact for every package that has another Morfeo package as peerDependency we have to:peer
but also inside thedevDependencies
peerDependencies
according to the new version.This issue is caused by the process of
sym-linking
of lerna that doesn't care about peerDependencies.Solution
My idea it's to create a simple script to run
post-versioning
where we syncronized the new version of the morfeo's packages in all thepeerDependecies
.To do this we can simply read what the new version is from the
lerna.json
file and wherever we find Morfeo's peerDependency inside any package.json, we put this new version:^${versionReadFromLernaJson}
.Additional
All the custom scripts we currently have are written in
.mjs
files, it could be good to convert them inTypescript
and usets-node
to run them, I think it could be good to integrate this activity in this task.The text was updated successfully, but these errors were encountered: