Skip to content

Commit

Permalink
Use upgradeDeps to ensure deco deps are being used (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia authored Sep 6, 2024
1 parent 4ba7ed6 commit a0d155e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/update.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export async function* updatedImportMap(
colors.gray(`${importMapPath.replaceAll(Deno.cwd(), ".")}:`),
...msg,
);
const upgradeFound = await upgradeImportMapDeps(
const upgradeFound = await upgradeDeps(
importMap,
logs,
PACKAGES_TO_CHECK,
Expand All @@ -191,9 +191,15 @@ export async function* updatedImportMap(
export async function upgradeDeps(
importMap: ImportMap,
logs = false,
packages?: RegExp,
deps: RegExp = PACKAGES_TO_CHECK,
logger: typeof console["info"] = console.info,
): Promise<boolean> {
let upgradeFound = await upgradeImportMapDeps(importMap, logs, packages);
let upgradeFound = await upgradeImportMapDeps(
importMap,
logs,
deps,
logger,
);
if (!("@deco/deco" in importMap.imports)) {
const { "deco/": _, ...imports } = denoJSON.imports;
for (const [importKey, importValue] of Object.entries(imports)) {
Expand Down

0 comments on commit a0d155e

Please sign in to comment.