Skip to content

Commit

Permalink
feat(configs): move @sumup/collector to peer dependencies (#651)
Browse files Browse the repository at this point in the history
Like the other @sumup packages, Collector should be a peer dependency to enable independent
upgrades.
  • Loading branch information
connor-baer authored Jul 22, 2020
1 parent a3f807e commit d0052e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ yarn add react react-dom @emotion/core @emotion/styled emotion-theming
npm install --save react-dom @emotion/core @emotion/styled emotion-theming
```
In Circuit UI v2 some functionality has been extracted into separate packages for easier maintenance. The themes have been moved to [@sumup/design-tokens](https://www.npmjs.com/package/@sumup/design-tokens), the icons are available from [@sumup/icons](https://www.npmjs.com/package/@sumup/icons), and the number & currency utils have been completely rewritten in [@sumup/intl](https://www.npmjs.com/package/@sumup/intl). These packages are marked as required peer dependencies. To install them, run the following command in your terminal:
In Circuit UI v2 some functionality has been extracted into separate packages for easier maintenance. The themes have been moved to [@sumup/design-tokens](https://www.npmjs.com/package/@sumup/design-tokens), the icons are available from [@sumup/icons](https://www.npmjs.com/package/@sumup/icons), and the number & currency utils have been completely rewritten in [@sumup/intl](https://www.npmjs.com/package/@sumup/intl). The new [@sumup/collector](https://www.npmjs.com/package/@sumup/collector) package is used for event tracking. These packages are marked as required peer dependencies. To install them, run the following command in your terminal:
```sh
# With yarn
yarn add @sumup/design-tokens @sumup/icons @sumup/intl
yarn add @sumup/collector @sumup/design-tokens @sumup/icons @sumup/intl
# With npm
npm install --save @sumup/design-tokens @sumup/icons @sumup/intl
npm install --save @sumup/collector @sumup/design-tokens @sumup/icons @sumup/intl
```
Refer to the individual packages for documentation on how to use them.
Expand Down
8 changes: 4 additions & 4 deletions docs/introduction/getting-started.story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ yarn add @sumup/circuit-ui
npm install @sumup/circuit-ui
```

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

```bash
# With yarn:
yarn add @sumup/design-tokens @sumup/icons react react-dom @emotion/core @emotion/styled emotion-theming
yarn add @sumup/collector @sumup/design-tokens @sumup/icons react react-dom @emotion/core @emotion/styled emotion-theming
# With npm:
npm install @sumup/design-tokens @sumup/icons react react-dom @emotion/core @emotion/styled emotion-theming
npm install --save @sumup/collector @sumup/design-tokens @sumup/icons react react-dom @emotion/core @emotion/styled emotion-theming
```

### Configuring the theme
Expand All @@ -66,7 +66,7 @@ import { Button } from '@sumup/circuit-ui';

const App = () => (
<ThemeProvider theme={light}>
<Button primary>Click me</Button>
<Button variant="primary">Click me</Button>
</ThemeProvider>
);

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
},
"homepage": "https://github.com/sumup-oss/circuit-ui#readme",
"dependencies": {
"@sumup/collector": "^1.0.0-alpha.1",
"cross-spawn": "^7.0.3",
"jscodeshift": "^0.9.0",
"lodash": "^4.17.11",
Expand Down Expand Up @@ -96,6 +95,7 @@
"@storybook/preset-typescript": "^3.0.0",
"@storybook/react": "^5.2.0",
"@storybook/source-loader": "^5.2.4",
"@sumup/collector": "^1.0.0-alpha.1",
"@sumup/design-tokens": "^1.0.0",
"@sumup/foundry": "^3.0.0",
"@sumup/icons": "^1.0.0",
Expand Down Expand Up @@ -162,6 +162,7 @@
"@emotion/is-prop-valid": "0.8.x",
"@emotion/styled": "10.x",
"@emotion/stylis": "0.8.x",
"@sumup/collector": "1.x",
"@sumup/design-tokens": "1.x",
"@sumup/icons": "1.x",
"@sumup/intl": "1.x",
Expand Down

0 comments on commit d0052e1

Please sign in to comment.