Skip to content

Commit

Permalink
Merge pull request #7 from siefkenj/update
Browse files Browse the repository at this point in the history
Upgrade deps
  • Loading branch information
siefkenj authored Feb 18, 2024
2 parents 45cf71c + 85fd74e commit e20aae0
Show file tree
Hide file tree
Showing 6 changed files with 842 additions and 599 deletions.
1,344 changes: 774 additions & 570 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@
"private": true,
"homepage": "./",
"dependencies": {
"@codemirror/lang-html": "6.4.6",
"@codemirror/lang-html": "6.4.8",
"@codemirror/lang-javascript": "^6.2.1",
"@codemirror/lang-json": "^6.0.1",
"@codemirror/lang-markdown": "^6.2.1",
"@codemirror/language": "^6.9.1",
"@codemirror/lang-markdown": "^6.2.4",
"@codemirror/language": "^6.10.1",
"@codemirror/legacy-modes": "^6.3.3",
"@codemirror/view": "^6.21.0",
"@types/katex": "^0.16.3",
"@uiw/react-codemirror": "^4.21.18",
"@unified-latex/unified-latex-lint": "^1.5.0",
"@unified-latex/unified-latex-prettier": "^2.4.2",
"@unified-latex/unified-latex-to-hast": "^1.5.0",
"@unified-latex/unified-latex-to-mdast": "^1.5.0",
"@unified-latex/unified-latex-util-parse": "^1.4.2",
"@unified-latex/unified-latex-util-pegjs": "^1.4.2",
"@unified-latex/unified-latex-util-pgfkeys": "^1.4.2",
"@unified-latex/unified-latex-util-print-raw": "^1.4.2",
"@unified-latex/unified-latex-util-replace": "^1.4.2",
"@unified-latex/unified-latex-util-split": "^1.4.2",
"@codemirror/view": "^6.24.0",
"@types/katex": "^0.16.7",
"@uiw/react-codemirror": "^4.21.22",
"@unified-latex/unified-latex-lint": "^1.6.0",
"@unified-latex/unified-latex-prettier": "^1.6.0",
"@unified-latex/unified-latex-to-hast": "^1.6.0",
"@unified-latex/unified-latex-to-mdast": "^1.6.0",
"@unified-latex/unified-latex-util-parse": "^1.6.0",
"@unified-latex/unified-latex-util-pegjs": "^1.6.0",
"@unified-latex/unified-latex-util-pgfkeys": "^1.6.0",
"@unified-latex/unified-latex-util-print-raw": "^1.6.0",
"@unified-latex/unified-latex-util-replace": "^1.6.0",
"@unified-latex/unified-latex-util-split": "^1.6.0",
"color": "^4.2.3",
"comlink": "^4.4.1",
"easy-peasy": "^6.0.3",
"easy-peasy": "^6.0.4",
"globalthis": "^1.0.3",
"katex": "^0.16.8",
"katex": "^0.16.9",
"mdast-util-to-markdown": "^2.1.0",
"mdast-util-to-string": "^4.0.0",
"parse-entities": "^4.0.1",
"pegjs": "0.10.0",
"prettier": "^2.8.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-markdown": "^9.0.0",
"react-markdown": "^9.0.1",
"react-select": "^5.7.5",
"react-split-pane": "github:techfreaque/react-split-pane",
"rehype-katex": "^7.0.0",
Expand All @@ -44,14 +44,15 @@
"remark-stringify": "^10.0.3",
"unified": "^10.1.2",
"vfile": "^6.0.1",
"web-vitals": "^3.5.0"
"web-vitals": "^3.5.2"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.1.0",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-plugin-svgr": "^4.1.0",
"vite-tsconfig-paths": "^4.2.1"
"@types/node": "^20.11.19",
"@vitejs/plugin-react": "^4.2.1",
"typescript": "^5.3.3",
"vite": "^5.1.3",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.1"
},
"scripts": {
"start": "vite",
Expand Down
10 changes: 10 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ body,

.options-bar {
position: relative;
display: flex;
gap: 0.5em;
}
.tex-section {
flex-grow: 1;
Expand Down Expand Up @@ -191,3 +193,11 @@ ul.lints {
height: 100%;
flex: 1 1 auto;
}

.options-bar .info {
font-size: small;
color: #666;
align-self: flex-end;
margin-left: auto;
margin-right: 0.5em;
}
6 changes: 6 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { JsonDisplay } from "./components/json-display";
import { PrettierDocDisplay } from "./components/prettier-doc-display";
import { MarkdownView } from "./components/markdown-view";

declare const __UNIFIED_LATEX_VERSION__: string;

function App() {
const currDisplay = useStoreState((state) => state.activeView);
const setCurrDisplay = useStoreActions((a) => a.setActiveView);
Expand Down Expand Up @@ -109,6 +111,10 @@ function App() {
}}
/>
</label>
<span className="info">
<code>unified-latex</code>:{" "}
<code>{__UNIFIED_LATEX_VERSION__}</code>
</span>
</div>
<div className="tex-section">
<SplitPane split="vertical" minSize={200} defaultSize="50%">
Expand Down
1 change: 1 addition & 0 deletions src/async-worker/parsing-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { toMarkdown } from "mdast-util-to-markdown";
import peg from "pegjs";

// Needed to print the prettier Doc
// @ts-ignore
import prettierPluginBabel from "prettier/parser-babel";
// @ts-ignore
//import globalthisgenrator from "globalthis";
Expand Down
29 changes: 25 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
/// <reference types="node" />

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import viteTsconfigPaths from "vite-tsconfig-paths";
import svgrPlugin from "vite-plugin-svgr";
import path from "path";
import fs from "fs";
import { createRequire } from "module";
const require = createRequire(import.meta.url);

// `unified-latex-utils-parse` is as good a dep as any to check the version of unified-latex from
const packageJsonPath = path.join(
require.resolve("@unified-latex/unified-latex-util-parse"),
"..",
"package.json"
);
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
const unifiedLatexVersion = packageJson.version as string;

// https://vitejs.dev/config/
export default defineConfig({
base: "./",
plugins: [react(), viteTsconfigPaths(), svgrPlugin()],
build: { sourcemap: true, minify: false, outDir: "build" },
build: {
sourcemap: true,
minify: false,
outDir: "build",
},
define: {
__UNIFIED_LATEX_VERSION__: "'" + unifiedLatexVersion + "'",
},
resolve: {
conditions: ['worker']
}
conditions: ["worker"],
},
});

0 comments on commit e20aae0

Please sign in to comment.