Skip to content

Commit

Permalink
Upgrade to @sumup-oss/intl v2
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Aug 14, 2024
1 parent 0f26879 commit 1cb52d9
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 44 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-dodos-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup-oss/circuit-ui": major
---

Upgraded to `@sumup-oss/intl` v2. If your app also depends on `@sumup-oss/intl` (previously called `@sumup/intl`), you need to upgrade it as well.
6 changes: 3 additions & 3 deletions docs/introduction/2-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ npm install @sumup-oss/circuit-ui
yarn add @sumup-oss/circuit-ui
```

Circuit UI relies on some mandatory peer dependencies, namely [@sumup-oss/design-tokens](https://www.npmjs.com/package/@sumup-oss/design-tokens), [@sumup-oss/icons](https://www.npmjs.com/package/@sumup-oss/icons), [@sumup/intl](https://www.npmjs.com/package/@sumup/intl), and [React](https://reactjs.org/). You should install them with the following command:
Circuit UI relies on some mandatory peer dependencies, namely [@sumup-oss/design-tokens](https://www.npmjs.com/package/@sumup-oss/design-tokens), [@sumup-oss/icons](https://www.npmjs.com/package/@sumup-oss/icons), [@sumup-oss/intl](https://www.npmjs.com/package/@sumup-oss/intl), and [React](https://reactjs.org/). You should install them with the following command:

```sh
# With npm:
npm install --save @sumup-oss/design-tokens @sumup-oss/icons @sumup/intl react react-dom
npm install --save @sumup-oss/design-tokens @sumup-oss/icons @sumup-oss/intl react react-dom
# With yarn v1
yarn add @sumup-oss/design-tokens @sumup-oss/icons @sumup/intl react react-dom
yarn add @sumup-oss/design-tokens @sumup-oss/icons @sumup-oss/intl react react-dom
```

We also recommend installing and configuring [`@sumup-oss/eslint-plugin-circuit-ui`](Packages/eslint-plugin-circuit-ui/Docs) and [`@sumup-oss/stylelint-plugin-circuit-ui`](Packages/stylelint-plugin-circuit-ui/Docs). The plugins will lint [Circuit UI custom properties](Features/Theme/Docs) and include codemods for Circuit UI breaking changes.
Expand Down
59 changes: 31 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/astro-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@sumup-oss/circuit-ui": "^8.0.0",
"@sumup-oss/design-tokens": "^7.0.0",
"@sumup-oss/icons": "^4.0.0",
"@sumup/intl": "^1.6.0",
"@sumup-oss/intl": "^2.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.13.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/circuit-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ yarn add @sumup-oss/circuit-ui

```sh
# With npm
npm install --save react react-dom @sumup-oss/design-tokens @sumup-oss/icons @sumup/intl
npm install --save react react-dom @sumup-oss/design-tokens @sumup-oss/icons @sumup-oss/intl
# With yarn v1
yarn add react react-dom @sumup-oss/design-tokens @sumup-oss/icons @sumup/intl
yarn add react react-dom @sumup-oss/design-tokens @sumup-oss/icons @sumup-oss/intl
```

## Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('CurrencyInput', () => {
});

describe('Labeling', () => {
const EUR_CURRENCY_SYMBOL = '€'; // formatted by `@sumup/intl`
const EUR_CURRENCY_SYMBOL = '€'; // formatted by `@sumup-oss/intl`
/**
* Note: further labeling logic is covered by the underlying `Input` component.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use client';

import { forwardRef, useId } from 'react';
import { resolveCurrencyFormat } from '@sumup/intl';
import { resolveCurrencyFormat } from '@sumup-oss/intl';
import { NumericFormat, type NumericFormatProps } from 'react-number-format';

import { clsx } from '../../styles/clsx.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { formatNumber } from '@sumup/intl';
import { formatNumber } from '@sumup-oss/intl';

export function formatPlaceholder(
placeholder?: string | number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
'use client';

import { forwardRef, useId } from 'react';
import { resolveNumberFormat } from '@sumup/intl';
import { resolveNumberFormat } from '@sumup-oss/intl';
import { NumericFormat, type NumericFormatProps } from 'react-number-format';

import { clsx } from '../../styles/clsx.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { formatNumber } from '@sumup/intl';
import { formatNumber } from '@sumup-oss/intl';

export function formatPlaceholder(
placeholder?: string | number,
Expand Down
4 changes: 2 additions & 2 deletions packages/circuit-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@emotion/styled": "^11.13.0",
"@sumup-oss/design-tokens": "^7.0.0",
"@sumup-oss/icons": "^4.0.0",
"@sumup/intl": "^1.5.0",
"@sumup-oss/intl": "^2.0.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "6.4.8",
"@testing-library/react": "^16.0.0",
Expand Down Expand Up @@ -93,7 +93,7 @@
"@emotion/styled": "^11.11.0",
"@sumup-oss/design-tokens": ">=6.0.0",
"@sumup-oss/icons": ">=3.0.0",
"@sumup/intl": "1.x",
"@sumup-oss/intl": "2.x",
"react": ">=18.0.0 <19.0.0",
"react-dom": ">=18.0.0 <19.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/cna-template/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@sumup-oss/circuit-ui": "^8.0.0",
"@sumup-oss/design-tokens": "^7.0.0",
"@sumup-oss/icons": "^4.0.0",
"@sumup/intl": "^1.5.0",
"@sumup-oss/intl": "^2.0.0",
"next": "^14.2.5",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ruleTester.run('renamed-package-scope', renamedPackageScope, {
{
name: 'import from an unaffected @sumup package',
code: `
import { RangePicker } from '@sumup/intl';
import { OIDCClient } from '@sumup/nanoauth';
`,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ const mappings = [
from: '@sumup/icons',
to: '@sumup-oss/icons',
},
{
from: '@sumup/intl',
to: '@sumup-oss/intl',
},
];

export const renamedPackageScope = createRule({
Expand Down
2 changes: 1 addition & 1 deletion packages/remix-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@sumup-oss/circuit-ui": "^8.0.0",
"@sumup-oss/design-tokens": "^7.0.0",
"@sumup-oss/icons": "^4.0.0",
"@sumup/intl": "^1.6.0",
"@sumup-oss/intl": "^2.0.0",
"isbot": "^5.1.13",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down

0 comments on commit 1cb52d9

Please sign in to comment.