mirror of
https://github.com/discordjs/discord.js.git
synced 2024-07-05 07:51:18 +12:00
chore: remove nextjs patch
This commit is contained in:
parent
5a4c9755c3
commit
2a25eeaf13
|
@ -53,7 +53,7 @@
|
|||
"ariakit": "2.0.0-next.44",
|
||||
"cmdk": "^0.2.0",
|
||||
"contentlayer": "^0.3.4",
|
||||
"next": "14.0.2-canary.20",
|
||||
"next": "14.0.3-canary.2",
|
||||
"next-contentlayer": "^0.3.4",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -65,16 +65,16 @@
|
|||
"sharp": "^0.32.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "14.0.2-canary.20",
|
||||
"@next/bundle-analyzer": "14.0.3-canary.2",
|
||||
"@testing-library/react": "^14.1.0",
|
||||
"@testing-library/user-event": "^14.5.1",
|
||||
"@types/html-escaper": "^3.0.2",
|
||||
"@types/node": "18.18.8",
|
||||
"@types/react": "^18.2.37",
|
||||
"@types/react-dom": "^18.2.15",
|
||||
"@unocss/eslint-plugin": "^0.57.2",
|
||||
"@unocss/postcss": "^0.57.2",
|
||||
"@unocss/reset": "^0.57.2",
|
||||
"@unocss/eslint-plugin": "^0.57.3",
|
||||
"@unocss/postcss": "^0.57.3",
|
||||
"@unocss/reset": "^0.57.3",
|
||||
"@vitejs/plugin-react": "^4.1.1",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -89,8 +89,8 @@
|
|||
"prettier": "^3.0.3",
|
||||
"turbo": "^1.10.17-canary.0",
|
||||
"typescript": "^5.2.2",
|
||||
"unocss": "^0.57.2",
|
||||
"vercel": "^32.5.2",
|
||||
"unocss": "^0.57.3",
|
||||
"vercel": "^32.5.3",
|
||||
"vitest": "^0.34.6"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
"class-variance-authority": "^0.7.0",
|
||||
"cmdk": "^0.2.0",
|
||||
"meilisearch": "^0.35.0",
|
||||
"next": "14.0.2-canary.20",
|
||||
"next": "14.0.3-canary.2",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -74,15 +74,15 @@
|
|||
"sharp": "^0.32.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "14.0.2-canary.20",
|
||||
"@next/bundle-analyzer": "14.0.3-canary.2",
|
||||
"@testing-library/react": "^14.1.0",
|
||||
"@testing-library/user-event": "^14.5.1",
|
||||
"@types/node": "18.18.8",
|
||||
"@types/react": "^18.2.37",
|
||||
"@types/react-dom": "^18.2.15",
|
||||
"@unocss/eslint-plugin": "^0.57.2",
|
||||
"@unocss/postcss": "^0.57.2",
|
||||
"@unocss/reset": "^0.57.2",
|
||||
"@unocss/eslint-plugin": "^0.57.3",
|
||||
"@unocss/postcss": "^0.57.3",
|
||||
"@unocss/reset": "^0.57.3",
|
||||
"@vitejs/plugin-react": "^4.1.1",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"cpy-cli": "^5.0.0",
|
||||
|
@ -95,7 +95,7 @@
|
|||
"prettier": "^3.0.3",
|
||||
"turbo": "^1.10.17-canary.0",
|
||||
"typescript": "^5.2.2",
|
||||
"vercel": "^32.5.2",
|
||||
"vercel": "^32.5.3",
|
||||
"vitest": "^0.34.6"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -120,7 +120,7 @@ export async function generateStaticParams({ params: { package: packageName, ver
|
|||
const modelJSON = await fetchModelJSON(packageName, version);
|
||||
|
||||
if (!modelJSON) {
|
||||
return [];
|
||||
return [{ package: packageName, version, item: '' }];
|
||||
}
|
||||
|
||||
const model = addPackageToModel(new ApiModel(), modelJSON);
|
||||
|
@ -129,10 +129,12 @@ export async function generateStaticParams({ params: { package: packageName, ver
|
|||
const entry = pkg?.entryPoints[0];
|
||||
|
||||
if (!entry) {
|
||||
return [];
|
||||
return [{ package: packageName, version, item: '' }];
|
||||
}
|
||||
|
||||
return entry.members.map((member: ApiItem) => ({
|
||||
package: packageName,
|
||||
version,
|
||||
item: `${member.displayName}${OVERLOAD_SEPARATOR}${member.kind}`,
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -5,11 +5,15 @@ import { addPackageToModel } from './addPackageToModel';
|
|||
import { OVERLOAD_SEPARATOR, PACKAGES } from './constants';
|
||||
import { findMember, findMemberByKey } from './model';
|
||||
|
||||
export const fetchMember = cache(async (packageName: string, branchName: string, item: string) => {
|
||||
export const fetchMember = cache(async (packageName: string, branchName: string, item?: string) => {
|
||||
if (!PACKAGES.includes(packageName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!item) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const model = new ApiModel();
|
||||
|
||||
if (branchName === 'main') {
|
||||
|
|
15
package.json
15
package.json
|
@ -49,25 +49,25 @@
|
|||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^18.2.0",
|
||||
"@commitlint/config-angular": "^18.1.0",
|
||||
"@commitlint/cli": "^18.4.0",
|
||||
"@commitlint/config-angular": "^18.4.0",
|
||||
"@favware/cliff-jumper": "^2.2.1",
|
||||
"@favware/npm-deprecate": "^1.0.7",
|
||||
"@types/lodash.merge": "^4.6.9",
|
||||
"@unocss/eslint-plugin": "^0.57.2",
|
||||
"@unocss/eslint-plugin": "^0.57.3",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"conventional-changelog-cli": "^4.1.0",
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
"husky": "^8.0.3",
|
||||
"is-ci": "^3.0.1",
|
||||
"lint-staged": "^15.0.2",
|
||||
"lint-staged": "^15.1.0",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.17-canary.0",
|
||||
"typescript": "^5.2.2",
|
||||
"unocss": "^0.57.2",
|
||||
"vercel": "^32.5.2",
|
||||
"unocss": "^0.57.3",
|
||||
"vercel": "^32.5.3",
|
||||
"vitest": "^0.34.6"
|
||||
},
|
||||
"pnpm": {
|
||||
|
@ -88,8 +88,7 @@
|
|||
"@contentlayer/utils>@opentelemetry/semantic-conventions": "^1.15.1"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"@microsoft/tsdoc-config@0.16.2": "patches/@microsoft__tsdoc-config@0.16.2.patch",
|
||||
"next@14.0.2-canary.20": "patches/next@14.0.2-canary.20.patch"
|
||||
"@microsoft/tsdoc-config@0.16.2": "patches/@microsoft__tsdoc-config@0.16.2.patch"
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -70,11 +70,11 @@
|
|||
"@types/node": "18.18.8",
|
||||
"@types/react": "^18.2.37",
|
||||
"@types/react-dom": "^18.2.15",
|
||||
"@unocss/eslint-plugin": "^0.57.2",
|
||||
"@unocss/reset": "^0.57.2",
|
||||
"@unocss/eslint-plugin": "^0.57.3",
|
||||
"@unocss/reset": "^0.57.3",
|
||||
"@vitejs/plugin-react": "^4.1.1",
|
||||
"@vitest/coverage-v8": "^0.34.6",
|
||||
"chromatic": "^7.6.0",
|
||||
"chromatic": "^9.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.53.0",
|
||||
"eslint-config-neon": "^0.1.57",
|
||||
|
@ -84,7 +84,7 @@
|
|||
"storybook": "^7.5.3",
|
||||
"turbo": "^1.10.17-canary.0",
|
||||
"typescript": "^5.2.2",
|
||||
"unocss": "^0.57.2",
|
||||
"unocss": "^0.57.3",
|
||||
"vite": "^4.5.0",
|
||||
"vite-plugin-dts": "^3.6.3",
|
||||
"vitest": "^0.34.6"
|
||||
|
|
|
@ -69,9 +69,9 @@
|
|||
"ws": "^8.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.23.2",
|
||||
"@babel/preset-env": "^7.23.2",
|
||||
"@babel/preset-typescript": "^7.23.2",
|
||||
"@babel/core": "^7.23.3",
|
||||
"@babel/preset-env": "^7.23.3",
|
||||
"@babel/preset-typescript": "^7.23.3",
|
||||
"@discordjs/api-extractor": "workspace:^",
|
||||
"@favware/cliff-jumper": "^2.2.1",
|
||||
"@types/jest": "^29.5.8",
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
diff --git a/dist/esm/server/lib/incremental-cache/index.js b/dist/esm/server/lib/incremental-cache/index.js
|
||||
index 93519fc1e45361f153edd1f4496ca4a006745e8f..8d603be638c297db9593ae9fa92ec5359d38f823 100644
|
||||
--- a/dist/esm/server/lib/incremental-cache/index.js
|
||||
+++ b/dist/esm/server/lib/incremental-cache/index.js
|
||||
@@ -348,10 +348,11 @@ export class IncrementalCache {
|
||||
});
|
||||
}
|
||||
if (this.dev && !ctx.fetchCache) return;
|
||||
+ const max_fetch_size = Number(process.env.MAX_FETCH_SIZE) || 5 // gets value set in next.config
|
||||
// fetchCache has upper limit of 2MB per-entry currently
|
||||
- if (ctx.fetchCache && JSON.stringify(data).length > 2 * 1024 * 1024) {
|
||||
+ if (ctx.fetchCache && JSON.stringify(data).length > max_fetch_size * 1024 * 1024) {
|
||||
if (this.dev) {
|
||||
- throw new Error(`fetch for over 2MB of data can not be cached`);
|
||||
+ throw new Error(`fetch for over ${max_fetch_size}MB of data can not be cached`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
diff --git a/dist/server/lib/incremental-cache/index.js b/dist/server/lib/incremental-cache/index.js
|
||||
index 83e061e5a072d253c2db7ea5e796307070cb1f81..5f9a462e3e12965a49ab6419b19ef2fa0aae7fe6 100644
|
||||
--- a/dist/server/lib/incremental-cache/index.js
|
||||
+++ b/dist/server/lib/incremental-cache/index.js
|
||||
@@ -375,10 +375,11 @@ class IncrementalCache {
|
||||
});
|
||||
}
|
||||
if (this.dev && !ctx.fetchCache) return;
|
||||
+ const max_fetch_size = Number(process.env.MAX_FETCH_SIZE) || 5 //gets value set in next.config
|
||||
// fetchCache has upper limit of 2MB per-entry currently
|
||||
- if (ctx.fetchCache && JSON.stringify(data).length > 2 * 1024 * 1024) {
|
||||
+ if (ctx.fetchCache && JSON.stringify(data).length > max_fetch_size * 1024 * 1024) {
|
||||
if (this.dev) {
|
||||
- throw new Error(`fetch for over 2MB of data can not be cached`);
|
||||
+ throw new Error(`fetch for over ${max_fetch_size}MB of data can not be cached`);
|
||||
}
|
||||
return;
|
||||
}
|
1674
pnpm-lock.yaml
1674
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue