microsoft / microsoft/AzureTRE
Cleanup UI package resolution
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 235
- Forks
- 192
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe.
The UI package configuration contains several outdated or potentially misleading dependency-management practices:
package.jsoncontains stale resolutions fornth-checkandnode-sass/**/ip. None ofnth-check,node-sass, oripis present in the current lockfile. Additionally, resolutions is primarily a Yarn mechanism, while this project uses npm.- Several dependencies use the unbounded version specifier
"latest":@vitejs/plugin-react-swcvite-plugin-svgrvite-tsconfig-pathsjsdom
@types/node,@types/react, and@types/react-domare declared in bothdependenciesanddevDependencies, although they are build-time dependencies.- UI automation uses
npm installdespite the repository committing apackage-lock.json. This permits dependency resolution to differ from the committed lockfile and may hide
inconsistencies betweenpackage.jsonand the lockfile. - The declared Node.js requirement is
>=21.0.0. Node.js 21 was a non-LTS release and is end-of-life, while the UI build workflow currently uses Node.js 24.
These issues reduce build reproducibility and make the package configuration harder to understand and maintain.
Describe the solution you'd like
Apply a small, non-breaking dependency-hygiene cleanup to the UI project:
- Remove the obsolete
resolutionsblock after confirming the referenced packages are no longer present in the dependency tree. - Replace the four
"latest"specifications with the versions currently resolved bypackage-lock.json, so this cleanup does not unintentionally upgrade them:@vitejs/plugin-react-swcvite-plugin-svgrvite-tsconfig-pathsjsdom
- Retain
@types/node,@types/react, and@types/react-domonly indevDependencies. - Replace
npm installwithnpm ciin deterministic CI/build automation, beginning with the UI test step in.github/workflows/build_docker_images.yml. - Review the UI deployment script separately and use
npm cithere as well if it does not intentionally need to modify dependency resolution. - Update the Node.js engine declaration to reflect the project’s supported LTS runtime, aligned with CI—for example, Node.js 22 or later, subject to the project’s runtime-support
policy. - Regenerate and commit
package-lock.json, then run the existing lint, TypeScript/build, and unit-test checks.
Safe patch-level transitive dependency updates may be included if they are produced by a controlled lockfile regeneration and pass the existing checks. The React Router major-version
upgrade should not be included in this work.
Describe alternatives you've considered
- Leave the configuration unchanged because the current lockfile generally makes installations repeatable. This retains misleading and ineffective entries and allows "latest"
dependencies to change unexpectedly whennpm installregenerates the lockfile. - Upgrade all outdated UI dependencies simultaneously. This was rejected because several available updates are major versions that require dedicated migration and validation work.
- Keep using
npm installin automation. This is useful for updating dependencies but is less appropriate for CI and deployment, where installation should reproduce the committed
lockfile exactly. - Keep the existing Node.js engine declaration. Although current CI satisfies it, an end-of-life non-LTS version is not a useful baseline for communicating supported environments.
Additional context
This work should be limited to dependency hygiene and reproducibility. It should not include major-version migrations such as:
- React Router 7
- React 19
- Redux Toolkit 2
- newer MSAL major versions
- RJSF 6
- Vite 8
- replacement of Moment.js
Those changes should be assessed and tested independently.
The existing UI unit tests, linting, and production build should pass after this cleanup. The project currently lacks comprehensive browser-level UI tests, so avoiding intentional
runtime behavior changes is particularly important.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the UI package.json and package-lock.json to verify the resolutions, resolved versions, type dependency placement, and Node.js engine requirement. Then inspect the UI step in .github/workflows/build_docker_images.yml and the existing deployment script before changing install commands. Done means deterministic installs, a regenerated lockfile, and passing the existing lint, TypeScript/build, and unit-test checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, vite
- Domain
- build-system, ci-cd, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100