Update .npmrc approach and locked dependencies#46601
Conversation
dougbu
commented
Feb 13, 2023
- use just one .npmrc file
- enforce resolution from correct registry in all yarn.lock files
- bump all resolved dependencies to latest compatible versions
- re-resolve everything but don't change any package.json files
How does that work? What is telling npm/yarn to look ~5 folders up to find the .npmrc file? |
|
This PR should reduce maintenance costs because (a) there's only one The CodeCheck.ps1 changes avoid checking in lock files using anything other than the @dotnet/aspnet-blazor-eng, @BrennanConroy, @halter73 the yarn.lock file changes are optional and mostly happened because I wanted to confirm |
I read |
|
Ok cool 👍 just checking |
Great idea❕ I did that and confirmed I ingested at least a few packages w/ that change in place. Went through and bumped all versions again to make sure things are still working (defence in depth). I'll push those changes (plus the two updated src/Components/Web.JS/dist/Release/blazor.*.js files) after a local build. See https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-public-npm/Npm/@typescript-eslint%2Fparser/overview/5.52.0 for confirmation I grabbed a new package version a couple of hours ago. |
|
Anyone familiar w/ the following error❔ I' don't see problems in CI builds but it happened a couple of times in local builds when testing corner cases on this branch. Likely not important but I'd like to confirm… |
|
Everything looks resolved and my local testing went well. I'll merge this tomorrow morning unless I get further comments in the meantime. |
|
Not merging this immediately because the One odd thing is https://www.npmjs.com/package/chromium-bidi?activeTab=dependencies shows Another odd thing is this message shows up only as a buried warning in aspnetcore-ci jobs. Why was it an error in only the one pipeline❔ In any case, I did some searching and found the solution is found in the /cc @dotnet/aspnet-blazor-eng @BrennanConroy @halter73 |
- use just one .npmrc file
- remove .yarnrc file
- unnecessary since `npm` and `yarn` will both use the .npmrc file
- (I originally created the .yarnrc when trying fixes for Dependabot updates)
- enforce resolution from correct registry in all yarn.lock files
- add line number for new CodeCheck errors
- update `LogError` to take new `-LineNumber` parameter
- bump all resolved dependencies to latest compatible versions
- re-resolve everything but don't change any package.json files
- update generated JS files
- changes likely the result of `npm` package version bumps
- nit: ignore projects found after building e.g. for project template tests
- previous code seemed designed for clean (CI) environments
- avoid '... chromium-bidi@0.4.3" has unmet peer dependency "mitt@*"' errors and warnings
This took longer than expected because |
|
Actually, I'm building locally to see if the generated JS files need another update. Will enable auto-merge if my local build comes back clean in that area. |