Replies: 7 comments 1 reply
-
For this we also have to update the github actions to use node 15.x actions/setup-node#213 (comment)
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Use Npm WorkspacesInstall package in a workspace
create a new package and add it to the workspace
|
Beta Was this translation helpful? Give feedback.
-
Npm install for the whole workspaceCurrently this fails due to the version paceholders we have set Could not resolve dependency:
npm WARN peer @angular/common@"0.0.0-PLACEHOLDER-VENDOR" from @dlr-eoc/[email protected]
...
npm WARN Could not resolve dependency:
npm WARN peer @angular/core@"0.0.0-PLACEHOLDER-VENDOR" from @dlr-eoc/[email protected]
...
npm WARN Could not resolve dependency:
npm WARN peer rxjs@"0.0.0-PLACEHOLDER-VENDOR" from @dlr-eoc/[email protected]
... we could try to use the script setVersionsforDependencies and restore it after the install somehow. possibly related: npm/rfcs#301 |
Beta Was this translation helpful? Give feedback.
-
Good post about package managers: https://blog.logrocket.com/advanced-package-manager-features-npm-yarn-pnpm/ |
Beta Was this translation helpful? Give feedback.
-
If we could ensure that the workspaces are always sorted according to the order in topsort, we could run the build via npm workspaces commands.
|
Beta Was this translation helpful? Give feedback.
-
Paceholders are now removed! bc9e9ed, c82bdf0 To sync the versions we use a script which checks if dependencies in our packages are also in the root package.json and thenm uses this version. It also updates packages version with the one from the root package.json. To update only the version we can also use npm version as workspace command |
Beta Was this translation helpful? Give feedback.
-
Description
To better handle dependencies management try to use NPM 7 workspaces with the monorepo.
https://docs.npmjs.com/cli/v7/using-npm/workspaces
https://dev.to/limal/simplify-your-monorepo-with-npm-7-workspaces-5gmj
https://2ality.com/2021/07/simple-monorepos.html?utm_source=typescript-weekly.com&utm_campaign=typescript_weekly_175&utm_medium=email
Dependencies management right now (NPM)
peerDependencies
to angular and overall used dependenciesdependencies
of the project and also other@dlr-eoc/projects
are listed here as dependenciesDependencies related to the Build process
Only use npm workspaces is not enough to build all the projects. Projects can also depend on other projects.
angular.json
package.json
(by usingproject.root
fromangular.json
)ng build <project> --prod=true --watch=false
Beta Was this translation helpful? Give feedback.
All reactions