Skip to content

Commit da45073

Browse files
authored
Update contributors (openapi-ts#1663)
1 parent 6ea1b32 commit da45073

File tree

6 files changed

+68
-62
lines changed

6 files changed

+68
-62
lines changed

.changeset/gorgeous-people-smile.md

-5
This file was deleted.

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ jobs:
1717
- uses: actions/checkout@v4
1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
21-
- uses: pnpm/action-setup@v2
20+
node-version: 22
21+
- uses: pnpm/action-setup@v4
2222
with:
2323
version: latest
24-
- run: pnpm i
24+
run_install: true
2525
- run: pnpm run lint
2626
test-node-versions:
2727
runs-on: ubuntu-latest
2828
strategy:
2929
matrix:
30-
node-version: [18, 20, 21]
30+
node-version: [18, 20, 22]
3131
steps:
3232
- uses: actions/checkout@v4
3333
- uses: actions/setup-node@v4
3434
with:
3535
node-version: ${{ matrix.node-version }}
36-
- uses: pnpm/action-setup@v2
36+
- uses: pnpm/action-setup@v4
3737
with:
3838
version: latest
39-
- run: pnpm i
39+
run_install: true
4040
- run: pnpm run build
4141
- run: pnpm test
4242
test-macos:
@@ -45,11 +45,11 @@ jobs:
4545
- uses: actions/checkout@v4
4646
- uses: actions/setup-node@v4
4747
with:
48-
node-version: 20
49-
- uses: pnpm/action-setup@v2
48+
node-version: 22
49+
- uses: pnpm/action-setup@v4
5050
with:
5151
version: latest
52-
- run: pnpm i
52+
run_install: true
5353
- run: pnpm run build
5454
- run: pnpm test
5555
test-windows:
@@ -58,10 +58,10 @@ jobs:
5858
- uses: actions/checkout@v4
5959
- uses: actions/setup-node@v4
6060
with:
61-
node-version: 20
62-
- uses: pnpm/action-setup@v2
61+
node-version: 22
62+
- uses: pnpm/action-setup@v4
6363
with:
6464
version: latest
65-
- run: pnpm i
65+
run_install: true
6666
- run: pnpm run build
6767
- run: pnpm test

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-node@v4
1414
with:
15-
node-version: 20
16-
- uses: pnpm/action-setup@v2
15+
node-version: 22
16+
- uses: pnpm/action-setup@v4
1717
with:
1818
version: latest
19-
- run: pnpm i
19+
run_install: true
2020
- run: pnpm run build
2121
- uses: changesets/action@v1
2222
with:

docs/data/contributors.json

+1-1
Large diffs are not rendered by default.

docs/scripts/update-contributors.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const CONTRIBUTORS_JSON = new URL("../data/contributors.json", import.meta.url);
77

88
const contributors = JSON.parse(fs.readFileSync(CONTRIBUTORS_JSON, "utf8"));
99

10-
const ONE_WEEK = 1000 * 60 * 60 * 24 * 7;
10+
const ONE_MONTH = 1000 * 60 * 60 * 24 * 7 * 30;
1111

1212
async function fetchUserInfo(username) {
1313
const res = await fetch(`https://github.com/${username}`, {
@@ -147,6 +147,9 @@ const OPENAPI_TS_CONTRIBUTORS = [
147147
"JeanRemiDelteil",
148148
"TzviPM",
149149
"LucaSchwan",
150+
"nzapponi",
151+
"luchsamapparat",
152+
"nmacmunn",
150153
]),
151154
];
152155

@@ -186,7 +189,7 @@ async function main() {
186189
for (const username of userlist) {
187190
// skip profiles that have been updated within the past week
188191
const { lastFetch } = contributors[repo].find((u) => u.username === username) ?? { lastFetch: 0 };
189-
if (Date.now() - lastFetch < ONE_WEEK) {
192+
if (Date.now() - lastFetch < ONE_MONTH) {
190193
continue;
191194
}
192195

@@ -200,7 +203,8 @@ async function main() {
200203
lastFetch: new Date().getTime(),
201204
};
202205
upsert(contributors[repo], userData);
203-
console.log(`Updated old contributor data for ${username}`); // biome-disable-line no-console
206+
// biome-ignore lint/suspicious/noConsoleLog: this is a script
207+
console.log(`Updated old contributor data for ${username}`);
204208
fs.writeFileSync(new URL("../data/contributors.json", import.meta.url), JSON.stringify(contributors)); // update file while fetching (sync happens safely in between fetches)
205209
await new Promise((resolve) => setTimeout(resolve, 750)); // sleep to prevent 429
206210
} catch (err) {

pnpm-lock.yaml

+45-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)