Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Stabilize frontend builds #1916

Closed
5 of 13 tasks
begelundmuller opened this issue Mar 13, 2023 · 3 comments
Closed
5 of 13 tasks

UI: Stabilize frontend builds #1916

begelundmuller opened this issue Mar 13, 2023 · 3 comments

Comments

@begelundmuller
Copy link
Contributor

begelundmuller commented Mar 13, 2023

Recommendations from infra for improving the stability of frontend builds:

  • Netlify should build web-admin from root using npm run build -w web-admin (should already be the case)
  • All dependencies not needed in production (i.e. none since it's a SPA build) should be devDependencies
  • Delete package-lock.json and run npm i from scratch
  • The root package.json should not contain any dependencies
  • All dependencies used by a workspace should be in its package.json (don't rely on transitive imports)
  • Upgrade from Node 16 to LTS – add a method for enforcing a Node and NPM version when building package-lock.json
  • Upgrade all package dependencies to latest bugfix release (not necessarily feature releases)
  • Assign an NPM dependency responsible person – ensure proper code reviews for package-lock.json changes
  • Fix frontend build warnings
  • Add CI/CD notifications from Netlify for changes that impact web-admin
  • Serve static assets in web-admin and web-local on /assets (or similar), not on root
  • Setup build config (Vite?) to address _redirects temporary hack in web-admin/package.json
  • Address Dependabot alerts for NPM
@skokenes
Copy link
Contributor

skokenes commented Jun 26, 2023

All dependencies used by a workspace should be in its package.json (don't rely on transitive imports)
Is there any way we can automatically audit for this one? It caused a bug today when package-lock.json was regenerated from scratch in a PR. We had a workspace using a transitive import, and it ended up picking up a new version of a library that broke some behavior

@begelundmuller
Copy link
Contributor Author

begelundmuller commented Jun 27, 2023

@skokenes I don't have any experience here, but a quick search turned up these tools:

Not sure if they work for transitive imports in NPM workspaces, but if they do (or you find another tool), I think we should add a Github Action for it.

@begelundmuller
Copy link
Contributor Author

Closing since the builds have been stable for a long time now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants