Skip to content

Commit 9a82fde

Browse files
authored
fix: size diff job (#413)
## 📜 Description Fixed "0 bytes" diff from size-diff job report. ## 💡 Motivation and Context It was incorrect metric. Such metric is totally useless. The original problem was the fact that in new node `18.20.1` prints output gathered from `react-native-builder-bob`: ```bash > react-native-keyboard-controller@1.11.6 prepare > bob build ℹ Building target commonjs ℹ Cleaning up previous build at lib/commonjs ℹ Compiling 32 files in src with babel ✔ Wrote files to lib/commonjs ℹ Building target module ℹ Cleaning up previous build at lib/module ℹ Compiling 32 files in src with babel ✔ Wrote files to lib/module ℹ Building target typescript ℹ Cleaning up previous build at lib/typescript ℹ Generating type definitions with tsc ``` And such output can not be parsed. The interesting thing is that `18.19.0` version produced expected result. So in this PR I locked node version for this particular job. ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### CI - lock node to `18.19.0` for `size-diff` job; ## 🤔 How Has This Been Tested? Tested on CI. ## 📸 Screenshots (if appropriate): <img width="913" alt="image" src="https://github.com/kirillzyusko/react-native-keyboard-controller/assets/22820318/e2dc190d-9d27-4e8e-b3df-cb60a954a9b4"> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 7678eec commit 9a82fde

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/size-diff.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
ref: ${{ github.event.pull_request.base.ref }}
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 18.19.0
24+
cache: yarn
2125
- name: Install dependencies
2226
run: yarn install --frozen-lockfile
2327
- name: Calculate size of package (target)
@@ -26,6 +30,8 @@ jobs:
2630
- uses: actions/checkout@v4
2731
- name: Install dependencies
2832
run: yarn install --frozen-lockfile
33+
- name: Pack
34+
run: npm pack --json
2935
- name: Calculate size of package (current)
3036
id: new-size
3137
run: echo "NEW_SIZE=$(node scripts/size.js)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)