Closed kaladay closed 2 months ago
This isn't an upgrade.
This is a downgrade to known versions that worked in 2022.
The Angular changes are done because that was the version available in 2022 but for some reason NPM is now pulling an older version of angular than from 2022 when doing npm install
without these changes.
I'll attach my 2022 package-lock.json file to this for reference.
The 2022 package lock file that works without error and was used to generate this PR.
Here is also the package.json
file from two years ago to match that lock file above.
It is neither a downgrade or upgrade and shouldn't be either. It is fixing the implicit dependency versions to when the build worked.
The reason we should not upgrade angular as tamu-library-components
is what we need a change for, and it does not require any weaver-component
changes. We should maintain these but not have it prevent the feature request for the header.
How did your package-lock.json have a later version of angular that is fixed to a version in the package.json?
How did your package-lock.json have a later version of angular that is fixed to a version in the package.json?
Probably because of the dependencies and how NPM does its thing. We have apparently been using a newer angular than the one specified in the package json file because of dependencies pulling things in.
This PR fixes the state to be explicitly what it has already been doing.
The reason we should not upgrade angular as...
We are in agreement. This PR does NOT upgrade angular. It explicitly sets it to what it has already been doing for years now as noted by the lock file.
It explicitly sets it to what it has already been doing for years now as noted by the lock file.
Aren't lock files environment specific? I am fine with the patch upgrade of angular in the package.json. We will have to upgrade similar in tamu-library-components
or have another incorrect peer dependency. If not reworking the entire dependency management altogether. It is a bit overwhelming between the two and the projects package.json.
Update: A spike has been created to address this issue further: https://github.com/TAMULib/weaver-components/issues/526
Requesting to review/approve the above PR.
Thank you.
I happened to have a 2 year old package lock file. Compare and copy and paste several of the versions and problematic packages. This could use further review to get the latest but still working versions. For now, this is good enough to get things compiling.
The
12.2.16
versions of angular happened to be being pulled down by recent installs but the older package lock file shows12.2.17
. Explicitly set the12.2.17
in all angular cases.Several dependencies have warnings like these:
Downgrade the dependencies to known versions that do build.
I explicitly set the
typescript
version to>=4.2.3 <4.4
based on some of the contents of the 2 year old package lock file. I do not know what is ideal here for the version numbers but this is good enough for now.This also requires using Node v16 in user-space to build.