From 3589d00f92c95208e908500c690c2d5093d905d0 Mon Sep 17 00:00:00 2001 From: Jason Siefken Date: Sun, 1 Oct 2023 21:38:52 -0400 Subject: [PATCH] Build order adjustment --- package-lock.json | 53 ++----------------- package.json | 1 + packages/unified-latex-prettier/package.json | 3 +- .../libs/unified-latex-plugin-to-mdast.ts | 8 +-- packages/unified-latex-to-mdast/package.json | 3 +- 5 files changed, 11 insertions(+), 57 deletions(-) diff --git a/package-lock.json b/package-lock.json index bcbeb5ea..786ff92b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,8 @@ "name": "unified-latex", "workspaces": [ "./packages/unified-latex-util-pegjs", - "./packages/*" + "./packages/*", + "./packages/unified-latex-cli" ], "dependencies": { "@types/color": "^3.0.4", @@ -13926,8 +13927,7 @@ "@unified-latex/unified-latex-util-print-raw": "^1.4.2", "@unified-latex/unified-latex-util-trim": "^1.4.2", "@unified-latex/unified-latex-util-visit": "^1.4.2", - "prettier": "^3.0.3", - "unified": "^10.1.2" + "prettier": "^3.0.3" } }, "packages/unified-latex-prettier/node_modules/prettier": { @@ -13990,58 +13990,13 @@ "hast-util-to-string": "^3.0.0", "rehype-remark": "^10.0.0", "remark-stringify": "^10.0.3", - "unified": "^10.1.2", - "vfile": "^6.0.1" + "unified": "^10.1.2" }, "devDependencies": { "hast-util-to-html": "^8.0.4", "rehype-parse": "^8.0.5" } }, - "packages/unified-latex-to-mdast/node_modules/@types/unist": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", - "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==" - }, - "packages/unified-latex-to-mdast/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "packages/unified-latex-to-mdast/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "packages/unified-latex-to-mdast/node_modules/vfile-message": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", - "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "packages/unified-latex-types": { "name": "@unified-latex/unified-latex-types", "version": "1.4.2", diff --git a/package.json b/package.json index 83fc8c34..74be7ea8 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "private": true, "workspaces": [ "./packages/unified-latex-util-pegjs", + "./packages/unified-latex-util-*", "./packages/*" ], "scripts": { diff --git a/packages/unified-latex-prettier/package.json b/packages/unified-latex-prettier/package.json index bb004676..248b0c57 100644 --- a/packages/unified-latex-prettier/package.json +++ b/packages/unified-latex-prettier/package.json @@ -14,8 +14,7 @@ "@unified-latex/unified-latex-util-print-raw": "^1.4.2", "@unified-latex/unified-latex-util-trim": "^1.4.2", "@unified-latex/unified-latex-util-visit": "^1.4.2", - "prettier": "^3.0.3", - "unified": "^10.1.2" + "prettier": "^3.0.3" }, "files": [ "dist/**/*.ts", diff --git a/packages/unified-latex-to-mdast/libs/unified-latex-plugin-to-mdast.ts b/packages/unified-latex-to-mdast/libs/unified-latex-plugin-to-mdast.ts index 5f1edcba..86a212cd 100644 --- a/packages/unified-latex-to-mdast/libs/unified-latex-plugin-to-mdast.ts +++ b/packages/unified-latex-to-mdast/libs/unified-latex-plugin-to-mdast.ts @@ -5,7 +5,6 @@ import type * as Ast from "@unified-latex/unified-latex-types"; import { unifiedLatexToHast } from "@unified-latex/unified-latex-to-hast"; import { PluginOptions as HtmlLikePluginOptions } from "@unified-latex/unified-latex-to-hast"; import rehypeRemark, { Options as RehypeRemarkOptions } from "rehype-remark"; -import { VFile } from "vfile"; import { defaultHandlers } from "./remark-handlers-defaults"; export type PluginOptions = HtmlLikePluginOptions & RehypeRemarkOptions; @@ -22,11 +21,12 @@ export const unifiedLatexToMdast: Plugin< const handlers = Object.assign({}, defaultHandlers, options?.handlers); options = Object.assign({}, options, { handlers }); - return (tree: Ast.Root, file: VFile) => { + return (tree: Ast.Root, file) => { const mdast = unified() .use(unifiedLatexToHast, options) .use(rehypeRemark, options) - .runSync(tree, file as any) as Mdast.Root; - return mdast; + // @ts-ignore + .runSync(tree, file); + return mdast as Mdast.Root; }; }; diff --git a/packages/unified-latex-to-mdast/package.json b/packages/unified-latex-to-mdast/package.json index 166dddda..d5ccb701 100644 --- a/packages/unified-latex-to-mdast/package.json +++ b/packages/unified-latex-to-mdast/package.json @@ -13,8 +13,7 @@ "hast-util-to-string": "^3.0.0", "rehype-remark": "^10.0.0", "remark-stringify": "^10.0.3", - "unified": "^10.1.2", - "vfile": "^6.0.1" + "unified": "^10.1.2" }, "devDependencies": { "hast-util-to-html": "^8.0.4",