Skip to content

Bump 2.2.8 - #51

Merged
diegopeixoto merged 3 commits into
mainfrom
bump-2.2.8
Jul 18, 2026
Merged

Bump 2.2.8#51
diegopeixoto merged 3 commits into
mainfrom
bump-2.2.8

Conversation

@GeorgeHastings

@GeorgeHastings GeorgeHastings commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

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

Summary by CodeRabbit

  • Bug Fixes
    • Improved rendering behavior for scenes using overlapping or blended visual elements.
    • Updated bundled resources to ensure they load consistently with the latest release.
  • Release
    • Bumped the package/runtime version to 2.2.8.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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 Curtains.render to disable blending for PingPongPlane instances before re-enabling it for subsequent plane rendering. Tests validate version consistency.

Changes

Release and rendering updates

Layer / File(s) Summary
Version contract and validation
package.json, src/shared/constants.ts, src/__tests__/constants.test.ts
Package metadata and UNICORN_STUDIO_VERSION now use 2.2.8; tests verify the package, shared constant, and bundled SDK version alignment.
Bundle regeneration and blend state
vendor/unicornstudio/unicornStudio.umd.js, vendor/unicornstudio/extensions/model-renderer.js
The regenerated bundle embeds version 2.2.8 and toggles WebGL blending around PingPongPlane and subsequent plane rendering; the extension bundle is reformatted.
Release notes
CHANGELOG.md
The changelog records the 2.2.8 SDK update, particle support, rendering changes, and re-vendored bundles.

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
Loading

Possibly related PRs

Suggested reviewers: diegopeixoto

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: a version bump to 2.2.8.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bump-2.2.8

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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
@sonarqubecloud

Copy link
Copy Markdown

@diegopeixoto
diegopeixoto merged commit ddec8f7 into main Jul 18, 2026
3 of 4 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/__tests__/constants.test.ts (2)

8-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use 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 value

Assert available before accessing scripts.

If BUNDLED_UNICORN_SDK.scripts happens to be undefined when the bundle is not available, .find() will throw a TypeError before the available assertion is reached. Checking available first 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

📥 Commits

Reviewing files that changed from the base of the PR and between 55e7abd and 1859cfa.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • src/__tests__/constants.test.ts
  • src/shared/sdk-bundle.ts
  • vendor/unicornstudio/extensions/model-renderer.js
  • vendor/unicornstudio/extensions/three-bundle.js

@diegopeixoto
diegopeixoto deleted the bump-2.2.8 branch July 18, 2026 15:50
@coderabbitai coderabbitai Bot mentioned this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants