From f2c2a2d3fcc3f1f90ca56dd64db7bc7cf3bb6c8f Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Sat, 20 Jul 2024 22:58:34 +0200 Subject: [PATCH] feat(tools): update check-imports & readme gen --- tools/src/check-imports.ts | 7 ++++++- tools/src/partials/package.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/src/check-imports.ts b/tools/src/check-imports.ts index 41b44c87d0..4145832170 100644 --- a/tools/src/check-imports.ts +++ b/tools/src/check-imports.ts @@ -51,7 +51,12 @@ const updateImports = (root: string, latest = false, exitOnFail = true) => { const pairs: [string, string][] = []; for (let d of mergedDeps) { if (!d.startsWith("@thi.ng")) { - if (d.startsWith("node:") || d.startsWith("bun:") || d === "tslib") + if ( + d.startsWith("@types") || + d.startsWith("node:") || + d.startsWith("bun:") || + d === "tslib" + ) continue; if (deps.has(d) && !pkg.dependencies[d]) { LOGGER.warn("missing 3rd party dependency:", d); diff --git a/tools/src/partials/package.ts b/tools/src/partials/package.ts index 06f3775386..8a63d92e04 100644 --- a/tools/src/partials/package.ts +++ b/tools/src/partials/package.ts @@ -88,7 +88,12 @@ export const packageDeps = (config: Config, pkg: Package) => { const deps = Object.keys(pkg.dependencies || {}) .sort() .map((x) => pkgLink(config, x)); - return deps.length ? list(deps) : "None"; + let res = deps.length ? list(deps) : "None"; + if (pkg.dependencies?.["@thi.ng/api"]) { + res += + "\n\nNote: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)"; + } + return res; }; export const packageStatus = (