Closed boeckMt closed 1 year ago
For this we also have to update the github actions to use node 15.x https://github.com/actions/setup-node/issues/213#issuecomment-739685886
// https://github.com/actions/setup-node
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '15'
npm install
is installing all dependencies for the projects.
ng update
for the workspaces // https://github.com/angular/angular-cli/issues/14841
Install package in a workspace
npm i <p-name> --workspace=projects/<name>
create a new package and add it to the workspace
npm init -w ./projects/<name>
Currently 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/services-layers@0.0.0-PLACEHOLDER
...
npm WARN Could not resolve dependency:
npm WARN peer @angular/core@"0.0.0-PLACEHOLDER-VENDOR" from @dlr-eoc/services-layers@0.0.0-PLACEHOLDER
...
npm WARN Could not resolve dependency:
npm WARN peer rxjs@"0.0.0-PLACEHOLDER-VENDOR" from @dlr-eoc/services-layers@0.0.0-PLACEHOLDER
...
we could try to use the script setVersionsforDependencies and restore it after the install somehow.
possibly related: https://github.com/npm/rfcs/issues/301
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