From c119acbbd7c5bae848b5666c560fa812f09a8b78 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 db54018d8..7baf0f24e 100644 --- a/packages/jats-to-myst/package.json +++ b/packages/jats-to-myst/package.json @@ -45,7 +45,7 @@ "myst-transforms": "^1.3.20", "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 da4fcb9f5..6ccabbd7b 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 859374273..7abe7c273 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 457ad9a85..e9a088134 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 0c00d60b7..2b9257859 100644 --- a/packages/myst-directives/package.json +++ b/packages/myst-directives/package.json @@ -38,7 +38,7 @@ "myst-common": "^1.6.0", "myst-spec-ext": "^1.6.0", "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 11e62af37..1e9f53801 100644 --- a/packages/myst-execute/package.json +++ b/packages/myst-execute/package.json @@ -37,7 +37,7 @@ "myst-cli-utils": "^2.0.10", "myst-common": "^1.6.1", "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 364435b28..57842c76d 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 873747b2d..60f115fbe 100644 --- a/packages/myst-to-docx/package.json +++ b/packages/myst-to-docx/package.json @@ -40,6 +40,6 @@ "myst-frontmatter": "^1.5.1", "myst-spec": "^0.0.5", "myst-spec-ext": "^1.5.1", - "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 2954e1633..d1affa3af 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 18187b5de..71e8a8c35 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 c7ecccf01..e06c45aa1 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.1", "myst-frontmatter": "^1.7.1", - "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 7430ea556..a44e0601e 100644 --- a/packages/myst-to-tex/package.json +++ b/packages/myst-to-tex/package.json @@ -42,7 +42,7 @@ "myst-spec-ext": "^1.6.1", "myst-ext-proof": "^1.0.10", "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 4ed9a360c..2a7f111fd 100644 --- a/packages/myst-to-typst/package.json +++ b/packages/myst-to-typst/package.json @@ -41,7 +41,7 @@ "myst-frontmatter": "^1.7.1", "myst-spec-ext": "^1.7.1", "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 979ac9853..b3a82dbcb 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 9e5ce6dad..6818900b3 100644 --- a/packages/tex-to-myst/package.json +++ b/packages/tex-to-myst/package.json @@ -42,7 +42,7 @@ "myst-spec-ext": "^1.6.1", "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" } }