Skip to content

Commit b2c1640

Browse files
Merge tag 'v17.0.1' into codex/sync-upstream-v17.0.1
chore: release v17.0.1 # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGRBK5ejHsQZvDal24x+kJPijl5MFAmnYqlwACgkQ4x+kJPij # l5Of3g//YnEJofpi1kolvAj86G/mvOXWmUhT9wzx99w+bnsZULA3uN6IkCJu/RN+ # 4/F1+zG13X7iTKymu6+n7krvTHV0sS8n81rMxr7jQE/SOn0QJD67X37XhKOCFVV3 # e04rRkBfnA5BS1pC7tz5WWgyrEs4GH7OdDF0Za7M5k5GnZZny+opUxCW+yzZE14H # 5eY+RacoBeqQHt+LydDnG0QGOiOfOTTp4IOtpgpseH+QhlgFkv2w87wToN520W48 # hPoVQ3HIKLovP1vTE6eGvmeykstkoRlDJbcsb7JPiIO/Rh5rvhSCCtKPQNOdnM8m # QNyKT3ww10WtLKXthireOcwFVNWdjZcwmk9FIBOIXXoKU0DlyEKGPDy4r0fqHogd # DzEpMe+Ntoc/c0NQkEzJbc4SKHC9rxNEILwpGm2Ijz+EBKL4wAMEA7AmcrmT3+GG # 3OINnu7WydJehMzejGSi7PJU6X+p6p05UeteKMWw3heQc8gcDVeXwBTU6dFp4epI # yhjP1bzm0VlJTGWPh+4wTYlDM+o+Qd/Rb2n4MO1/ld1P7ebh2BgfYklXIsCq5a/t # jORPg9itka++Z65n1oHbdYyw6z8szcyqNSaxUrwQclUtyuYX7rbDkZxI+MJXi2sG # suA/gKdjYGnr2xlWImOVsPmgclD/lPesehulZ55vGyN2QX2Oigc= # =sl8I # -----END PGP SIGNATURE----- # gpg: Signature made 04/10/26 03:44:28 Eastern Daylight Time # gpg: using RSA key 19104AE5E8C7B1066F0DA976E31FA424F8A39793 # gpg: Can't check signature: No public key # Conflicts: # .github/workflows/release.yml # package.json # pnpm-lock.yaml # pnpm-workspace.yaml # src/cli.ts # src/configs/env.ts # src/processing/svg.ts
2 parents d536f11 + 38cb66b commit b2c1640

10 files changed

Lines changed: 40 additions & 37 deletions

