JSPM

  • Created
  • Published
  • Downloads 445
  • Score
    100M100P100Q103071F
  • License ISC

Package Exports

  • @procore/globalization-toolkit
  • @procore/globalization-toolkit/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@procore/globalization-toolkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

globalization-toolkit

i18n formatting library

Maintainer CircleCI NPM

Install

$ npm i --save @procore/globalization-toolkit

Developing

Install dependencies:

$ npm install

Prepare project:

$ npm run prepare

Compile Typescript:

$ npm run build

(Delete build npm run clean)

Testing

$ npm run test

If adding a new supported export (or removing one in a breaking change), update the snapshot test output and commit the change.

$ npm run test -u

To check formatting run npm run lint:check and npm run format:check.

Committing Changes

Our repo follows the Conventional Commits and Semantic Versioning specifications. The Conventional Commit format is used to map commits to the next Semantic Version published to NPM, and helps to maintain a more easily readable commit history.

Generally, commits should be in the format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

We use the command line tool commitizen to help walk you through generating a Conventional Commit.

To invoke this tool run:

$ npm run cm

(Optional: run commitizen on git commit)

Certain commits are analyzed and mapped to versioning as follows:

  • MAJOR release if BREAKING CHANGE exists in the commit footer.

  • MINOR release for commit type feat.

  • PATCH release for commit types fix or perf.

  • No release is triggered for all other commit types. And commits that do not match any format rules or have no-release as the scope will not trigger a release.

Additionally, releaseRules are specified in package.json for specific commits:

  • build(deps-dev): does not trigger a release (development dependency changes, typically version bumps by dependabot).
  • build(deps): triggers a PATCH release.

Details about how commit types are mapped to versioning can be found in the commit-analyzer documentation.

Publishing

Merges to main will trigger the publish workflow in CircleCi. We use semantic-release to manage releases and publishing to NPM. Semantic Release relies on the project's commit history to create release notes and determine the next version.

Release Notes:

The <description> for commits selected for publishing are added to the release notes and can be found in the Releases section of Github.