From 1da99ad317e3bbd3d25c7f24ca798dc26ccd7832 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 8 Jan 2025 11:55:28 +0000 Subject: [PATCH] Iterate --- .eslintrc.cjs | 1 + index.d.ts | 2 +- node.cjs | 4 ++-- package.json | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e5bc5ed74..447bc0ef9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,6 +1,7 @@ module.exports = { parserOptions: { ecmaVersion: 2020, + sourceType: "module", }, rules: { camelcase: ["error", { properties: "never" }], diff --git a/index.d.ts b/index.d.ts index 20c7dc8b2..4d07fd0f1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -export * from "./pkg/matrix_sdk_crypto_wasm.d"; +export * from "./pkg/matrix_sdk_crypto_wasm.d.ts"; /** * Load the WebAssembly module in the background, if it has not already been loaded. diff --git a/node.cjs b/node.cjs index 190b4fd2e..2e67fb393 100644 --- a/node.cjs +++ b/node.cjs @@ -59,7 +59,7 @@ let initialised = false; * * It will throw if there is an attempt to load the module asynchronously running * - * @returns {typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d")} + * @returns {typeof import("./pkg/matrix_sdk_crypto_wasm_bg.wasm.d", { with: { "resolution-mode": "require" } })} */ function loadModuleSync() { if (modPromise) throw new Error("The WASM module is being loaded asynchronously but hasn't finished"); @@ -80,7 +80,7 @@ function loadModuleSync() { /** * Loads and instantiates the WASM module asynchronously * - * @returns {Promise} + * @returns {Promise} */ async function loadModuleAsync() { const bytes = await readFile(filename); diff --git a/package.json b/package.json index 4ce4ddaa1..9e0a8368d 100644 --- a/package.json +++ b/package.json @@ -38,12 +38,12 @@ } }, "files": [ - "index.mjs", "index.js", - "index-wasm-esm.mjs", + "index.cjs", + "index-wasm-esm.js", "index.d.ts", - "node.mjs", "node.js", + "node.cjs", "pkg/matrix_sdk_crypto_wasm.d.ts", "pkg/matrix_sdk_crypto_wasm_bg.js", "pkg/matrix_sdk_crypto_wasm_bg.cjs",