From fbc1df80325f69dea918faef4dd304f4e0e99d90 Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Fri, 25 Oct 2024 15:05:36 +0100 Subject: [PATCH] chore: bump unist- utilities --- packages/jats-to-myst/package.json | 2 +- packages/myst-cli/package.json | 2 +- packages/myst-common/package.json | 2 +- packages/myst-common/src/extractParts.ts | 2 +- packages/myst-directives/package.json | 2 +- packages/myst-execute/package.json | 2 +- packages/myst-parser/package.json | 2 +- packages/myst-to-docx/package.json | 2 +- packages/myst-to-html/package.json | 2 +- packages/myst-to-jats/package.json | 2 +- packages/myst-to-md/package.json | 2 +- packages/myst-to-md/src/directives.ts | 8 ++++---- packages/myst-to-tex/package.json | 2 +- packages/myst-to-typst/package.json | 2 +- packages/myst-transforms/package.json | 2 +- packages/tex-to-myst/package.json | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/jats-to-myst/package.json b/packages/jats-to-myst/package.json index 1da0d579b..1b8a66347 100644 --- a/packages/jats-to-myst/package.json +++ b/packages/jats-to-myst/package.json @@ -45,7 +45,7 @@ "myst-transforms": "^1.3.26", "unified": "^10.0.0", "unist-builder": "^3.0.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-remove": "^3.1.0", "vfile": "^5.0.0", "vfile-reporter": "^7.0.4" diff --git a/packages/myst-cli/package.json b/packages/myst-cli/package.json index 5e75fc7aa..1b980e7b3 100644 --- a/packages/myst-cli/package.json +++ b/packages/myst-cli/package.json @@ -102,7 +102,7 @@ "unified": "^10.1.2", "unist-util-filter": "^4.0.0", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-visit": "^4.0.0", "uuid": "^8.3.2", "vfile": "^5.3.5", diff --git a/packages/myst-common/package.json b/packages/myst-common/package.json index bc834290d..7eb3d3b0f 100644 --- a/packages/myst-common/package.json +++ b/packages/myst-common/package.json @@ -25,7 +25,7 @@ "nanoid": "^4.0.0", "unified": "^10.1.2", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-visit": "^4.1.2", "vfile": "^5.0.0", "vfile-message": "^3.0.0" diff --git a/packages/myst-common/src/extractParts.ts b/packages/myst-common/src/extractParts.ts index 1bf468c57..313ac7cf2 100644 --- a/packages/myst-common/src/extractParts.ts +++ b/packages/myst-common/src/extractParts.ts @@ -33,7 +33,7 @@ function coercePart(part?: string | string[]): string[] { export function selectBlockParts(tree: GenericParent, part?: string | string[]): Block[] { const parts = coercePart(part); if (parts.length === 0) return []; - const blockParts = selectAll('block', tree).filter((block) => { + const blockParts = (selectAll('block', tree) as Block[]).filter((block) => { const blockTags: string[] = ( block.data?.tags && Array.isArray(block.data.tags) ? block.data.tags : [] ).map((tag) => tag?.toLowerCase()); diff --git a/packages/myst-directives/package.json b/packages/myst-directives/package.json index 0c0c26205..817196908 100644 --- a/packages/myst-directives/package.json +++ b/packages/myst-directives/package.json @@ -38,7 +38,7 @@ "myst-common": "^1.7.2", "myst-spec-ext": "^1.7.2", "nanoid": "^4.0.2", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile": "^5.3.7" } } diff --git a/packages/myst-execute/package.json b/packages/myst-execute/package.json index 32793817d..f7bb729ae 100644 --- a/packages/myst-execute/package.json +++ b/packages/myst-execute/package.json @@ -37,7 +37,7 @@ "myst-cli-utils": "^2.0.11", "myst-common": "^1.7.2", "node-fetch": "^3.3.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile": "^5.3.7", "which": "^4.0.0" }, diff --git a/packages/myst-parser/package.json b/packages/myst-parser/package.json index 9fd7d0d8b..57cd1345e 100644 --- a/packages/myst-parser/package.json +++ b/packages/myst-parser/package.json @@ -58,7 +58,7 @@ "unified": "^10.1.1", "unist-builder": "^3.0.0", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-visit": "^4.1.0", "vfile": "^5.3.7" }, diff --git a/packages/myst-to-docx/package.json b/packages/myst-to-docx/package.json index 36b096207..a7b5c83f2 100644 --- a/packages/myst-to-docx/package.json +++ b/packages/myst-to-docx/package.json @@ -40,6 +40,6 @@ "myst-frontmatter": "^1.7.2", "myst-spec": "^0.0.5", "myst-spec-ext": "^1.7.2", - "unist-util-select": "^4.0.3" + "unist-util-select": "^5.0.0" } } diff --git a/packages/myst-to-html/package.json b/packages/myst-to-html/package.json index 9ec68e3db..060043fe8 100644 --- a/packages/myst-to-html/package.json +++ b/packages/myst-to-html/package.json @@ -52,7 +52,7 @@ "unified": "^10.1.2", "unist-builder": "^3.0.0", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-visit": "^4.1.0", "unist-util-find-after": "^4.0.0" } diff --git a/packages/myst-to-jats/package.json b/packages/myst-to-jats/package.json index c1bcac068..7bd2b86ff 100644 --- a/packages/myst-to-jats/package.json +++ b/packages/myst-to-jats/package.json @@ -49,7 +49,7 @@ "nbtx": "^0.2.3", "unified": "^10.1.2", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile": "^5.0.0", "vfile-reporter": "^7.0.4", "xml-js": "^1.6.11" diff --git a/packages/myst-to-md/package.json b/packages/myst-to-md/package.json index c53d7e13a..7a491d23c 100644 --- a/packages/myst-to-md/package.json +++ b/packages/myst-to-md/package.json @@ -42,7 +42,7 @@ "mdast-util-to-markdown": "^1.5.0", "myst-common": "^1.7.2", "myst-frontmatter": "^1.7.2", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile": "^5.3.7", "vfile-reporter": "^7.0.4" } diff --git a/packages/myst-to-md/src/directives.ts b/packages/myst-to-md/src/directives.ts index abed4201b..e42f9d7af 100644 --- a/packages/myst-to-md/src/directives.ts +++ b/packages/myst-to-md/src/directives.ts @@ -195,8 +195,8 @@ const TABLE_KEYS = ['headerRows', 'label', 'class', 'width', 'align']; * kind "table" with table/caption children. */ function container(node: any, _: Parent, state: NestedState, info: Info): string { - const captionNode: GenericNode | null = select('caption', node); - const legendNode: GenericNode | null = select('legend', node); + const captionNode: GenericNode | undefined = select('caption', node); + const legendNode: GenericNode | undefined = select('legend', node); const children = [...(captionNode?.children || []), ...(legendNode?.children || [])]; if (node.kind === 'figure') { const imageNodes: GenericNode[] = selectAll('image', node); @@ -220,7 +220,7 @@ function container(node: any, _: Parent, state: NestedState, info: Info): string const args = argsFromNode(combinedNode, options); return writeFlowDirective('figure', args, options)(combinedNode, _, state, info); } else if (node.kind === 'table') { - const tableNode: GenericNode | null = select('table', node); + const tableNode: GenericNode | undefined = select('table', node); if (!tableNode) return ''; let headerRows = 0; let inHeader = true; @@ -264,7 +264,7 @@ function container(node: any, _: Parent, state: NestedState, info: Info): string }; return writeFlowDirective('list-table', args, options)(combinedNode, _, state, info); } else if (node.kind === 'code') { - const codeNode: GenericNode | null = select('code', node); + const codeNode: GenericNode | undefined = select('code', node); if (!codeNode) return ''; const combinedNode: Record = { ...codeNode }; CODE_BLOCK_KEYS.forEach((key) => { diff --git a/packages/myst-to-tex/package.json b/packages/myst-to-tex/package.json index b065a3702..ed9def721 100644 --- a/packages/myst-to-tex/package.json +++ b/packages/myst-to-tex/package.json @@ -42,7 +42,7 @@ "myst-spec-ext": "^1.7.2", "myst-ext-proof": "^1.0.11", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile-reporter": "^7.0.4" }, "devDependencies": { diff --git a/packages/myst-to-typst/package.json b/packages/myst-to-typst/package.json index 035b3e6c8..e3c1106cc 100644 --- a/packages/myst-to-typst/package.json +++ b/packages/myst-to-typst/package.json @@ -41,7 +41,7 @@ "myst-frontmatter": "^1.7.3", "myst-spec-ext": "^1.7.3", "tex-to-typst": "^0.0.7", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile-reporter": "^7.0.4" } } diff --git a/packages/myst-transforms/package.json b/packages/myst-transforms/package.json index 2feaba91b..16d78e420 100644 --- a/packages/myst-transforms/package.json +++ b/packages/myst-transforms/package.json @@ -39,7 +39,7 @@ "unist-util-modify-children": "^3.1.0", "unist-util-map": "^3.0.0", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "unist-util-visit": "^4.1.0", "vfile": "^5.0.0", "vfile-message": "^3.1.2" diff --git a/packages/tex-to-myst/package.json b/packages/tex-to-myst/package.json index d6cc87e6c..05cf8b8dc 100644 --- a/packages/tex-to-myst/package.json +++ b/packages/tex-to-myst/package.json @@ -42,7 +42,7 @@ "myst-spec-ext": "^1.7.2", "unist-builder": "^3.0.0", "unist-util-remove": "^3.1.0", - "unist-util-select": "^4.0.3", + "unist-util-select": "^5.0.0", "vfile-reporter": "^7.0.4" } }