From 8e6debfa873a9a55441a3bfb65e87a3652b26ce2 Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Tue, 27 Feb 2024 15:25:00 +0100 Subject: [PATCH] chore(deps-dev): bump hasha from 5.2.2 to 6.0.0 switch to esm and replace the method name that changed fixes https://github.com/containers/podman-desktop/pull/4776 Signed-off-by: Florent Benoit --- extensions/podman/package.json | 5 +++-- extensions/podman/scripts/download.ts | 4 ++-- extensions/podman/vite.config.js | 2 +- yarn.lock | 19 ++++++++++++------- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/extensions/podman/package.json b/extensions/podman/package.json index ff72da9efae43..675bbcd711933 100644 --- a/extensions/podman/package.json +++ b/extensions/podman/package.json @@ -4,12 +4,13 @@ "description": "Integration for Podman and Podman Machines", "version": "0.0.1", "icon": "icon.png", + "type": "module", "publisher": "podman-desktop", "license": "Apache-2.0", "engines": { "podman-desktop": "^0.0.1" }, - "main": "./dist/extension.js", + "main": "./dist/extension.cjs", "contributes": { "commands": [ { @@ -307,7 +308,7 @@ }, "devDependencies": { "adm-zip": "^0.5.10", - "hasha": "^5.2.2", + "hasha": "^6.0.0", "mkdirp": "^3.0.1", "nock": "^13.5.0", "octokit": "^3.1.2", diff --git a/extensions/podman/scripts/download.ts b/extensions/podman/scripts/download.ts index ab6dc0a81a7c5..0c118c0939e17 100644 --- a/extensions/podman/scripts/download.ts +++ b/extensions/podman/scripts/download.ts @@ -22,7 +22,7 @@ import * as path from 'node:path'; import * as https from 'node:https'; import { Octokit } from 'octokit'; import type { OctokitOptions } from '@octokit/core/dist-types/types'; -import * as hasha from 'hasha'; +import { hashFile } from 'hasha'; import { fileURLToPath } from 'node:url'; import * as tools from '../src/podman.json'; @@ -46,7 +46,7 @@ const octokit = new Octokit(octokitOptions); export {}; async function checkFileSha(filePath: string, shaSum: string): Promise { - const sha256sum: string = await hasha.fromFile(filePath, { algorithm: 'sha256' }); + const sha256sum: string = await hashFile(filePath, { algorithm: 'sha256' }); return sha256sum === shaSum; } diff --git a/extensions/podman/vite.config.js b/extensions/podman/vite.config.js index f4c8ecd71e855..5078ba7fc5d32 100644 --- a/extensions/podman/vite.config.js +++ b/extensions/podman/vite.config.js @@ -47,7 +47,7 @@ const config = { rollupOptions: { external: ['@podman-desktop/api', ...builtinModules.flatMap(p => [p, `node:${p}`])], output: { - entryFileNames: '[name].js', + entryFileNames: '[name].cjs', }, }, emptyOutDir: true, diff --git a/yarn.lock b/yarn.lock index affa9be6e829a..e7abc74372868 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8948,13 +8948,13 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hasha@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" - integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== +hasha@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-6.0.0.tgz#bdf1231ae40b406121c09c13705e5b38c1bb607c" + integrity sha512-MLydoyGp9QJcjlhE5lsLHXYpWayjjWqkavzju2ZWD2tYa1CgmML1K1gWAu22BLFa2eZ0OfvJ/DlfoVjaD54U2Q== dependencies: - is-stream "^2.0.0" - type-fest "^0.8.0" + is-stream "^3.0.0" + type-fest "^4.7.1" hasown@^2.0.0: version "2.0.0" @@ -15501,7 +15501,7 @@ type-fest@^0.6.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== -type-fest@^0.8.0, type-fest@^0.8.1: +type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== @@ -15526,6 +15526,11 @@ type-fest@^3.0.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== +type-fest@^4.7.1: + version "4.10.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.10.3.tgz#ff01cb0a1209f59583d61e1312de9715e7ea4874" + integrity sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"