@omniumretail/shared-resources

v0.5.83

Published

Shared Components and services or utils to the frontend versions

Readme

@omniumretail/shared-resources

Shared components, services and utilities for Omnium frontend projects.

This package is published privately to AWS CodeArtifact (Omnium-Retail-Npm repository).


Prerequisites

Before publishing, you need AWS CLI configured with the OmniumArtifact profile.

Setting up the AWS CLI profile

  1. Install AWS CLI if you don't have it: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
  2. Run:
    aws configure --profile OmniumArtifact
  3. Enter the credentials when prompted:
    • AWS Access Key ID: request from the infra team
    • AWS Secret Access Key: request from the infra team
    • Default region: eu-west-1
    • Default output format: json

Don't have credentials? Contact the infra team to get your OmniumArtifact AWS access key and secret.


Publishing a new version locally

First time only: If you haven't installed dependencies yet, run yarn install before anything else.

  1. Make your code changes

  2. Bump the version in package.json (must be higher than the current published version):

    "version": "1.2.4"
  3. Authenticate with CodeArtifact (once per session — token lasts 12 hours):

    yarn auth:artifact
  4. Build and publish:

    yarn publish:artifact

The package will be published to CodeArtifact with the latest tag automatically.


Publishing via Bitbucket Pipeline

Go to Bitbucket → Pipelines → Run pipeline and select the branch and pipeline:

"Publish npm to AWS CodeArtifact"

Publishes the version currently in package.json to CodeArtifact with the latest tag automatically.

No inputs required — just run it.

"Apply tag to version"

Applies a tag to an already-published version. Useful for promoting a version to prod or rolling back tags.

| Variable | Description | Example | |----------|-------------|---------| | VERSION | The version to tag | 1.2.3 | | TAG | Tag(s) to apply | prod or prod, latest |

You can apply tags to any version, including older ones — useful for rollbacks.


How version tags work

| Tag | Used by | Description | |-----|---------|-------------| | latest | Release pipelines | Applied automatically on every publish. Release deployments always pull this tag. | | prod | Platform/prod pipelines | Manually applied when a version is ready for production. |

Typical workflow:

  1. Publish a new version → automatically gets latest
  2. Test it in release environment
  3. When ready for prod → run "Apply tag to version" pipeline with TAG=prod

Consuming app pipelines

Consuming app pipelines use the @omniumretail scope configured to pull from CodeArtifact:

  • Release deploys always use @latest
  • Platform/prod deploys always use @prod

No changes needed in consuming app repos when a new package version is published — the tags control which version gets deployed automatically.