From 729e669ec8acb635515f9e6518602940950e531e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 16 Sep 2020 18:20:39 +0200 Subject: [PATCH] add aes-js dep --- package.json | 1 + scripts/post-install.mjs | 7 +++++++ yarn.lock | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/package.json b/package.json index 7faaea2c..a142e22a 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "xxhashjs": "^0.2.2" }, "dependencies": { + "aes-js": "^3.1.2", "another-json": "^0.2.0", "bs58": "^4.0.1", "olm": "https://packages.matrix.org/npm/olm/olm-3.1.4.tgz" diff --git a/scripts/post-install.mjs b/scripts/post-install.mjs index 16332c5d..43177fd6 100644 --- a/scripts/post-install.mjs +++ b/scripts/post-install.mjs @@ -81,6 +81,13 @@ async function populateLib() { path.join(modulesDir, 'bs58/index.js'), path.join(libDir, "bs58/index.js") ); + // transpile aesjs to esm + await fs.mkdir(path.join(libDir, "aes-js/")); + await commonjsToESM( + path.join(modulesDir, 'aes-js/index.js'), + path.join(libDir, "aes-js/index.js") + ); + } populateLib(); diff --git a/yarn.lock b/yarn.lock index 89891ce7..84e4b366 100644 --- a/yarn.lock +++ b/yarn.lock @@ -907,6 +907,11 @@ dependencies: "@types/node" "*" +aes-js@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + another-json@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/another-json/-/another-json-0.2.0.tgz#b5f4019c973b6dd5c6506a2d93469cb6d32aeedc"