Skip to content

Commit 58c411e

Browse files
authored
Merge pull request #553 from epaew/feature/dependencies
Use npm as package manager
2 parents b954e3e + 089852b commit 58c411e

File tree

7 files changed

+12710
-5028
lines changed

7 files changed

+12710
-5028
lines changed

.github/workflows/deploy-example.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- uses: actions/setup-node@v3
1717
with:
1818
node-version: 'lts/*'
19-
cache: yarn
19+
cache: npm
2020

21-
- run: yarn install --frozen-lockfile
22-
- run: yarn run build
21+
- run: npm ci
22+
- run: npm run build
2323
- name: Upload the result of build react-liff
2424
uses: actions/upload-artifact@v3
2525
with:
@@ -39,15 +39,15 @@ jobs:
3939
- uses: actions/setup-node@v3
4040
with:
4141
node-version: 'lts/*'
42-
cache: yarn
42+
cache: npm
4343
- name: Download the result of build react-liff
4444
uses: actions/download-artifact@v3
4545
with:
4646
name: dist
4747
path: dist
4848

49-
- run: yarn install
50-
- run: yarn run build
49+
- run: npm i
50+
- run: npm run build
5151
env:
5252
REACT_APP_LINE_LIFF_ID: ${{ secrets.LINE_LIFF_ID }}
5353
NODE_ENV: production

.github/workflows/tests.yaml

+18-19
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- uses: actions/setup-node@v3
1818
with:
1919
node-version: 'lts/*'
20-
cache: yarn
21-
- run: yarn install --frozen-lockfile
22-
- run: yarn run eslint
20+
cache: npm
21+
- run: npm ci
22+
- run: npm run eslint
2323

2424
prettier:
2525
name: Prettier
@@ -29,9 +29,9 @@ jobs:
2929
- uses: actions/setup-node@v3
3030
with:
3131
node-version: 'lts/*'
32-
cache: yarn
33-
- run: yarn install --frozen-lockfile
34-
- run: yarn run prettier
32+
cache: npm
33+
- run: npm ci
34+
- run: npm run prettier
3535

3636
test:
3737
name: Jest w/ react@${{ matrix.react.react-version }} @line/liff@${{ matrix.liff-sdk.sdk-version }}
@@ -56,29 +56,29 @@ jobs:
5656
- uses: actions/setup-node@v3
5757
with:
5858
node-version: 'lts/*'
59-
cache: yarn
60-
- run: yarn install --frozen-lockfile
59+
cache: npm
60+
- run: npm ci
6161
- name: Reinstall specific version of react.js
6262
run: |
63-
yarn add -D \
63+
npm i \
6464
react@${{ matrix.react.react-version }} \
6565
react-dom@${{ matrix.react.react-version }} \
6666
@types/react@${{ matrix.react.react-version }}
6767
- name: Reinstall specific version of @line/liff SDK
68-
run: yarn add -D @line/liff@${{ matrix.liff-sdk.sdk-version }}
68+
run: npm i @line/liff@${{ matrix.liff-sdk.sdk-version }}
6969

70-
- name: yarn run test && report coverage
70+
- name: npm run test && report coverage
7171
uses: paambaati/[email protected]
7272
env:
7373
CC_TEST_REPORTER_ID: de17efec54641dd4eb561f1b0bdede12f7e310f921137eb3465771b63cbbe2f0
7474
with:
75-
coverageCommand: yarn test:ci
75+
coverageCommand: npm run test:ci
7676
coverageLocations: |
7777
${{ github.workspace }}/coverage/lcov.info:lcov
7878
debug: true
7979

8080
- name: Reset local changes
81-
run: git checkout . && yarn
81+
run: git checkout . && npm ci
8282

8383
build:
8484
needs: test
@@ -89,10 +89,10 @@ jobs:
8989
- uses: actions/setup-node@v3
9090
with:
9191
node-version: 'lts/*'
92-
cache: yarn
93-
- run: yarn install --frozen-lockfile
92+
cache: npm
93+
- run: npm ci
9494

95-
- run: yarn run build
95+
- run: npm run build
9696
- name: Upload the result of build react-liff
9797
uses: actions/upload-artifact@v3
9898
with:
@@ -111,12 +111,11 @@ jobs:
111111
- uses: actions/setup-node@v3
112112
with:
113113
node-version: 'lts/*'
114-
cache: yarn
114+
cache: npm
115115
- name: Download the result of build react-liff
116116
uses: actions/download-artifact@v3
117117
with:
118118
name: dist
119119
path: dist
120120

121-
- run: yarn install
122-
- run: yarn run build
121+
- run: npm i && npm run build

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
coverage/
33
dist/
44
node_modules/
5-
yarn-error.log*

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
- [#492](https://github.com/epaew/react-liff/pull/492)
1212
- Tests with `@line/[email protected]`.
13+
- [#553](https://github.com/epaew/react-liff/pull/553)
14+
- Use npm as package manager.
1315

1416
# v2.0.0
1517

0 commit comments

Comments
 (0)