You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ Make sure that you use Node v20.14 _exactly_, otherwise, the unit tests will pro
39
39
40
40
## Release process
41
41
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.
43
43
44
44
### Changesets
45
45
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:
47
47
48
48
- What needs to be released
49
49
- 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-
62
62
To install the most recent version from a release channel in your project, run:
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,35 +20,35 @@ Format 🔢 numbers, 💱 currency values, 📅 dates, and 🕘 times for any lo
20
20
21
21
## Introduction
22
22
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:
24
24
25
25
### Performance
26
26
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.
28
28
29
29
### Compatibility
30
30
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/).
32
32
33
33
[^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).
34
34
35
35
## Installation
36
36
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:
38
38
39
39
```sh
40
40
# With npm
41
-
npm install @sumup/intl
41
+
npm install @sumup-oss/intl
42
42
43
43
# With Yarn v1
44
-
yarn add @sumup/intl
44
+
yarn add @sumup-oss/intl
45
45
```
46
46
47
-
`@sumup/intl` requires Node v10+.
47
+
`@sumup-oss/intl` requires Node v10+.
48
48
49
49
## Usage
50
50
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.
52
52
53
53
Each type of data can be formatted with three increasingly advanced functions:
Copy file name to clipboardExpand all lines: src/lib/number-format/index.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ type GetOptions = (
48
48
* and [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
49
49
*
50
50
* @example
51
-
* import { formatNumber } from '@sumup/intl';
51
+
* import { formatNumber } from '@sumup-oss/intl';
52
52
*
53
53
* formatNumber(12345.67, 'de-DE'); // '12.345,67'
54
54
* formatNumber(-0.89, ['ban', 'id']); // '-0,89'
@@ -81,7 +81,7 @@ export const format = formatNumber;
81
81
* with support for various [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
82
82
*
83
83
* @example
84
-
* import { formatCurrency } from '@sumup/intl';
84
+
* import { formatCurrency } from '@sumup-oss/intl';
* with support for various [notations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat#Using_notation).
180
180
*
181
181
* @example
182
-
* import { formatCurrencyToParts } from '@sumup/intl';
182
+
* import { formatCurrencyToParts } from '@sumup-oss/intl';
183
183
*
184
184
* formatCurrencyToParts(12345.67, 'de-DE');
185
185
* // [
@@ -247,7 +247,7 @@ function formatNumberToPartsFactory<T extends GetOptions>(
247
247
* Resolves the locale and collation options that are used to format a number.
248
248
*
249
249
* @example
250
-
* import { resolveNumberFormat } from '@sumup/intl';
250
+
* import { resolveNumberFormat } from '@sumup-oss/intl';
0 commit comments