From 7646afa98822c121d9b4438e9ef9251a16a52117 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 12:23:05 +0000 Subject: [PATCH] chore: Update version for release --- .changeset/witty-items-drive.md | 24 ------------------------ packages/format/CHANGELOG.md | 26 ++++++++++++++++++++++++++ packages/format/package.json | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) delete mode 100644 .changeset/witty-items-drive.md diff --git a/.changeset/witty-items-drive.md b/.changeset/witty-items-drive.md deleted file mode 100644 index f42fb0f..0000000 --- a/.changeset/witty-items-drive.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@obosbbl/format": minor ---- - -add default entrypoint for formatting functions. - -This makes it easier to support both Norwegian and Swedish formatting in the same project, -but it requires you to specify the wanted locale as an options argument to the method. - -Example: -```js -// Combined πŸ‡³πŸ‡΄πŸ‡ΈπŸ‡ͺ example -import { formatOrganizationNumber } from '@obosbbl/format'; -formatOrganizationNumber('000000000', { locale: 'no' }) // => '000 000 000' -formatOrganizationNumber('0000000000', { locale: 'se' }) // => '000000-0000' - -// πŸ‡³πŸ‡΄ only example -import { formatOrganizationNumber } from '@obosbbl/format/no'; -formatOrganizationNumber('000000000') // => '000 000 000' - -// πŸ‡ΈπŸ‡ͺ only example -import { formatOrganizationNumber } from '@obosbbl/format/se'; -formatOrganizationNumber('0000000000') // => '000000-0000' -``` diff --git a/packages/format/CHANGELOG.md b/packages/format/CHANGELOG.md index 5ea4a15..3eeb981 100644 --- a/packages/format/CHANGELOG.md +++ b/packages/format/CHANGELOG.md @@ -1,5 +1,31 @@ # @obosbbl/format +## 0.3.0 + +### Minor Changes + +- a92336d: add default entrypoint for formatting functions. + + This makes it easier to support both Norwegian and Swedish formatting in the same project, + but it requires you to specify the wanted locale as an options argument to the method. + + Example: + + ```js + // Combined πŸ‡³πŸ‡΄πŸ‡ΈπŸ‡ͺ example + import { formatOrganizationNumber } from "@obosbbl/format"; + formatOrganizationNumber("000000000", { locale: "no" }); // => '000 000 000' + formatOrganizationNumber("0000000000", { locale: "se" }); // => '000000-0000' + + // πŸ‡³πŸ‡΄ only example + import { formatOrganizationNumber } from "@obosbbl/format/no"; + formatOrganizationNumber("000000000"); // => '000 000 000' + + // πŸ‡ΈπŸ‡ͺ only example + import { formatOrganizationNumber } from "@obosbbl/format/se"; + formatOrganizationNumber("0000000000"); // => '000000-0000' + ``` + ## 0.2.0 ### Minor Changes diff --git a/packages/format/package.json b/packages/format/package.json index d504431..7450485 100644 --- a/packages/format/package.json +++ b/packages/format/package.json @@ -1,6 +1,6 @@ { "name": "@obosbbl/format", - "version": "0.2.0", + "version": "0.3.0", "description": "A collection of formatting methods for OBOS", "repository": { "url": "https://github.com/code-obos/public-frontend-modules"