Skip to content

Commit 36c2431

Browse files
authored
Update npm v7 and devDependencies
It has been some time since we have updated the devDependencies of the UIKit npm 6 -> 7 upgrade looks like a good time to do it Updates: * npm v7 peer dependency fix * Updates -> * storybook 6 * jest 27 * typescript 4 * React 17 * rollup 2
2 parents f80812c + 31252b3 commit 36c2431

File tree

78 files changed

+54910
-16593
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+54910
-16593
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = {
3737
"tsx": "never",
3838
},
3939
],
40+
"react/forbid-prop-types": 0,
4041
},
4142
settings: {
4243
"import/resolver": {

.github/workflows/test-n-lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [v12.16]
15+
node-version: [14]
1616

1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v2.2.0
2121
with:
2222
node-version: ${{ matrix.node-version }}
23+
24+
- name: Upgrade npm
25+
run: npm install -g npm@7
26+
2327
- run: npm install
2428
- run: npm run eslint
2529
- run: npm run eslint-ts

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_modules
88
build
99
dist
1010
.rpt2_cache
11+
release
1112

1213
# misc
1314
.DS_Store

.storybook/main.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
module.exports = {
22
stories: [
3-
'../src/**/*.stories.(js|mdx)',
4-
'../docs/**/*.(js|mdx)',
3+
'../src/**/*.stories.@(js|mdx)',
4+
'../docs/**/*.@(js|mdx)',
55
],
66
addons: [
77
'@storybook/addon-docs',
88
'@storybook/addon-actions',
99
'@storybook/addon-links',
10-
'@storybook/preset-scss'
10+
'@storybook/preset-scss',
1111
],
12+
webpackFinal: async (config, { configType }) => {
13+
const fileLoaderRule = config.module.rules.find(
14+
(rule) => !Array.isArray(rule.test) && rule.test.test(".svg"),
15+
);
16+
// !important! -> read
17+
// https://github.com/storybookjs/storybook/issues/6188#issuecomment-654884130
18+
fileLoaderRule.exclude = /\.svg$/;
19+
config.module.rules.push({
20+
test: /\.svg$/,
21+
use: ["@svgr/webpack"],
22+
});
23+
return config;
24+
},
1225
};

.storybook/webpack.config.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# sendbird-uikit-react
1+
# sendbird-uikit
22

33
> React based UI kit based on sendbird javascript SDK
44
@@ -27,17 +27,24 @@ With Sendbird UI Kit React, we export these components:
2727
### Prerequisites
2828

2929
You need to install:
30-
* nodejs 12.xx LTS https://nodejs.org/en/download/
31-
* npm 6.8 or above
30+
* nodejs 14 LTS https://nodejs.org/en/download/
31+
* npm 7 or above
32+
33+
```
34+
npm 14 deprecated warnings for fsevents& chokidar@2.1.8 will be fixed when storybook is updated to webpack 5
35+
https://github.com/storybookjs/storybook/issues/12425#issuecomment-723043137
36+
```
3237

3338
We tried development on Mac OS / Linux systems. You might encounter problems in running `npm run build` in Windows machines
3439

35-
### Development
36-
We use storybook for development and rollup for building bundled JS file
37-
Make sure you have nodejs and npm installed and follow these steps:
40+
### Development
41+
42+
We use storybook for development and rollup for building the npm distribution(bundled JS file)
43+
Make sure you have nodejs and npm installed and run
44+
3845
```
3946
Make a copy of env.example and save it as .env
40-
Inside the .env file, set your appId `STORYBOOK_APP_ID=appId (no quotes)`
47+
Set your appId STORYBOOK_APP_ID
4148
npm install
4249
npm run storybook
4350
```
@@ -54,6 +61,11 @@ We use rollupJS for building the production bundle script that you want to use i
5461

5562
We have both esm and commonjs output
5663

64+
```
65+
rollup -c
66+
```
67+
or
68+
5769
```
5870
npm run build
5971
```
@@ -90,4 +102,3 @@ npm run lint
90102
`export NewComponent from './src/location/of/NewComponent';`
91103
3. Add the following line to './rollup.config.js' `input`
92104
`NewComponent: 'src/location/of/NewComponent',`
93-

docs/Basics.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, Story } from '@storybook/addon-docs/blocks';
1+
import { Meta, Story } from '@storybook/addon-docs';
22

33
<Meta title="Docs | Basics" />
44

docs/CustomUserList.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta } from '@storybook/addon-docs/blocks';
1+
import { Meta } from '@storybook/addon-docs';
22

33
<Meta title="Docs|Custom User List" />
44

docs/Introduction.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta } from '@storybook/addon-docs/blocks';
1+
import { Meta } from '@storybook/addon-docs';
22

33
<Meta title="Docs|Introduction" />
44

docs/Requirements.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta } from '@storybook/addon-docs/blocks';
1+
import { Meta } from '@storybook/addon-docs';
22

33
<Meta title="Docs|Requirements" />
44

0 commit comments

Comments
 (0)