hashicorp / structure

Structure (aka "PDS") [deprecated]
https://hashicorp-structure.vercel.app
Mozilla Public License 2.0
24 stars 5 forks source link

Structure npm version

🚨 NOTICE 🚨

Currently this project in a "maintained sunsetting" mode. This means we're starting to remove deprecated/unused components from its codebase with the intent to completely remove as dependency from our products.

But don't worry, if you need to use the old project, there are a couple of "frozen in time" branches that you can use (and potentially even release from, if you need). See "Which version to use?" below.

Which version to use?

The current version of this package is the one used for the "managed sunsetting" of the library from our products. As such, in time some components are deprecated and then removed from the repository, and some surgical patches to the code are done when necessary to facilitate the migration to the new UI library (HashiCorp Design System components).

If for any reasons you need to stay on an older version, you can:


Old introduction to the project, left for reference:

Pds stands for Product Design System. The original intent was to rename structure to Pds because the developer at the time thought it was more clear. Unfortunately, that renaming never happened so there are two names. This is a mono repo with the idea that the Ember, React, etc projects scattered around Hashi could all eventually rely on a single source for design components. Currently there is only pds-ember.

Getting started

To contribute to the pds-ember package (currently the only package in this mono repo) please see the Contributing guide for details.

Creating + Consuming a release

Update version

  1. yarn workspace @hashicorp/pds-ember version patch to bump the version by a "patch" increment (see Semantic Versioning)
  2. Git add the yml file and the version update generated by the command.
  3. Create a new PR for this and get it approved and merged into main.
  4. Checkout main branch, pull down the new changes.

Update Git version

  1. Use git tag [PACKAGE-NAME]-[VERSION] e.g. git tag pds-ember-2.0.2
  2. git push --tags

Create new release in GitHub

  1. Go to https://github.com/hashicorp/structure/tags
  2. Select the tag just pushed in Git and from the submenu select "Create release"
  3. Use pds-ember-[VERSION] as release title
  4. Click the "Generate release notes" button (the description will be automatically filled by GitHub)

Update NPM

  1. Make sure your NPM account has been added to the Hashi group (check with IT)
  2. yarn workspace @hashicorp/pds-ember npm publish

Troubleshooting: If you get authentication errors from npm publish, you might have to do a login via workspace, before calling npm publish:

  1. yarn workspace @hashicorp/pds-ember npm login In this case you will need to do a two-factors authentication (2FA) on NPM before the login (via npmjs website)

Consuming the updated version

  1. In the repo consuming update package.json to use the new version of the structure package. If it's in another mono repo with multiple packages, replace the version in each package to the new version (find/replace).
  2. Run β€˜yarn’ on base level of the repo to update all of them.
  3. Add package changes and yarn lock file.
  4. Open a pr!

🚨 Which version to use? 🚨

The current version of this package is the one used for the "managed sunsetting" of the library from our products. As such, in time some components are deprecated and then removed from the repository, and some surgical patches to the code are done when necessary to facilitate the migration to the new UI library (HashiCorp Design System components).

If for any reasons you need to stay on an older version, you can:

Deprecating and removing a component

To remove a component (eg. Pds::Xyz) from the Structure repository the steps to follow are more or less these.