🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@squiz/dxp-ai-semantic-release-config

Package Overview
Dependencies
Maintainers
74
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/dxp-ai-semantic-release-config

Shared semantic-release configuration for DXP AI Tools

latest
npmnpm
Version
0.0.29
Version published
Maintainers
74
Created
Source

@squiz/dxp-ai-semantic-release-config

Shared semantic-release configuration for DXP AI Tools repository.

Features

  • Multi-environment support: Feature, Development, Staging, and Production releases
  • Git tag namespacing: Prevents conflicts between different environments using tag prefixes
  • Conventional commits: Automatic version bumping based on commit messages
  • NPM dist-tag support: Publish to different dist-tags (alpha, dev, stg, latest)

Installation

npm install --save-dev @squiz/dxp-ai-semantic-release-config

Usage

In your tool's package.json:

{
  "release": {
    "extends": "@squiz/dxp-ai-semantic-release-config"
  }
}

Or create a .releaserc.js:

module.exports = require('@squiz/dxp-ai-semantic-release-config');

Environment Variables

RELEASE_STAGE

Controls which release stage to execute and determines git tag prefix:

  • feature: Creates alpha prerelease versions with feature-v tag prefix
  • development: Creates dev prerelease versions with dev-v tag prefix
  • staging: Creates beta prerelease versions with stg-v tag prefix
  • production (or unset): Creates stable versions with v tag prefix

NPM_CONFIG_TAG

Controls the npm dist-tag for publishing:

  • alpha: Feature/alpha dist-tag
  • dev: Development dist-tag
  • stg: Staging dist-tag
  • latest: Production dist-tag (default)

Environment Configuration

EnvironmentBranchRELEASE_STAGENPM_CONFIG_TAGGit Tag FormatVersion ExampleUse Case
Featurefeature/*featurealphafeature-v${version}feature-v1.0.0-alpha.1Feature branch testing
Developmentdevelopdevelopmentdevdev-v${version}dev-v1.0.0-dev.5Development environment
Stagingmainstagingstgstg-v${version}stg-v1.0.0-beta.1Pre-production testing
Productionmainproductionlatestv${version}v1.0.0Production releases

Git Tag Prefixes

Different tag prefixes prevent conflicts between environments:

  • Feature: feature-v1.0.0-alpha.1
  • Development: dev-v1.0.0-dev.5
  • Staging: stg-v1.0.0-beta.1
  • Production: v1.0.0

This allows semantic-release to track releases independently across all environments.

CI/CD Examples

Staging Pipeline (Tools Repo)

staging:publish-tools:
  stage: staging-deploy
  variables:
    RELEASE_STAGE: staging
    NPM_CONFIG_TAG: stg
  script:
    - npm run publish-tools

Production Pipeline (Tools Repo)

production:publish-tools:
  stage: production-deploy
  variables:
    RELEASE_STAGE: production
    NPM_CONFIG_TAG: latest
  script:
    - npm run publish-tools

Commit Message Format

This config uses conventional commits for version bumping:

Commit TypeRelease TypeExample
feat:minorfeat: add new validation rule
fix:patchfix: correct schema validation
docs: (with README scope)patchdocs(README): update examples
refactor:patchrefactor: simplify error handling
style:patchstyle: format code
test:patchtest: add unit tests
BREAKING CHANGE:majorAny commit with BREAKING CHANGE: in body

Publishing Flow

Same Branch, Different Stages

Both staging and production can run on main branch without conflicts:

1. Push to main → Both pipelines trigger

2. Staging runs first:
   ├─ RELEASE_STAGE=staging
   ├─ Creates version: 1.0.0-beta.1
   ├─ Creates tag: stg-v1.0.0-beta.1
   ├─ Publishes: npm publish --tag stg
   └─ Success ✅

3. Production runs later:
   ├─ RELEASE_STAGE=production
   ├─ Ignores stg-v* tags
   ├─ Creates version: 1.0.0
   ├─ Creates tag: v1.0.0
   ├─ Publishes: npm publish --tag latest
   └─ Success ✅

No conflict! Different tag prefixes keep them separate.

Registry Configuration

This config works with any npm-compatible registry. Registry configuration should be set in .npmrc:

# GitLab Package Registry
@squiz-ai-tool:registry=https://gitlab.squiz.net/api/v4/projects/17893/packages/npm/
//gitlab.squiz.net/api/v4/projects/17893/packages/npm/:_authToken=${CI_JOB_TOKEN}

License

ISC

Keywords

semantic-release

FAQs

Package last updated on 20 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts