Skip to content

Commit

Permalink
feat(tools): update check-imports & readme gen
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 20, 2024
1 parent 4c60cfd commit f2c2a2d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tools/src/check-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 6 additions & 1 deletion tools/src/partials/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit f2c2a2d

Please sign in to comment.