File tree

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default defineConfig({
243243

244244
<p align="center">
245245
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
246-
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
246+
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg' alt="Sponsors"/>
247247
</a>
248248
</p>
249249

@@ -258,7 +258,7 @@ export default defineConfig({
258258

259259
<p align="center">
260260
<a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.circles.svg">
261-
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.circles.svg'/>
261+
<img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.circles.svg' alt="Sponsors"/>
262262
</a>
263263
</p>
264264

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"scripts": {
3737
"build": "unbuild",
3838
"stub": "unbuild --stub",
39-
"dev": "esno src/cli.ts",
39+
"dev": "tsx src/cli.ts",
4040
"test": "npm-run-all test:unit test:report test:lint test:typecheck",
4141
"test:unit": "jest --coverage",
4242
"test:report": "jest --reporters=jest-junit",
@@ -49,37 +49,37 @@
4949
"@crowdin/crowdin-api-client": "^1.41.2",
5050
"ansis": "^4.2.0",
5151
"cac": "^6.7.14",
52-
"consola": "^3.4.0",
53-
"dotenv": "^17.3.1",
54-
"ofetch": "^1.4.1",
52+
"consola": "^3.4.2",
53+
"dotenv": "^17.4.1",
54+
"ofetch": "^1.5.1",
5555
"sharp": "^0.34.5",
56-
"unconfig": "^7.3.0"
56+
"unconfig": "^7.5.0"
5757
},
5858
"devDependencies": {
5959
"@antfu/ni": "^30.0.0",
60-
"@antfu/utils": "^9.1.0",
60+
"@antfu/utils": "^9.3.0",
6161
"@babel/core": "7.29.7",
6262
"@babel/preset-env": "7.29.7",
6363
"@codecov/webpack-plugin": "2.0.1",
6464
"@eslint/js": "^10.0.1",
65-
"@fast-csv/parse": "^5.0.2",
65+
"@fast-csv/parse": "^5.0.5",
6666
"@types/d3-hierarchy": "^3.1.7",
67-
"@types/node": "^25.2.3",
67+
"@types/node": "^25.6.0",
6868
"bumpp": "^11.0.1",
6969
"d3-hierarchy": "^3.1.2",
70-
"eslint": "^10.0.0",
70+
"eslint": "^10.2.0",
7171
"eslint-plugin-jest": "29.15.2",
7272
"globals": "17.6.0",
7373
"jest": "30.4.2",
7474
"jest-environment-jsdom": "30.4.1",
7575
"jest-junit": "17.0.0",
76-
"jiti": "^2.4.2",
76+
"jiti": "^2.6.1",
7777
"normalize-url": "^9.0.0",
7878
"npm-run-all2": "9.0.1",
7979
"p-limit": "^7.3.0",
80-
"tsx": "^4.19.3",
81-
"typescript": "^5.8.2",
82-
"unbuild": "^3.5.0"
80+
"tsx": "^4.21.0",
81+
"typescript": "^5.9.2",
82+
"unbuild": "^3.6.1"
8383
},
8484
"jest": {
8585
"collectCoverageFrom": [

src/cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ cli
2929

3030
cli.parse()
3131

32+
const RE_FILTER = /([<>=]+)(\d+)/
33+
3234
/**
3335
* Create filter function from templates like
3436
* - `<10`
3537
* - `>=10`
3638
* @param template
3739
*/
3840
function createFilterFromString(template: string): ContribkitConfig['filter'] {
39-
const [_, op, value] = template.split(/([<>=]+)/)
41+
const [_, op, value] = template.split(RE_FILTER)
4042
const num = Number.parseInt(value)
4143
if (op === '<')
4244
return s => s.monthlyDollars < num

src/configs/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function getDeprecatedEnv(name: string, replacement: string) {
1010
}
1111

1212
export function loadEnv(): Partial<ContribkitConfig> {
13-
dotenv.config()
13+
dotenv.config({ quiet: true })
1414

1515
const config: Partial<ContribkitConfig> = {
1616
github: {

src/processing/svg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class SvgComposer {
113113

114114
generateSvg() {
115115
return `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 ${this.config.width} ${this.height}" width="${this.config.width}" height="${this.height}">
116-
<!-- Generated by https://github.com/antfu/sponsorskit -->
116+
<!-- Generated by https://github.com/LizardByte/contribkit -->
117117
<style>${this.config.svgInlineCSS}</style>
118118
${this.body}
119119
</svg>

src/providers/afdian.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function fetchAfdianSponsors(options: ContribkitConfig['afdian'] =
2929
let pages = 1
3030
do {
3131
const params = JSON.stringify({ page })
32-
const ts = Math.round(+new Date() / 1000)
32+
const ts = Math.round(Date.now() / 1000)
3333
const sign = md5(token, params, ts, userId)
3434
const sponsorshipData = await $fetch(sponsorshipApi, {
3535
method: 'POST',

src/providers/opencollective.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function createSponsorFromOrder(order: any): [string, Sponsorship] | undefined {
165165
monthlyDollars,
166166
privacyLevel: order.fromAccount.isIncognito ? 'PRIVATE' : 'PUBLIC',
167167
tierName: order.tier?.name,
168-
createdAt: order.frequency === 'ONETIME' ? order.createdAt : order.order?.createdAt,
168+
createdAt: order.createdAt,
169169
raw: order,
170170
}
171171

@@ -268,6 +268,7 @@ function makeTransactionsQuery(
268268
tier {
269269
name
270270
}
271+
createdAt
271272
amount {
272273
value
273274
}
@@ -320,7 +321,6 @@ function makeSubscriptionsQuery(
320321
totalDonations {
321322
value
322323
}
323-
createdAt
324324
fromAccount {
325325
name
326326
id
@@ -382,11 +382,13 @@ function getBestUrl(socialLinks: SocialLink[]): string | undefined {
382382
return urls[0]
383383
}
384384

385+
const RE_GITHUB_URL = /github\.com\/([^/]*)/
386+
385387
function getSocialLogins(socialLinks: SocialLink[] = [], opencollectiveLogin: string): Record<string, string> {
386388
const socialLogins: Record<string, string> = {}
387389
for (const link of socialLinks) {
388390
if (link.type === 'GITHUB') {
389-
const login = link.url.match(/github\.com\/([^/]*)/)?.[1]
391+
const login = link.url.match(RE_GITHUB_URL)?.[1]
390392
if (login)
391393
socialLogins.github = login
392394
}

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"compilerOptions": {
3-
"target": "es2017",
3+
"target": "esnext",
44
"lib": ["esnext"],
55
"module": "esnext",
6-
"moduleResolution": "node",
6+
"moduleResolution": "bundler",
77
"paths": {
88
"contribkit": [
99
"./src/index.ts"

0 commit comments

Comments
 (0)