Skip to content

Commit 6a36a65

Browse files
authored
feat: replace main pkg manager npm -> yarn 3 (#473)
### Description Of Changes Resolves https://sendbird.atlassian.net/browse/UIKIT-3546 What did do in this PR - changed the main pkg manager from npm -> yarn berry(3.5.0) What's not included - enable yarn publish command - upgrade actions/checkout@v3 & actions/setup-node@v3
1 parent 676cc0e commit 6a36a65

File tree

10 files changed

+21804
-59027
lines changed

10 files changed

+21804
-59027
lines changed

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,15 @@ jobs:
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323

24-
- name: Upgrade npm
25-
run: npm install -g npm@7
26-
27-
- run: npm install
28-
- run: npm run eslint
29-
- run: npm run eslint-ts
30-
- run: npm run test
24+
- name: Install yarn
25+
run: |
26+
COREPACK_PATH=$HOME/.local/bin
27+
mkdir -p $COREPACK_PATH
28+
eval "$(echo PATH=$COREPACK_PATH:\$PATH | tee -a $BASH_ENV)"
29+
corepack enable --install-directory $COREPACK_PATH
30+
yarn install --immutable
31+
yarn --version
32+
33+
- run: yarn run eslint
34+
- run: yarn run eslint-ts
35+
- run: yarn run test

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
# See https://help.github.com/ignore-files/ for more about ignoring files.
33

44
# dependencies
5-
node_modules
5+
node_modules/
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/sdks
12+
!.yarn/versions
613

714
# builds
815
build

.yarn/plugins/@yarnpkg/plugin-version.cjs

Lines changed: 550 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.5.0.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
plugins:
2+
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
3+
spec: "@yarnpkg/plugin-version"
4+
5+
yarnPath: .yarn/releases/yarn-3.5.0.cjs

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ We are introducing a new version of the Sendbird Chat UIKit. Version 3 features
1010
## Installation
1111

1212
`npm i @sendbird/uikit-react`
13+
or if you're using yarn
14+
`yarn add @sendbird/uikit-react`
1315

1416
For typescript projects, add `node_modules/@sendbird/uikit-react/index.d.ts` to your `include` section in tsconfig file to get type definitions
1517

@@ -39,23 +41,29 @@ And many more...
3941

4042
You need to install:
4143
* nodejs 16 LTS https://nodejs.org/en/download/
42-
* npm 8 or above
44+
* npm 8 >= or yarn
4345

4446
**Caveats**
45-
- We tried development on Mac OS / Linux systems. You might encounter problems in running `npm run build` in Windows machines
47+
- We tried development on Mac OS / Linux systems. You might encounter problems in running `npm run build` or `yarn run build` in Windows machines
4648
- If you use node.js >= 17 and see `ERR_OSSL_EVP_UNSUPPORTED` error on any run cmd, try to set `export NODE_OPTIONS=--openssl-legacy-provider` in the terminal
4749

4850
### Development
4951
We use storybook for development and rollup for building the npm distribution(bundled JS file)
50-
Make sure you have nodejs and npm installed and run
52+
Make sure you have nodejs and npm (or yarn) installed and run
5153

52-
```
5354
Make a copy of .env.example and save it as .env
5455
Set your appId STORYBOOK_APP_ID
56+
57+
```
5558
npm install
5659
npm run storybook
5760
```
58-
> `npm run generate-component` generates a UI component skeleton in `src/ui`
61+
or
62+
```
63+
yarn install
64+
yarn storybook
65+
```
66+
> `yarn run generate-component` generates a UI component skeleton in `src/ui`
5967
6068
* By default, storybook opens in http://localhost:6006/
6169
* Smart Components such as ChannelList, Channel, ChannelSetting, App can be found under `OTHERS`
@@ -71,6 +79,10 @@ We have both esm and commonjs output
7179
```
7280
npm run build
7381
```
82+
or
83+
```
84+
yarn run build
85+
```
7486

7587
The bundled JS code can be found in `./release`
7688
The CSS is in `./release/dist/index.css`
@@ -82,12 +94,20 @@ We have implemented tests for dumb ui components only. Technologies used: Jest a
8294
```
8395
npm run test
8496
```
97+
or
98+
```
99+
yarn run test
100+
```
85101

86102
### Lint
87103

88104
```
89105
npm run lint
90106
```
107+
or
108+
```
109+
yarn run lint
110+
```
91111
* .eslintrc.json lints ts files and .eslintrc.js lints js files
92112

93113

0 commit comments

Comments
 (0)