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

feat: Publish Veda UI to npm and workflow proposal #1391

Merged
merged 12 commits into from
Feb 4, 2025

Conversation

dzole0311
Copy link
Collaborator

@dzole0311 dzole0311 commented Jan 20, 2025

Related Ticket: closes #1369

Description of Changes

  • Changed the registry in .npmrc from the private Verdaccio registry to the public NPM registry under the scope teamimpact
  • Published the library under the teamimpact scope and updated the docs on how to set the necessary npm credentials
  • Experimented with a new README-lib.md:
    • Added an experimental workflow to copy this file to the lib dist during the library build
    • This allows us to have a unique README.md for the library when its published on NPM, separate from the veda-ui submodule documentation
  • I noticed the lib bundle size increased, largely due to the USWDS images and fonts being copied in the library build. There’s room for optimization, including removing unused assets or modules from the existing veda-ui (e.g. air-quality-and-covid-19--story-cover.png etc), and I made a tracking issue for that: Optimize veda-ui library bundle size #1392

Notes & Questions About Changes

Proposed workflow for developing, testing and publishing the NPM registry:

  • Workflow proposal for veda-ui NPM publishing and development / testing with consuming apps (Next.JS) is documented here. The proposal aligns and extends our current veda-ui publishing workflow with the bi-weekly automated releases

Validation / Testing

  1. Set the necessary npm auth credentials mentioned in the set up docs
  2. dry-run publish a version to make sure everything you're correctly authenticated
  3. Review the Google doc proposal and share feedback

@dzole0311 dzole0311 changed the base branch from main to 1329-review-commit-hooks-2 January 20, 2025 14:53
Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit dc629cf
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/67a1e02e09b1b20008876375
😎 Deploy Preview https://deploy-preview-1391--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dzole0311 dzole0311 marked this pull request as draft January 20, 2025 15:31
Base automatically changed from 1329-review-commit-hooks-2 to main January 22, 2025 20:55
@dzole0311 dzole0311 changed the title feat: [DRAFT] Publish Veda UI to npm feat: [DRAFT] Publish Veda UI to npm and workflow proposal Jan 23, 2025
@dzole0311 dzole0311 marked this pull request as ready for review January 23, 2025 10:34
@dzole0311 dzole0311 changed the title feat: [DRAFT] Publish Veda UI to npm and workflow proposal feat: Publish Veda UI to npm and workflow proposal Jan 23, 2025
Copy link
Collaborator

@sandrahoang686 sandrahoang686 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-02-02 at 10 50 00 PM
Was able to publish @teamimpact/[email protected] following instructions. See pic. Version has been unpublished.

Copy link
Member

@AliceR AliceR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I published a version from my aoi-simplification branch, see https://www.npmjs.com/package/@teamimpact/veda-ui/v/5.11.7-1395.0
It works! No I am off to test my work on next-veda 🚀

Thanks for all your work here @dzole0311 🎉

@dzole0311
Copy link
Collaborator Author

Summary from the RFC:

  1. Development and testing
  • Work happens in feature branches as now
  • Before merging, if a change is needed for Next.js, we publish a pre-release version under the preview tag for testing
  • A preview PR is opened on the instance side to validate changes before merging
  1. Peer review and approvals
  • Once tested in next-veda-ui, changes get merged into main
  • Preview PRs are for validation only and shouldn’t be merged into next-veda-ui/main
  1. Bi-Weekly automated releases
  1. Cleanup

Action items:

  1. Extend the release action to publish a stable veda-ui version to NPM #1419
  2. Clean up stale preview NPM versions #1420

Reassess if the workflow should be refined as needed after starting the development work.

@dzole0311 dzole0311 merged commit f146f45 into main Feb 4, 2025
10 checks passed
@dzole0311 dzole0311 deleted the feat-publish-veda-ui-to-npm branch February 4, 2025 09:52
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

Successfully merging this pull request may close these issues.

Evaluate migration from Verdaccio to public NPM registry for the veda UI
4 participants