Skip to content

Commit

Permalink
Upgraded dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pastelsky committed Nov 2, 2024
1 parent 517b643 commit 5e5f191
Show file tree
Hide file tree
Showing 15 changed files with 2,015 additions and 1,863 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.9.0
23.1.0
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/dist/lib/converter/types.js b/dist/lib/converter/types.js
index fa58425b488ceaf858e4ccd9403dcd08e027dec3..168083ad848f1dbf8d7615d074ee3899225d92cb 100644
index cc8beef359a61cfc0e05c73db612eca27173e3aa..8e1b9242853f0af19e2bbaff676061d838cc9da2 100644
--- a/dist/lib/converter/types.js
+++ b/dist/lib/converter/types.js
@@ -229,7 +229,7 @@ const importType = {
@@ -239,7 +239,7 @@ const importType = {
convert(context, node) {
const name = node.qualifier?.getText() ?? "__module";
const symbol = context.checker.getSymbolAtLocation(node);
Expand All @@ -12,20 +12,20 @@ index fa58425b488ceaf858e4ccd9403dcd08e027dec3..168083ad848f1dbf8d7615d074ee3899
},
convertType(context, type) {
diff --git a/dist/lib/output/plugins/JavascriptIndexPlugin.js b/dist/lib/output/plugins/JavascriptIndexPlugin.js
index 0ee1c2b1656c17ef69c5f8af4f5e45b37182cc9c..17a5ac8a35c84dcb26991d05723ab4c8153d65f1 100644
index 1b5dcd6abe289f6c5a0df6237c5ec2799137b02b..a88ff111f4c3614e8cb0ff040631160ceda045fb 100644
--- a/dist/lib/output/plugins/JavascriptIndexPlugin.js
+++ b/dist/lib/output/plugins/JavascriptIndexPlugin.js
@@ -131,8 +131,11 @@ let JavascriptIndexPlugin = (() => {
const initialSearchResults = Object.values(event.project.reflections).filter((refl) => {
return (refl instanceof models_1.DeclarationReflection &&
@@ -122,8 +122,11 @@ let JavascriptIndexPlugin = (() => {
return ((refl instanceof models_1.DeclarationReflection ||
refl instanceof models_1.DocumentReflection) &&
refl.url &&
- refl.name &&
- !refl.flags.isExternal);
+ refl.name
+ refl.name
+ // Include externals in search because they include re-exports for e.g.
+ // &&
+ // &&
+ // !refl.flags.isExternal
+ );
+ );
});
const indexEvent = new events_1.IndexEvent(events_1.IndexEvent.PREPARE_INDEX, initialSearchResults);
this.owner.trigger(indexEvent);
const indexEvent = new events_1.IndexEvent(initialSearchResults);
this.owner.trigger(events_1.IndexEvent.PREPARE_INDEX, indexEvent);
9 changes: 7 additions & 2 deletions app/search/docs/[...pkg]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from "react";
import Search from "./search";

const SearchPage = ({ params }: { params: { pkg: string | string[] } }) => {
return <Search pkg={params.pkg} />;
const SearchPage = async ({
params,
}: {
params: Promise<{ pkg: string | string[] }>;
}) => {
const { pkg } = await params;
return <Search pkg={pkg} />;
};

export default SearchPage;
2 changes: 1 addition & 1 deletion app/search/docs/[...pkg]/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import Placeholder from "../../../../client/components/Placeholder";
import Header from "../../../../client/components/Header";
import Footer from "../../../../client/components/Footer";
import { packageFromPath } from "../../../../common/utils";
import { packageFromPath } from "../../../../common/client-utils";
import { useRouter } from "next/navigation";
import { useSearchParams } from "next/navigation";

Expand Down
2 changes: 1 addition & 1 deletion client/components/HeaderIframe/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from "react-dom/client";
import Header from "../Header";
import "../../../app/global.css";
import styles from "./HeaderIframe.module.scss";
import { packageFromPath } from "../../../common/utils";
import { packageFromPath } from "../../../common/client-utils";
import ToggleMenu from "../ToggleMenu";
import "../../scripts/global-docs-main";

Expand Down
8 changes: 4 additions & 4 deletions client/components/SearchBox/SearchBox.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../../stylesheets/mixins";
@use "../../../stylesheets/mixins";

.searchBox {
z-index: 1;
Expand Down Expand Up @@ -50,8 +50,8 @@

.searchSuggestionMenu,
.versionMenu {
@include popup;
@include hideScrollbar;
@include mixins.popup;
@include mixins.hideScrollbar;
border-radius: 0 0 4px 4px;
list-style: none;
box-shadow: var(--shadow-overlay);
Expand Down Expand Up @@ -154,7 +154,7 @@
font-weight: var(--font-weight-bold);

.searchHighlight {
@include selectedLabel;
@include mixins.selectedLabel;
}
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
99 changes: 48 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,57 @@
"private": true,
"scripts": {
"dev": "run-p --print-label 'shared:watch' 'next:watch'",
"next:watch": "NODE_ENV=development ts-node server.ts",
"next:watch": "NODE_ENV=development node -r esbuild-register server.ts",
"shared:watch": "vite build --watch",
"build": "NODE_ENV=production next build && NODE_ENV=production vite build --mode production",
"start": "NODE_ENV=production ts-node server.ts",
"start": "NODE_ENV=production node -r esbuild-register server.ts",
"start:production": "pm2 start process.yml",
"prepare": "husky install"
},
"dependencies": {
"@bull-board/api": "^5.10.2",
"@bull-board/fastify": "^5.10.2",
"@bull-board/api": "^6.3.3",
"@bull-board/fastify": "^6.3.3",
"@definitelytyped/header-parser": "^0.0.178",
"@fastify/static": "^6.12.0",
"@immobiliarelabs/fastify-sentry": "^8.0.0",
"@fastify/static": "^8.0.2",
"@immobiliarelabs/fastify-sentry": "^8.0.2",
"@monaco-editor/react": "^4.6.0",
"@sentry/node": "^7.91.0",
"@sentry/profiling-node": "^1.3.2",
"@swc/core": "^1.3.101",
"@swc/helpers": "^0.5.3",
"@sentry/node": "^7.119.2",
"@sentry/profiling-node": "^1.3.5",
"@swc/core": "^1.7.42",
"@swc/helpers": "^0.5.13",
"@tanstack/react-query": "^4.36.1",
"@types/semver": "^7.5.6",
"@types/semver": "^7.5.8",
"@types/validate-npm-package-name": "^4.0.2",
"@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react": "^4.3.3",
"animejs": "^3.2.2",
"axios": "^1.6.6",
"axios": "^1.7.7",
"bullmq": "patch:bullmq@npm%3A4.15.4#~/.yarn/patches/bullmq-npm-4.15.4-b55917dd70.patch",
"chalk": "^4.1.2",
"check-disk-space": "^3.4.0",
"classnames": "^2.4.0",
"classnames": "^2.5.1",
"debounce": "^1.2.1",
"dotenv": "^16.3.1",
"downshift": "^8.2.3",
"enhanced-resolve": "^5.15.0",
"esbuild-register": "^3.5.0",
"fast-folder-size": "^2.2.0",
"fastify": "^4.25.2",
"dotenv": "^16.4.5",
"downshift": "^8.5.0",
"enhanced-resolve": "^5.17.1",
"esbuild-register": "^3.6.0",
"fast-folder-size": "^2.3.0",
"fastify": "^5.1.0",
"fs-extra": "^11.2.0",
"heapdump": "^0.3.15",
"lru-cache": "^10.1.0",
"lru-cache": "^10.4.3",
"monaco-editor": "^0.44.0",
"mongodb": "6.2",
"next": "14.0.4",
"node-html-parser": "^6.1.12",
"mongodb": "6.2.0",
"next": "15.0.2",
"node-html-parser": "^6.1.13",
"npm-run-all": "^4.1.5",
"open-props": "^1.6.16",
"pacote": "^17.0.5",
"open-props": "^1.7.7",
"pacote": "^17.0.7",
"pino-pretty": "^9.4.1",
"pkg-dir": "5.0.0",
"pm2": "^5.3.0",
"pm2": "^5.4.2",
"prettier": "^3.1.1",
"pretty-bytes": "5.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hotkeys-hook": "^3.4.7",
"read-pkg-up": "7.0.1",
"regenerator-runtime": "^0.14.1",
Expand All @@ -63,42 +62,40 @@
"rimraf": "^3.0.2",
"sanitize-filename": "^1.6.3",
"sanitize.css": "^13.0.0",
"sass": "^1.69.5",
"semver": "^7.5.4",
"sharp": "^0.33.1",
"sass": "^1.80.6",
"semver": "^7.6.3",
"sharp": "^0.33.5",
"stacktrace-parser": "^0.1.10",
"ts-morph": "^16.0.0",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"typedoc": "patch:typedoc@npm%3A0.25.4#~/.yarn/patches/typedoc-npm-0.25.4-19cf6708e5.patch",
"typedoc-plugin-mdn-links": "^3.1.9",
"typedoc-plugin-missing-exports": "^2.1.0",
"typedoc-plugin-rename-defaults": "^0.7.0",
"validate-npm-package-name": "^5.0.0",
"vite": "^5.0.13",
"vite-plugin-externalize-dependencies": "^0.11.0",
"winston": "^3.11.0",
"typedoc": "patch:typedoc@npm%3A0.26.11#~/.yarn/patches/typedoc-npm-0.26.11-24fa09b154.patch",
"typedoc-plugin-mdn-links": "^3.3.5",
"typedoc-plugin-missing-exports": "^3.0.0",
"typedoc-plugin-rename-defaults": "^0.7.1",
"validate-npm-package-name": "5.0.0",
"vite": "^5.4.10",
"vite-plugin-externalize-dependencies": "^1.0.1",
"winston": "^3.16.0",
"winston-console-format": "^1.0.8",
"workerpool": "^9.0.4"
"workerpool": "^9.2.0"
},
"devDependencies": {
"@fastify/basic-auth": "^5.1.1",
"@fastify/basic-auth": "^6.0.1",
"@types/animejs": "^3.1.12",
"@types/fs-extra": "^11.0.4",
"@types/heapdump": "^0.3.4",
"@types/node": "20.10.5",
"@types/react": "18.2.45",
"@types/regenerator-runtime": "^0.13.5",
"@types/node": "22.8.6",
"@types/react": "18.2.9",
"@types/regenerator-runtime": "^0.13.8",
"fast-glob": "^3.3.2",
"husky": "^8.0.3",
"lint-staged": "^13.3.0",
"typescript": "5.3.3"
"typescript": "5.6.3"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"packageManager": "yarn@4.0.2",
"resolutions": {
"typedoc@^0.25.3": "patch:typedoc@npm%3A0.25.3#./.yarn/patches/typedoc-npm-0.25.3-11902e45cc.patch"
"typedoc@^0.25.3": "patch:typedoc@npm%3A0.25.3#./.yarn/patches/typedoc-npm-0.25.3-11902e45cc.patch",
"@types/react": "18.2.9"
}
}
23 changes: 4 additions & 19 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import {
import logger from "./common/logger";
import fastifyBasicAuth from "@fastify/basic-auth";
import "dotenv/config";
import heapdump from "heapdump";

console.log("Starting server...");
const dev = process.env.NODE_ENV !== "production";
const hostname = "localhost";
const port = 3000;
Expand All @@ -41,7 +41,7 @@ const fastify = fastifyStart({
},
});

const app = next({ dev, hostname, port });
const app = next({ dev, hostname, port, turbopack: true });
const nextHandle = app.getRequestHandler();

const queueDashboardAdapter = new FastifyAdapter();
Expand All @@ -53,6 +53,7 @@ createBullBoard({

queueDashboardAdapter.setBasePath("/queue/ui");

console.log("Preparing next app...");
app
.prepare()
.then(() => {
Expand Down Expand Up @@ -207,7 +208,7 @@ app
}

if (error.name === "FastifyError") {
reply.redirect(401, "/queue/ui");
reply.redirect("/queue/ui", 401);
}
reply.code(500).send({ error: error.message });
});
Expand All @@ -232,19 +233,3 @@ app
.catch((err) => {
console.log("Failed to prepare app with error: ", err);
});

// Set your memory limit (in bytes)
const memoryLimit = 1 * 1024 * 1024 * 1024; // 1 GB

let heapDumped = false;
setInterval(function () {
if (heapDumped) return;

const heapUsed = process.memoryUsage().heapUsed;
if (heapUsed > memoryLimit) {
require("fs").mkdirSync("./heapdumps", { recursive: true });
heapdump.writeSnapshot("./heapdumps/" + Date.now() + ".heapsnapshot");
console.log("Memory limit exceeded... writing heapdump");
heapDumped = true;
}
}, 5000);
4 changes: 3 additions & 1 deletion server/package/extractor/doc-generator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
ReflectionSymbolId,
Renderer,
TypeDocOptions,
FileRegistry
} from "typedoc";
import path from "path";
import logger from "../../../common/logger";
Expand Down Expand Up @@ -117,7 +118,6 @@ const generateDocsDefaultOptions = (
disableSources: true,
disableGit: true,
// readme: "none",
stripYamlFrontmatter: true,
pretty: true,
emit: "docs",
githubPages: false,
Expand Down Expand Up @@ -542,6 +542,8 @@ export async function generateDocsForPackage(
const projectFromCache = new td.Deserializer(cachedApp).reviveProject(
typeDocFromCache,
`${packageJSON.name}${packageJSON.version}`,
process.cwd(),
new FileRegistry(),
);

await generateDocsHTML(cachedApp, projectFromCache);
Expand Down
2 changes: 1 addition & 1 deletion server/package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { docsRootPath, getDocsPath } from "./utils";
import { resolvePackageJSON } from "./resolvers";
import semver from "semver";
import { generateDocsQueue, generateDocsQueueEvents } from "../queues";
import { packageFromPath } from "../../common/utils";
import { packageFromPath } from "../../common/client-utils";
import { PackageNotFoundError } from "./CustomError";
import logger from "../../common/logger";
import { parse } from "node-html-parser";
Expand Down
2 changes: 1 addition & 1 deletion server/package/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from "fs";
import path from "path";
import sanitize from "sanitize-filename";

export const docsVersion = "1.0";
export const docsVersion = "1.1";
export const docsRootPath = path.join(
__dirname,
"..",
Expand Down
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ import react from "@vitejs/plugin-react";
import externalize from "vite-plugin-externalize-dependencies";

export default defineConfig({
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler", // or "modern"
},
},
},
plugins: [
react(),
// externalize({ externals: ["react", "react-dom"] })
Expand Down
Loading

0 comments on commit 5e5f191

Please sign in to comment.