Bump 2.2.8 - #51
Conversation
📝 WalkthroughWalkthroughThe release updates package and shared version identifiers from 2.2.6 to 2.2.8. The regenerated UMD bundle embeds the new version and changes ChangesRelease and rendering updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Curtains.render
participant renderer
participant PingPongPlane
participant Plane
Curtains.render->>renderer: Disable WebGL blending
Curtains.render->>PingPongPlane: Render with blending disabled
Curtains.render->>renderer: Enable WebGL blending
Curtains.render->>Plane: Render with blending enabled
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Upstream changed three-bundle.js between 2.2.6 and 2.2.8, and the vendored model-renderer.js predated the 2.2.6 tag; without re-vendoring the package ships a 2.2.8 core wired to stale extensions. - re-vendor extensions from unicornstudio.js@v2.2.8 (hash-verified) - regenerate src/shared/sdk-bundle.ts via sync-sdk - add tests asserting package/bundle versions agree with constants - add 2.2.8 changelog entry Refs #51
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/__tests__/constants.test.ts (2)
8-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse default import for JSON modules to ensure strict ESM compatibility.
Standard ECMAScript modules do not support named imports from JSON files. While bundlers like Vite or Webpack often paper over this, it can cause build warnings or runtime failures in strict Node.js ESM environments. Consider using a default import instead.
♻️ Proposed refactor
import { BUNDLED_UNICORN_SDK } from "../shared/sdk-bundle"; -import { version as packageVersion } from "../../package.json"; +import pkg from "../../package.json"; +const { version: packageVersion } = pkg;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/__tests__/constants.test.ts` around lines 8 - 9, Update the package.json import in constants.test.ts to use the JSON module’s default import, then read the version property from that imported object; leave the BUNDLED_UNICORN_SDK import unchanged.
20-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAssert
availablebefore accessingscripts.If
BUNDLED_UNICORN_SDK.scriptshappens to be undefined when the bundle is not available,.find()will throw aTypeErrorbefore theavailableassertion is reached. Checkingavailablefirst clarifies the intent and safeguards against unexpected test crashes.💡 Proposed refactor
it("bundled SDK core matches UNICORN_STUDIO_VERSION", () => { + expect(BUNDLED_UNICORN_SDK.available).toBe(true); const core = BUNDLED_UNICORN_SDK.scripts.find( (script) => script.id === "core", ); - expect(BUNDLED_UNICORN_SDK.available).toBe(true); expect(core?.content).toContain(`"${UNICORN_STUDIO_VERSION}"`); });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/__tests__/constants.test.ts` around lines 20 - 27, Update the “bundled SDK core matches UNICORN_STUDIO_VERSION” test to assert BUNDLED_UNICORN_SDK.available before accessing BUNDLED_UNICORN_SDK.scripts or calling find. Keep the core content assertion unchanged for available bundles.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/__tests__/constants.test.ts`:
- Around line 8-9: Update the package.json import in constants.test.ts to use
the JSON module’s default import, then read the version property from that
imported object; leave the BUNDLED_UNICORN_SDK import unchanged.
- Around line 20-27: Update the “bundled SDK core matches
UNICORN_STUDIO_VERSION” test to assert BUNDLED_UNICORN_SDK.available before
accessing BUNDLED_UNICORN_SDK.scripts or calling find. Keep the core content
assertion unchanged for available bundles.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7004a4ef-3ab4-4549-91f0-307915a08f72
📒 Files selected for processing (5)
CHANGELOG.mdsrc/__tests__/constants.test.tssrc/shared/sdk-bundle.tsvendor/unicornstudio/extensions/model-renderer.jsvendor/unicornstudio/extensions/three-bundle.js



Let's get a new npm release out too, this is to add particle support!
Summary by CodeRabbit