From 049394d7dc8be8884b8d4ffc09c71b81f1ca40d7 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Thu, 28 May 2026 14:17:42 -0400 Subject: [PATCH] fix: revert type:module to restore WASM compatibility (2.0.1 patch) --- CHANGELOG.md | 5 +++++ package.json | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae0dc4a..5e559a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.0.1] - 2026-05-28 + +### Fixed +- Reverted `"type": "module"` addition that broke WASM module loading. Emscripten's `createSpaModule` factory uses CJS output conventions; adding `"type": "module"` made Node.js parse `wasm/spa-module.js` as ESM, causing `createSpaModule is not a function`. The package already ships proper `.mjs` and `.cjs` dist files via the exports map, so the package-level `type` field is not needed. A full ESM-native WASM build is planned for a future major version. + ## [2.0.0] - 2026-05-28 ### Added diff --git a/package.json b/package.json index 499a1f8..9f9b661 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "solar-spa", - "version": "2.0.0", + "version": "2.0.1", "description": "NREL Solar Position Algorithm (SPA) compiled to WebAssembly. High-performance solar position, sunrise, sunset, and solar noon calculations.", "author": "Aric Camarata", "license": "MIT", @@ -79,6 +79,5 @@ "typescript": "^5.9.3", "typescript-eslint": "^8.56.1" }, - "type": "module", "packageManager": "pnpm@10.11.1" }