Skip to content

Commit

Permalink
Pin deco version on 1.101.22
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <[email protected]>
  • Loading branch information
mcandeia committed Sep 27, 2024
1 parent a92daaf commit 9af6cd7
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/codemod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ const newJsrPackages = [
"@deco/dev",
];

const LATEST_WORKING_ADMIN_V1_VERSION = "1.101.22";
const pinDecoVersion = denoJSON((json) => {
return {
content: {
...json.content,
imports: {
...json.content.imports,
"@deco/deco": `jsr:@deco/deco@${LATEST_WORKING_ADMIN_V1_VERSION}`,
},
},
};
});

export const runCodeMod = async (context?: CodeModContext): Promise<void> => {
const newImportsPromise: Promise<Record<string, string>> = Promise.all(
newJsrPackages.map((pkg) =>
Expand Down Expand Up @@ -675,7 +688,7 @@ export const runCodeMod = async (context?: CodeModContext): Promise<void> => {
if (isAdminV2) {
return upgradeDecoVersion.apply(txt, ctx);
}
return txt;
return pinDecoVersion.apply(txt, ctx);
},
},
{
Expand Down

0 comments on commit 9af6cd7

Please sign in to comment.