Skip to content

Commit 915c2d1

Browse files
committed
Rename package scope from @sumup to @sumup-oss
SumUp's private and public, open source packages all use the `@sumup` scope. This causes conflicts when installing public packages alongside private ones which require authentication and are hosted on a different registry. Users have had to use direct tarball URLs for public packages to work around these conflicts preventing automated updates using tools like Dependabot.
1 parent 6b8dc64 commit 915c2d1

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @sumup/intl
1+
# @sumup-oss/intl
22

33
## 1.6.0
44

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ Make sure that you use Node v20.14 _exactly_, otherwise, the unit tests will pro
3939

4040
## Release process
4141

42-
`@sumup/intl` follows semantic versioning. In short, this means we use patch versions for bugfixes, minor versions for new features, and major versions for breaking changes.
42+
`@sumup-oss/intl` follows semantic versioning. In short, this means we use patch versions for bugfixes, minor versions for new features, and major versions for breaking changes.
4343

4444
### Changesets
4545

46-
`@sumup/intl` uses [changesets](https://github.com/atlassian/changesets) to do versioning. A changeset is a piece of information about changes made in a branch or commit. It holds three bits of information:
46+
`@sumup-oss/intl` uses [changesets](https://github.com/atlassian/changesets) to do versioning. A changeset is a piece of information about changes made in a branch or commit. It holds three bits of information:
4747

4848
- What needs to be released
4949
- What version the packages should be released at (using a [semver bump type](https://semver.org/))
@@ -62,7 +62,7 @@ We have a couple of special branches that are used for stable releases and [pre-
6262
To install the most recent version from a release channel in your project, run:
6363

6464
```sh
65-
npm install --dev @sumup/intl@<release-channel>
65+
npm install --dev @sumup-oss/intl@<release-channel>
6666
```
6767

6868
#### Pre-releases

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,35 @@ Format 🔢 numbers, 💱 currency values, 📅 dates, and 🕘 times for any lo
2020

2121
## Introduction
2222

23-
`@sumup/intl` is a light abstraction layer on top of the [ECMAScript Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl). In addition to a simplified API, it offers the following benefits:
23+
`@sumup-oss/intl` is a light abstraction layer on top of the [ECMAScript Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl). In addition to a simplified API, it offers the following benefits:
2424

2525
### Performance
2626

27-
Creating instances of `Intl.*` formatters is an [expensive operation](https://blog.david-reess.de/posts/hBEx9w-on-number-formatting-and-performance). `@sumup/intl` solves this by [memoizing](https://github.com/formatjs/intl-format-cache) the `Intl` formatters with a cache key based on the arguments passed to the constructor.
27+
Creating instances of `Intl.*` formatters is an [expensive operation](https://blog.david-reess.de/posts/hBEx9w-on-number-formatting-and-performance). `@sumup-oss/intl` solves this by [memoizing](https://github.com/formatjs/intl-format-cache) the `Intl` formatters with a cache key based on the arguments passed to the constructor.
2828

2929
### Compatibility
3030

31-
`@sumup/intl` works in [modern browsers](https://caniuse.com/mdn-javascript_builtins_intl_numberformat_numberformat,mdn-javascript_builtins_intl_datetimeformat_datetimeformat) as well as server runtimes with support for the `Intl` APIs (such as Node 10+[^1]). When the `Intl` APIs aren't (fully) available, `@sumup/intl` tries to gracefully degrade. Please refer to the [API reference](#api-reference) to learn how certain functions behave when the runtime doesn't support the necessary APIs. If you need to support legacy browsers, consider including [polyfills](https://formatjs.io/docs/polyfills/).
31+
`@sumup-oss/intl` works in [modern browsers](https://caniuse.com/mdn-javascript_builtins_intl_numberformat_numberformat,mdn-javascript_builtins_intl_datetimeformat_datetimeformat) as well as server runtimes with support for the `Intl` APIs (such as Node 10+[^1]). When the `Intl` APIs aren't (fully) available, `@sumup-oss/intl` tries to gracefully degrade. Please refer to the [API reference](#api-reference) to learn how certain functions behave when the runtime doesn't support the necessary APIs. If you need to support legacy browsers, consider including [polyfills](https://formatjs.io/docs/polyfills/).
3232

3333
[^1]: [Node](https://nodejs.org/en/) supports the `Intl` APIs since v8, however, it includes only the English localizations up to v12. Node v13 and above support all locales. If you're unable to use Node v13+, you can either include [polyfills](https://formatjs.io/docs/polyfills/) or use a [custom Node build](https://nodejs.org/docs/latest-v8.x/api/intl.html#intl_options_for_building_node_js).
3434

3535
## Installation
3636

37-
[`@sumup/intl`](https://www.npmjs.com/package/@sumup/intl) can be installed as a dependency via the [npm](https://www.npmjs.com) or [Yarn](https://classic.yarnpkg.com) package managers. Depending on your preference, run one of the following:
37+
[`@sumup-oss/intl`](https://www.npmjs.com/package/@sumup-oss/intl) can be installed as a dependency via the [npm](https://www.npmjs.com) or [Yarn](https://classic.yarnpkg.com) package managers. Depending on your preference, run one of the following:
3838

3939
```sh
4040
# With npm
41-
npm install @sumup/intl
41+
npm install @sumup-oss/intl
4242

4343
# With Yarn v1
44-
yarn add @sumup/intl
44+
yarn add @sumup-oss/intl
4545
```
4646

47-
`@sumup/intl` requires Node v10+.
47+
`@sumup-oss/intl` requires Node v10+.
4848

4949
## Usage
5050

51-
The functions exported by `@sumup/intl` share a similar interface such as the common [`locales`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument), [`options`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#options_argument), and [`currency`](https://en.wikipedia.org/wiki/ISO_4217) arguments. These are passed on almost unchanged to the [`Intl.*`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#constructor_properties) constructors and thus support the same values. If the `locales` argument is not provided or is undefined, the runtime's default locale is used. Please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) for more details.
51+
The functions exported by `@sumup-oss/intl` share a similar interface such as the common [`locales`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument), [`options`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#options_argument), and [`currency`](https://en.wikipedia.org/wiki/ISO_4217) arguments. These are passed on almost unchanged to the [`Intl.*`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#constructor_properties) constructors and thus support the same values. If the `locales` argument is not provided or is undefined, the runtime's default locale is used. Please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) for more details.
5252

5353
Each type of data can be formatted with three increasingly advanced functions:
5454

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@sumup/intl",
2+
"name": "@sumup-oss/intl",
33
"version": "1.6.0",
44
"description": "Format numbers, currency values, dates, and times for any locale with the ECMAScript Internationalization API",
55
"repository": "[email protected]:sumup-oss/intl-js.git",

src/lib/date-time-format/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export { isDateTimeFormatSupported, isDateTimeFormatToPartsSupported };
3131
* and [time](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timestyle) styles.
3232
*
3333
* @example
34-
* import { formatDateTime } from '@sumup/intl';
34+
* import { formatDateTime } from '@sumup-oss/intl';
3535
*
3636
* formatDateTime(new Date(2000, 1, 1), 'de-DE'); // '1.2.2000'
3737
* formatDateTime(new Date(2000, 1, 1), ['ban', 'id']); // '1/2/2000'
@@ -59,7 +59,7 @@ export const formatDateTime = formatDateTimeFactory();
5959
* [date styles](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#datestyle).
6060
*
6161
* @example
62-
* import { formatDate } from '@sumup/intl';
62+
* import { formatDate } from '@sumup-oss/intl';
6363
*
6464
* const date = new Date(2000, 1, 1);
6565
* const locale = 'en-GB';
@@ -91,7 +91,7 @@ export function formatDate(
9191
* [time styles](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#datestyle).
9292
*
9393
* @example
94-
* import { formatTime } from '@sumup/intl';
94+
* import { formatTime } from '@sumup-oss/intl';
9595
*
9696
* const time = new Date(2000, 1, 1, 9, 55);
9797
* const locale = 'en-GB';
@@ -166,7 +166,7 @@ function formatDateTimeFactory(): (
166166
* and [time](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timestyle) styles.
167167
*
168168
* @example
169-
* import { formatDateTimeToParts } from '@sumup/intl';
169+
* import { formatDateTimeToParts } from '@sumup-oss/intl';
170170
*
171171
* const time = new Date(2000, 1, 1, 9, 55);
172172
*
@@ -232,7 +232,7 @@ function formatDateTimeToPartsFactory(): (
232232
* Resolves the locale and collation options that are used to format a `Date`.
233233
*
234234
* @example
235-
* import { resolveDateTimeFormat } from '@sumup/intl';
235+
* import { resolveDateTimeFormat } from '@sumup-oss/intl';
236236
*
237237
* resolveDateTimeFormat();
238238
* // {

src/lib/number-format/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type GetOptions = (
4848
* and [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
4949
*
5050
* @example
51-
* import { formatNumber } from '@sumup/intl';
51+
* import { formatNumber } from '@sumup-oss/intl';
5252
*
5353
* formatNumber(12345.67, 'de-DE'); // '12.345,67'
5454
* formatNumber(-0.89, ['ban', 'id']); // '-0,89'
@@ -81,7 +81,7 @@ export const format = formatNumber;
8181
* with support for various [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
8282
*
8383
* @example
84-
* import { formatCurrency } from '@sumup/intl';
84+
* import { formatCurrency } from '@sumup-oss/intl';
8585
*
8686
* formatCurrency(12345.67, 'de-DE'); // '12.345,67 €'
8787
* formatCurrency(89, 'ja-JP', 'JPY'); // '¥89'
@@ -123,7 +123,7 @@ function formatNumberFactory<T extends GetOptions>(
123123
* and [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
124124
*
125125
* @example
126-
* import { formatNumberToParts } from '@sumup/intl';
126+
* import { formatNumberToParts } from '@sumup-oss/intl';
127127
*
128128
* formatNumberToParts(12345.67, 'de-DE');
129129
* // [
@@ -179,7 +179,7 @@ export const formatToParts = formatNumberToParts;
179179
* with support for various [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
180180
*
181181
* @example
182-
* import { formatCurrencyToParts } from '@sumup/intl';
182+
* import { formatCurrencyToParts } from '@sumup-oss/intl';
183183
*
184184
* formatCurrencyToParts(12345.67, 'de-DE');
185185
* // [
@@ -247,7 +247,7 @@ function formatNumberToPartsFactory<T extends GetOptions>(
247247
* Resolves the locale and collation options that are used to format a number.
248248
*
249249
* @example
250-
* import { resolveNumberFormat } from '@sumup/intl';
250+
* import { resolveNumberFormat } from '@sumup-oss/intl';
251251
*
252252
* resolveNumberFormat();
253253
* // {
@@ -323,7 +323,7 @@ export const resolveFormat = resolveNumberFormat;
323323
* in the country's official currency.
324324
*
325325
* @example
326-
* import { resolveCurrencyFormat } from '@sumup/intl';
326+
* import { resolveCurrencyFormat } from '@sumup-oss/intl';
327327
*
328328
* resolveCurrencyFormat();
329329
* // {

0 commit comments

Comments
 (0)