This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
Update Angular project package dependencies #262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Actually updates dependencies to the latest version of Angular 4. Changes to package.json in #256 didn't also update
yarn.lock
and thus weren't reflected in the build.Notes
This caused a few build issues:
One is that climate-change-components specifies versions
of Angular to use while building. If the Angular versions
here don't match that, we get build issues that look like:
To address this it is possible to force our project's
typescript compiler to always use the versions of certain
packages via the "files" config of tsconfig.json. This
gives us a little flexibility in which Angular version
gets used in the parent project. We still should respect
the Angular version requirements of the components lib,
but that restriction is far more lax than the specific
Angular version the components lib is built with.
Another build issue was caused by ng2nouislider being
updated to 1.7.5 based on the ^1.6.2 restriction in
package.json. 1.7.5. is built with a version of Angular
CLI designed for use with Angular 5. This led to the
error:
A GitHub issue on a different project with the same
issue provided enough info to pinpoint the solution,
which was to use a version of ng2nouislider built with
Angular CLI compatible with Angular 4.
primefaces/primeng#4401
Testing Instructions
docker-compose build angular
./scripts/server
should still build and the app should function as before./scripts/test
should continue to work