chore(deps-dev): bump got from 14.6.6 to 15.0.0 (#21591)

* chore(deps-dev): bump got from 14.6.6 to 15.0.0

Bumps [got](https://github.com/sindresorhus/got) from 14.6.6 to 15.0.0.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v14.6.6...v15.0.0)

---
updated-dependencies:
- dependency-name: got
  dependency-version: 15.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): remove form-data dependency

* chore: make fakeGot function async

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2026-04-10 00:57:30 +08:00 committed by GitHub
parent 7324dd31b6
commit ecd202c980
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 51 additions and 18 deletions

View File

@ -1,5 +1,4 @@
import { load } from 'cheerio';
import FormData from 'form-data';
import { CookieJar } from 'tough-cookie';
import type { Route } from '@/types';
@ -58,7 +57,7 @@ async function handler(ctx) {
form.append('__EVENTTARGET', 'ctl00$MainPlaceHolder$ddlContentType');
form.append('__EVENTARGUMENT', '');
form.append('__LASTFOCUS', '');
form.append('__VIEWSTATE', $('#__VIEWSTATE').attr('value'));
form.append('__VIEWSTATE', $('#__VIEWSTATE').attr('value') ?? '');
form.append('__VIEWSTATEGENERATOR', 'E4EF4CD1');
form.append('ctl00$header$searchText', ctx.req.param('keyword') || '');
form.append('ctl00$header$searchTextMobile', ctx.req.param('keyword') || '');
@ -66,26 +65,26 @@ async function handler(ctx) {
form.append(
'ctl00$MainPlaceHolder$ddlYears',
year && year !== 'all'
? $('select[name="ctl00$MainPlaceHolder$ddlYears"] option')
? ($('select[name="ctl00$MainPlaceHolder$ddlYears"] option')
.filter((index, element) => $(element).text().split(' (')[0] === ctx.req.param('year'))
.attr('value')
.attr('value') ?? '0')
: '0'
);
form.append(
'ctl00$MainPlaceHolder$ddlCountries',
country && country !== 'all'
? $('select[name="ctl00$MainPlaceHolder$ddlCountries"] option')
? ($('select[name="ctl00$MainPlaceHolder$ddlCountries"] option')
.filter((index, element) => $(element).text().split(' (')[0] === country)
.attr('value')
.attr('value') ?? '0')
: '0'
);
}
form.append(
'ctl00$MainPlaceHolder$ddlContentType',
type && type !== 'all'
? $('select[name="ctl00$MainPlaceHolder$ddlContentType"] option')
? ($('select[name="ctl00$MainPlaceHolder$ddlContentType"] option')
.filter((index, element) => $(element).text().split(' (')[0] === type)
.attr('value')
.attr('value') ?? '')
: ''
);

View File

@ -5,7 +5,7 @@ import ofetch from '@/utils/ofetch';
import { getSearchParamsString } from './helpers';
const getFakeGot = (defaultOptions?: any) => {
const fakeGot = (request, options?: any) => {
const fakeGot = async (request, options?: any) => {
if (!(typeof request === 'string' || request instanceof Request) && request.url) {
options = {
...request,
@ -67,10 +67,11 @@ const getFakeGot = (defaultOptions?: any) => {
const response = ofetch(request, options);
if (options?.responseType === 'arrayBuffer') {
return response.then((responseData) => ({
const responseData = await response;
return {
data: Buffer.from(responseData),
body: Buffer.from(responseData),
}));
};
}
return response;
};

View File

@ -86,7 +86,6 @@
"entities": "8.0.0",
"etag": "1.8.1",
"fanfou-sdk": "6.0.0",
"form-data": "4.0.5",
"google-play-scraper": "10.1.2",
"googleapis": "171.4.0",
"header-generator": "2.1.82",
@ -185,7 +184,7 @@
"eslint-plugin-yml": "3.3.1",
"fs-extra": "11.3.4",
"globals": "17.4.0",
"got": "14.6.6",
"got": "15.0.0",
"husky": "9.1.7",
"js-beautify": "1.15.4",
"lint-staged": "16.4.0",

View File

@ -121,9 +121,6 @@ importers:
fanfou-sdk:
specifier: 6.0.0
version: 6.0.0
form-data:
specifier: 4.0.5
version: 4.0.5
google-play-scraper:
specifier: 10.1.2
version: 10.1.2
@ -414,8 +411,8 @@ importers:
specifier: 17.4.0
version: 17.4.0
got:
specifier: 14.6.6
version: 14.6.6
specifier: 15.0.0
version: 15.0.0
husky:
specifier: 9.1.7
version: 9.1.7
@ -3360,6 +3357,10 @@ packages:
peerDependencies:
devtools-protocol: '*'
chunk-data@0.1.0:
resolution: {integrity: sha512-zFyPtyC0SZ6Zu79b9sOYtXZcgrsXe0RpePrzRyj52hYVFG1+Rk6rBqjjOEk+GNQwc3PIX+86teQMok970pod1g==}
engines: {node: '>=20'}
ci-info@4.4.0:
resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==}
engines: {node: '>=8'}
@ -4204,6 +4205,10 @@ packages:
resolution: {integrity: sha512-QLV1qeYSo5l13mQzWgP/y0LbMr5Plr5fJilgAIwgnwseproEbtNym8xpLsDzeZ6MWXgNE6kdWGBjdh3zT/Qerg==}
engines: {node: '>=20'}
got@15.0.0:
resolution: {integrity: sha512-CUqLG9oFZRis7SZq5Bcxh42LpzxXgXwxWVwNljo60oki8Cq3GXVRpDY2K4GwTzYz3htyXf212nfNg2socz4esQ==}
engines: {node: '>=22'}
graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
@ -4691,6 +4696,10 @@ packages:
resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
lowercase-keys@4.0.1:
resolution: {integrity: sha512-wI9Nui/L8VfADa/cr/7NQruaASk1k23/Uh1khQ02BCVYiiy8F4AhOGnQzJy3Fl/c44GnYSbZHv8g7EcG3kJ1Qg==}
engines: {node: '>=20'}
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
@ -5994,6 +6003,10 @@ packages:
ufo@1.6.3:
resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==}
uint8array-extras@1.5.0:
resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==}
engines: {node: '>=18'}
ultron@1.0.2:
resolution: {integrity: sha512-QMpnpVtYaWEeY+MwKDN/UdKlE/LsFZXM5lO1u7GaZzNgmIbGixHEmVMIKT+vqYOALu3m5GYQy9kz4Xu4IVn7Ow==}
@ -8934,6 +8947,8 @@ snapshots:
mitt: 3.0.1
zod: 3.25.76
chunk-data@0.1.0: {}
ci-info@4.4.0: {}
city-timezones@1.3.3: {}
@ -9925,6 +9940,21 @@ snapshots:
responselike: 4.0.2
type-fest: 4.41.0
got@15.0.0:
dependencies:
'@sindresorhus/is': 7.2.0
byte-counter: 0.1.0
cacheable-lookup: 7.0.0
cacheable-request: 13.0.18
chunk-data: 0.1.0
decompress-response: 10.0.0
http2-wrapper: 2.2.1
keyv: 5.6.0
lowercase-keys: 4.0.1
responselike: 4.0.2
type-fest: 5.5.0
uint8array-extras: 1.5.0
graceful-fs@4.2.11: {}
graphql@16.13.2: {}
@ -10462,6 +10492,8 @@ snapshots:
lowercase-keys@3.0.0: {}
lowercase-keys@4.0.1: {}
lru-cache@10.4.3: {}
lru-cache@11.3.3: {}
@ -12050,6 +12082,8 @@ snapshots:
ufo@1.6.3: {}
uint8array-extras@1.5.0: {}
ultron@1.0.2: {}
unbzip2-stream@1.4.3: