Skip to content

Commit b819080

Browse files
authored
ci: add dist sync validation workflow (#6137)
1 parent 0783181 commit b819080

3 files changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/ci-dist-sync.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI Dist Sync
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
dist-sync:
11+
name: Verify dist files are in sync
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '22'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Build dist files
28+
run: npm run build
29+
30+
- name: Check dist files are in sync
31+
run: |
32+
if git diff --exit-code dist/; then
33+
echo "dist/ files are in sync with source"
34+
else
35+
echo "::error::dist/ files are out of sync. Run 'npm run build' and commit the updated dist/ files."
36+
exit 1
37+
fi

dist/lodash.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6965,7 +6965,7 @@
69656965

69666966
/**
69676967
* Creates an array with all falsey values removed. The values `false`, `null`,
6968-
* `0`, `""`, `undefined`, and `NaN` are falsey.
6968+
* `0`, `-0`, `0n`, `""`, `undefined`, and `NaN` are falsy.
69696969
*
69706970
* @static
69716971
* @memberOf _
@@ -14164,6 +14164,8 @@
1416414164
* **Note:** JavaScript follows the IEEE-754 standard for resolving
1416514165
* floating-point values which can produce unexpected results.
1416614166
*
14167+
* **Note:** If `lower` is greater than `upper`, the values are swapped.
14168+
*
1416714169
* @static
1416814170
* @memberOf _
1416914171
* @since 0.7.0
@@ -14177,9 +14179,16 @@
1417714179
* _.random(0, 5);
1417814180
* // => an integer between 0 and 5
1417914181
*
14182+
* // when lower is greater than upper the values are swapped
14183+
* _.random(5, 0);
14184+
* // => an integer between 0 and 5
14185+
*
1418014186
* _.random(5);
1418114187
* // => also an integer between 0 and 5
1418214188
*
14189+
* _.random(-5);
14190+
* // => an integer between -5 and 0
14191+
*
1418314192
* _.random(5, true);
1418414193
* // => a floating-point number between 0 and 5
1418514194
*

dist/lodash.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)