Fix CommonJS package entry extension and test packed consumers - #421
Closed
vanyathecyborg wants to merge 1 commit into
Closed
Fix CommonJS package entry extension and test packed consumers#421vanyathecyborg wants to merge 1 commit into
vanyathecyborg wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
require('@sparkjsdev/spark')resolves todist/spark.cjs.js, but the package declares"type": "module". Node therefore treats CommonJS statements in that file as ES-module code: a real.cjsconsumer fails instead of receiving Spark exports.Emit
spark.cjs/spark.min.cjsand pointmainandexports.requireatspark.cjs. The ESM/CDN filenames stay unchanged. Add annpm packconsumer test that checks actual CommonJS/ESM exports and the existing synchronous WebGL TypeScript API, including a guard against unresolvedanydeclarations. Linux and Windows CI build the package before testing consumers; distribution builds also watch package/build configuration changes.Validation from upstream
722255799e26db7cc41c2649638b0aa5214624c6: WASM build, production/development builds, TypeScript, Biome and the upstream unit test pass locally. Packed consumers pass with Node 22.22.0 and 23.10.0, against Three.js 0.180.0 and pinned 0.185.1. TypeScript consumer validation uses browser bundler resolution. No renderer or performance behavior changes are included, and generated distributions are left to the existing build workflow.Draft until the new Linux/Windows package-consumer checks pass. GitHub currently reports
action_requiredfor both first-contributor workflows; maintainer approval is required before they can run.