Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Build the OK cli after the release version override (PRD-9158) (#5959)
Andrew Mikofalvy3b3663c53820
diff --git a/.github/scripts/release-cascade-shape.test.mjs b/.github/scripts/release-cascade-shape.test.mjsindex edaaccc69..5c4c4739e 100644--- a/.github/scripts/release-cascade-shape.test.mjs+++ b/.github/scripts/release-cascade-shape.test.mjs@@ -2347,6 +2347,33 @@ describe('the release App credential never shares a job with installed packages'for (const job of ['release', 'publish']) expect(releaseWorkflow.jobs[job].if).toBe(RUN_IF);});+ test('the build job builds what it packs after both version overrides, and checks the baked browser version before packing', () => {+ const { build } = releaseWorkflow.jobs;+ const names = steps(build).map((step) => step.name);+ const at = (name) => {+ expect(names, name).toContain(name);+ return names.indexOf(name);+ };+ const turboBuilds = steps(build).filter((step) => /\bturbo\s+run\s+build\b/.test(commands(step)));+ expect(turboBuilds.map((step) => commands(step).trim())).toEqual([+ 'pnpm exec turbo run build --filter=@inkeep/open-knowledge --cache=local:,remote:',+ ]);+ const built = at(turboBuilds[0].name);+ expect(at('Override fixed-group versions to X.Y.Z-beta.N')).toBeLessThan(built);+ expect(at('Validate stable_version + override package.json (publish-stable)')).toBeLessThan(built);+ const prepublish = "Run the cli's prepublishOnly against the overridden versions";+ const check = stepNamed(build, 'Assert the browser bundle bakes the version being published');+ expect(built).toBeLessThan(at(prepublish));+ expect(at(prepublish)).toBeLessThan(at(check.name));+ expect(at(check.name)).toBeLessThan(at('Pack the cli tarball'));+ expect(check.if).toBe(PACK_IF);+ expect(check['continue-on-error']).toBeUndefined();+ expect(commands(check)).toContain(+ 'git show "$GITHUB_SHA:packages/cli/scripts/assert-bundle-version.mjs" > "$RUNNER_TEMP/assert-bundle-version.mjs"',+ );+ expect(commands(check)).toContain('node "$RUNNER_TEMP/assert-bundle-version.mjs" packages/cli');+ });+test('the credential jobs take from the build job only what needs package code to compute', () => {const reads = (id) => {const job = releaseWorkflow.jobs[id];diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 07dd93e0f..476ee1a25 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -306,19 +306,6 @@ jobs:rustup toolchain install --no-self-updaterustc -vV- - name: Build packages- run: |- pnpm exec turbo run build --cache=local:,remote:-- - name: Assert the native-config binary set- env:- NATIVE_SET_PLATFORMS: ${{ steps.stage.outputs.platforms }}- run: |- set -euo pipefail- git cat-file -e "$GITHUB_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$GITHUB_SHA"- git show "$GITHUB_SHA:.github/scripts/assert-native-set.mjs" > "$RUNNER_TEMP/assert-native-set.mjs"- node "$RUNNER_TEMP/assert-native-set.mjs" platforms "$NATIVE_SET_PLATFORMS"-# --- BETA PATH (push + workflow_dispatch) ---# Compute baseVersion + maxBumpType + rendered release notes locally@@ -510,11 +497,32 @@ jobs:doneecho "All fixed-group package.json files + both skill bundles' metadata.version now at ${STABLE_VERSION} (in-memory only)."+ - name: Build the cli and its workspace dependencies at the overridden versions+ run: |+ pnpm exec turbo run build --filter=@inkeep/open-knowledge --cache=local:,remote:++ - name: Assert the native-config binary set+ env:+ NATIVE_SET_PLATFORMS: ${{ steps.stage.outputs.platforms }}+ run: |+ set -euo pipefail+ git cat-file -e "$GITHUB_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$GITHUB_SHA"+ git show "$GITHUB_SHA:.github/scripts/assert-native-set.mjs" > "$RUNNER_TEMP/assert-native-set.mjs"+ node "$RUNNER_TEMP/assert-native-set.mjs" platforms "$NATIVE_SET_PLATFORMS"+- name: Run the cli's prepublishOnly against the overridden versionsif: github.event.action == 'publish-stable' || steps.compute-beta.outputs.run_beta == 'true'working-directory: packages/clirun: pnpm run prepublishOnly+ - name: Assert the browser bundle bakes the version being published+ if: github.event.action == 'publish-stable' || steps.compute-beta.outputs.run_beta == 'true'+ run: |+ set -euo pipefail+ git cat-file -e "$GITHUB_SHA^{commit}" 2>/dev/null || git fetch --no-tags --depth=1 origin "$GITHUB_SHA"+ git show "$GITHUB_SHA:packages/cli/scripts/assert-bundle-version.mjs" > "$RUNNER_TEMP/assert-bundle-version.mjs"+ node "$RUNNER_TEMP/assert-bundle-version.mjs" packages/cli+- name: Pack the cli tarballif: github.event.action == 'publish-stable' || steps.compute-beta.outputs.run_beta == 'true'working-directory: packages/clidiff --git a/knip.config.ts b/knip.config.tsindex 0004a763a..69344114d 100644--- a/knip.config.ts+++ b/knip.config.ts@@ -149,15 +149,11 @@ export default {'packages/server': {entry: ['src/**/*.test.ts', 'src/parse-worker.ts'],project: 'src/**',- ignoreDependencies: [- '@types/shell-quote',- ],+ ignoreDependencies: ['@types/shell-quote'],},'packages/cli': {entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],- ignoreDependencies: [- 'yjs',- ],+ ignoreDependencies: ['yjs'],},'packages/desktop': {entry: [diff --git a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts b/packages/app/tests/integration/bug3-source-mode-writeback.test.tsindex 4549c74b3..a50b00123 100644--- a/packages/app/tests/integration/bug3-source-mode-writeback.test.ts+++ b/packages/app/tests/integration/bug3-source-mode-writeback.test.ts@@ -1,4 +1,3 @@-import { readFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts b/packages/app/tests/integration/indented-jsx-byte-sacred.test.tsindex 4fc2c11f9..6fcdc23f2 100644--- a/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts+++ b/packages/app/tests/integration/indented-jsx-byte-sacred.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { normalizeBridge } from '@inkeep/open-knowledge-core';import { updateYFragment } from '@tiptap/y-tiptap';diff --git a/packages/app/tests/integration/interior-edit-freshness.test.ts b/packages/app/tests/integration/interior-edit-freshness.test.tsindex 9f2f6feb6..40b5cdfd6 100644--- a/packages/app/tests/integration/interior-edit-freshness.test.ts+++ b/packages/app/tests/integration/interior-edit-freshness.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts b/packages/app/tests/integration/keystroke-cadence-danger-space.test.tsindex 2a085742b..93666af70 100644--- a/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts+++ b/packages/app/tests/integration/keystroke-cadence-danger-space.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/producer-guard-wiring.test.ts b/packages/app/tests/integration/producer-guard-wiring.test.tsindex 878d5196b..867598d34 100644--- a/packages/app/tests/integration/producer-guard-wiring.test.ts+++ b/packages/app/tests/integration/producer-guard-wiring.test.ts@@ -1,4 +1,3 @@-import { setTimeout as wait } from 'node:timers/promises';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';import { afterAll, beforeAll, describe, expect, test } from 'vitest';diff --git a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.tsindex 4ada3cf26..0970ac12f 100644--- a/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts+++ b/packages/app/tests/integration/qa-039-reconciliation-counters-http.test.ts@@ -1,4 +1,3 @@-import { randomUUID } from 'node:crypto';import { afterEach, describe, expect, test } from 'vitest';import { agentWriteMd, createTestServer, type TestServer } from './test-harness';diff --git a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts b/packages/app/tests/integration/qa-045-restore-after-gc.test.tsindex cbe2b705f..b632185e1 100644--- a/packages/app/tests/integration/qa-045-restore-after-gc.test.ts+++ b/packages/app/tests/integration/qa-045-restore-after-gc.test.ts@@ -1,4 +1,3 @@-import { execFileSync } from 'node:child_process';import { randomUUID } from 'node:crypto';import { join } from 'node:path';diff --git a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.tsindex 89bc9b4d9..c530ce4ba 100644--- a/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts+++ b/packages/app/tests/integration/qa-050-rollback-undo-shipped-path.test.ts@@ -1,4 +1,3 @@-import { randomUUID } from 'node:crypto';import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest';import type * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-after-rollback.test.ts b/packages/app/tests/integration/undo-after-rollback.test.tsindex a78aeb0e4..d3767adc9 100644--- a/packages/app/tests/integration/undo-after-rollback.test.ts+++ b/packages/app/tests/integration/undo-after-rollback.test.ts@@ -1,4 +1,3 @@-import { ROLLBACK_ORIGIN } from '@inkeep/open-knowledge-server';import { afterAll, beforeAll, describe, expect, test } from 'vitest';import * as Y from 'yjs';diff --git a/packages/app/tests/integration/undo-recycle-reset.test.ts b/packages/app/tests/integration/undo-recycle-reset.test.tsindex e7cc69c3f..b076f955c 100644--- a/packages/app/tests/integration/undo-recycle-reset.test.ts+++ b/packages/app/tests/integration/undo-recycle-reset.test.ts@@ -1,4 +1,3 @@-import { writeFileSync } from 'node:fs';import { join } from 'node:path';import { setTimeout as wait } from 'node:timers/promises';diff --git a/packages/app/tests/integration/undo-rederive-survival.test.ts b/packages/app/tests/integration/undo-rederive-survival.test.tsindex 9ddcd0730..7935e35f8 100644--- a/packages/app/tests/integration/undo-rederive-survival.test.ts+++ b/packages/app/tests/integration/undo-rederive-survival.test.ts@@ -1,4 +1,3 @@-import { prependFrontmatter } from '@inkeep/open-knowledge-core';import { Plugin, PluginKey } from '@tiptap/pm/state';import { updateYFragment, yXmlFragmentToProseMirrorRootNode } from '@tiptap/y-tiptap';diff --git a/packages/cli/scripts/assert-bundle-version.mjs b/packages/cli/scripts/assert-bundle-version.mjsnew file mode 100644index 000000000..df977a37f--- /dev/null+++ b/packages/cli/scripts/assert-bundle-version.mjs@@ -0,0 +1,84 @@+import { readdirSync, readFileSync } from 'node:fs';+import { join, relative } from 'node:path';++export const BUNDLE_DIR = 'dist/public';+export const VERSION_KEY = 'VITE_APP_VERSION';+export const RECOVERY_SECTION = 'The four release.yml jobs and their credentials';++const BAKED_VERSION = /\bVITE_APP_VERSION["'`]?\s*:\s*(["'`])([^"'`]*)\1/g;++export function bakedVersions(source) {+ return Array.from(source.matchAll(BAKED_VERSION), (match) => match[2]);+}++export function readBundle(packageDir) {+ const { name, version } = JSON.parse(readFileSync(join(packageDir, 'package.json'), 'utf8'));+ const bundleDir = join(packageDir, BUNDLE_DIR);+ const scripts = readdirSync(bundleDir, { recursive: true, withFileTypes: true })+ .filter((entry) => entry.isFile() && /\.m?js$/.test(entry.name))+ .map((entry) => join(entry.parentPath, entry.name))+ .sort();+ const baked = new Map();+ for (const file of scripts) {+ for (const value of new Set(bakedVersions(readFileSync(file, 'utf8')))) {+ baked.set(value, [...(baked.get(value) ?? []), relative(packageDir, file)]);+ }+ }+ return { name, version, scripts: scripts.length, baked };+}++export function judgeBundle({ name, version, scripts, baked }) {+ if (typeof version !== 'string' || version === '') {+ return [+ `${name ?? 'the package'} has no version in its package.json, so there is nothing to compare ${BUNDLE_DIR} against`,+ ];+ }+ if (scripts === 0) {+ return [+ `${BUNDLE_DIR} holds no scripts, so the app's build output never reached the cli; build the app before the cli copies it`,+ ];+ }+ if (baked.size === 0) {+ return [+ `none of the ${scripts} scripts in ${BUNDLE_DIR} carries a ${VERSION_KEY} literal, so the version its browser bundle reports cannot be checked against ${name}@${version}. If the app build changed how it inlines import.meta.env, teach bakedVersions in packages/cli/scripts/assert-bundle-version.mjs the new form`,+ ];+ }+ return [...baked]+ .filter(([value]) => value !== version)+ .map(+ ([value, files]) =>+ `${BUNDLE_DIR} was built for ${value} (${files.join(', ')}), but this is ${name}@${version}, so its browser bundle would send x-ok-client-runtime ${value}. The app was built before the version override; build it after the override`,+ );+}++function refuse(errors) {+ for (const error of errors) console.log(`::error::bundle-version: ${error}`);+ console.log(+ `::error::bundle-version: nothing was packed. Fix the cause on main, then resume per RELEASES.md '${RECOVERY_SECTION}'.`,+ );+ return 1;+}++export function main(argv = process.argv.slice(2)) {+ const [packageDir, ...rest] = argv;+ if (!packageDir || rest.length > 0) {+ console.log('::error::bundle-version: usage: assert-bundle-version.mjs <package-dir>');+ return 1;+ }+ let bundle;+ try {+ bundle = readBundle(packageDir);+ } catch (error) {+ return refuse([`cannot read ${packageDir}: ${error.message}`]);+ }+ const errors = judgeBundle(bundle);+ if (errors.length > 0) return refuse(errors);+ console.log(+ `bundle-version ok: ${bundle.baked.get(bundle.version).length} of ${bundle.scripts} scripts in ${BUNDLE_DIR} bake ${VERSION_KEY} ${bundle.version}, the version of ${bundle.name}`,+ );+ return 0;+}++if (import.meta.main) {+ process.exitCode = main();+}diff --git a/packages/cli/scripts/assert-bundle-version.test.ts b/packages/cli/scripts/assert-bundle-version.test.tsnew file mode 100644index 000000000..1eb69b2c9--- /dev/null+++ b/packages/cli/scripts/assert-bundle-version.test.ts@@ -0,0 +1,149 @@+import { spawnSync } from 'node:child_process';+import { copyFileSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { dirname, join } from 'node:path';+import { fileURLToPath } from 'node:url';+import { afterEach, describe, expect, it } from 'vitest';+import {+ BUNDLE_DIR,+ bakedVersions,+ judgeBundle,+ RECOVERY_SECTION,+ readBundle,+} from './assert-bundle-version.mjs';++const SCRIPT = fileURLToPath(new URL('./assert-bundle-version.mjs', import.meta.url));+const CLI_ROOT = join(dirname(SCRIPT), '..');+const RECOVERY_LINE = `::error::bundle-version: nothing was packed. Fix the cause on main, then resume per RELEASES.md '${RECOVERY_SECTION}'.`;++const scratches: string[] = [];++afterEach(() => {+ for (const dir of scratches.splice(0)) rmSync(dir, { recursive: true, force: true });+});++function scratch(): string {+ const dir = mkdtempSync(join(tmpdir(), 'ok-bundle-version-'));+ scratches.push(dir);+ return dir;+}++function cliPackage(version: string, chunks: Record<string, string>): string {+ const dir = scratch();+ writeFileSync(+ join(dir, 'package.json'),+ JSON.stringify({ name: '@inkeep/open-knowledge', version }),+ );+ mkdirSync(join(dir, BUNDLE_DIR), { recursive: true });+ for (const [path, source] of Object.entries(chunks)) {+ const file = join(dir, BUNDLE_DIR, path);+ mkdirSync(dirname(file), { recursive: true });+ writeFileSync(file, source);+ }+ return dir;+}++const viteEnv = (version: string) =>+ `({BASE_URL:\`./\`,DEV:!1,MODE:\`production\`,PROD:!0,SSR:!1,VITE_APP_VERSION:\`${version}\`})?.VITE_OTEL_ENABLED`;++function runAlone(packageDir: string) {+ const lone = join(scratch(), 'assert-bundle-version.mjs');+ copyFileSync(SCRIPT, lone);+ return spawnSync(process.execPath, [lone, packageDir], { encoding: 'utf8' });+}++describe('bakedVersions', () => {+ it('reads the version Vite inlines for import.meta.env, in each quoting', () => {+ expect(bakedVersions(viteEnv('0.84.1-beta.7'))).toEqual(['0.84.1-beta.7']);+ expect(bakedVersions('{"VITE_APP_VERSION":"0.84.0"}')).toEqual(['0.84.0']);+ expect(bakedVersions("{VITE_APP_VERSION:'0.84.0'}")).toEqual(['0.84.0']);+ });++ it('ignores other env keys and reads of the variable', () => {+ expect(bakedVersions('({VITE_OTEL_ENABLED:`true`})?.VITE_APP_VERSION??`0.0.0`')).toEqual([]);+ });+});++describe('judgeBundle', () => {+ it('accepts a bundle whose every chunk bakes the version being published', () => {+ const dir = cliPackage('0.83.2', {+ 'assets/index-a.js': viteEnv('0.83.2'),+ 'assets/client-version-b.js': viteEnv('0.83.2'),+ 'assets/vendor-c.js': 'export const x = 1;',+ });+ expect(judgeBundle(readBundle(dir))).toEqual([]);+ });++ it('names each stale version and the chunks that carry it', () => {+ const dir = cliPackage('0.83.2', {+ 'assets/index-a.js': viteEnv('0.83.2'),+ 'assets/client-version-b.js': `${viteEnv('0.82.4')};${viteEnv('0.82.4')}`,+ 'assets/telemetry-impl-c.js': viteEnv('0.82.4'),+ });+ expect(judgeBundle(readBundle(dir))).toEqual([+ `${BUNDLE_DIR} was built for 0.82.4 (${join(BUNDLE_DIR, 'assets/client-version-b.js')}, ${join(BUNDLE_DIR, 'assets/telemetry-impl-c.js')}), but this is @inkeep/[email protected], so its browser bundle would send x-ok-client-runtime 0.82.4. The app was built before the version override; build it after the override`,+ ]);+ });++ it('refuses a bundle that bakes no version, pointing at the reader rather than the build order', () => {+ const dir = cliPackage('0.83.2', { 'assets/index-a.js': 'export const x = 1;' });+ expect(judgeBundle(readBundle(dir))).toEqual([+ `none of the 1 scripts in ${BUNDLE_DIR} carries a VITE_APP_VERSION literal, so the version its browser bundle reports cannot be checked against @inkeep/[email protected]. If the app build changed how it inlines import.meta.env, teach bakedVersions in packages/cli/scripts/assert-bundle-version.mjs the new form`,+ ]);+ });++ it('refuses a bundle directory with no scripts as a missing app build, not a reader gap', () => {+ const dir = cliPackage('0.83.2', { 'index.html': '<!doctype html>' });+ expect(judgeBundle(readBundle(dir))).toEqual([+ `${BUNDLE_DIR} holds no scripts, so the app's build output never reached the cli; build the app before the cli copies it`,+ ]);+ });++ it('refuses a package with no version', () => {+ const dir = cliPackage('', { 'assets/index-a.js': viteEnv('0.83.2') });+ expect(judgeBundle(readBundle(dir))).toEqual([+ `@inkeep/open-knowledge has no version in its package.json, so there is nothing to compare ${BUNDLE_DIR} against`,+ ]);+ });+});++describe('the release step, run from a lone copy as the workflow runs it', () => {+ it('fails the pack when the bundle was built for another version', () => {+ const result = runAlone(+ cliPackage('0.83.2', { 'assets/client-version-b.js': viteEnv('0.82.4') }),+ );+ expect(result.status).toBe(1);+ expect(result.stdout).toContain(+ `::error::bundle-version: ${BUNDLE_DIR} was built for 0.82.4 (${join(BUNDLE_DIR, 'assets/client-version-b.js')}), but this is @inkeep/[email protected]`,+ );+ expect(result.stdout.trimEnd().split('\n').at(-1)).toBe(RECOVERY_LINE);+ });++ it('passes a bundle built for the version being published', () => {+ const result = runAlone(+ cliPackage('0.83.2', { 'assets/client-version-b.js': viteEnv('0.83.2') }),+ );+ expect(result.stdout).toContain(+ `bundle-version ok: 1 of 1 scripts in ${BUNDLE_DIR} bake VITE_APP_VERSION 0.83.2, the version of @inkeep/open-knowledge`,+ );+ expect(result.status).toBe(0);+ });++ it('fails when the package has no built bundle', () => {+ const dir = scratch();+ writeFileSync(+ join(dir, 'package.json'),+ JSON.stringify({ name: '@inkeep/open-knowledge', version: '0.83.2' }),+ );+ const result = runAlone(dir);+ expect(result.status).toBe(1);+ expect(result.stdout).toContain(`::error::bundle-version: cannot read ${dir}`);+ expect(result.stdout.trimEnd().split('\n').at(-1)).toBe(RECOVERY_LINE);+ });+});++describe('the built cli', () => {+ it('bakes its own version into the browser bundle it serves', () => {+ expect(judgeBundle(readBundle(CLI_ROOT))).toEqual([]);+ });+});diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.tsindex 2a597ec3d..f4cc8a286 100644--- a/packages/core/src/bridge/compose.ts+++ b/packages/core/src/bridge/compose.ts@@ -1,4 +1,3 @@-import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.tsindex ffd8fce06..e7e63f43d 100644--- a/packages/core/src/bridge/doc-boundary-space.ts+++ b/packages/core/src/bridge/doc-boundary-space.ts@@ -1,4 +1,3 @@-import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.tsindex fb0ba5a7c..fc267cbea 100644--- a/packages/core/src/markdown/comment-promoter.ts+++ b/packages/core/src/markdown/comment-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.tsindex fa3cfcd86..bfd7e3109 100644--- a/packages/core/src/markdown/merged-walker.ts+++ b/packages/core/src/markdown/merged-walker.ts@@ -1,4 +1,3 @@-import type { Nodes, Parent, Root } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.tsindex 8be632ba4..4d3250d3a 100644--- a/packages/core/src/markdown/safe-url.ts+++ b/packages/core/src/markdown/safe-url.ts@@ -1,4 +1,3 @@-export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');