Skip to content

Feature/improvements core#17

Merged
hexplus merged 22 commits into
mainfrom
feature/improvements-core
Apr 7, 2026
Merged

Feature/improvements core#17
hexplus merged 22 commits into
mainfrom
feature/improvements-core

Conversation

@hexplus
Copy link
Copy Markdown
Owner

@hexplus hexplus commented Apr 7, 2026

Description

Security hardening from internal audit + new Accessor<T> type for reactive signal getters.

Security fixes:

  • isDev() now defaults to false in browser environments without a build flag (was true), preventing DevTools from being silently active in production builds that don't use the Vite plugin
  • globalStore.dispatch() strips __proto__, constructor, and prototype keys from action patches before merging, preventing prototype pollution via malformed payloads
  • worker() JSDoc now documents CSP incompatibility (blob: URL / fn.toString() pattern) and the eval()-equivalent risk of user-controlled function arguments

New Accessor<T> brand type:

  • All reactive getters (signal, derived, memo, memoFn, writable, array, reactiveArray) now return Accessor<T> instead of plain () => T — zero runtime cost, compile-time phantom brand only
  • NodeChild / NodeChildren explicitly list Accessor<NodeChild> to surface the distinction in IDE hover tooltips
  • Companion eslint-plugin-sibujs ships the no-called-accessor-in-prop rule, which warns when a signal getter is called with () in a prop value position and offers an auto-fix

Related Issue

Closes #

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • I have read CONTRIBUTING.md
  • My code builds without errors
  • I have tested my changes
  • I have updated documentation if needed

hexplus added 22 commits March 28, 2026 15:11
- isDev() defaults to false in production (no __SIBU_DEV__ flag)
- globalStore strips __proto__/constructor/prototype from action patches
- workerFn JSDoc documents CSP/blob-URL incompatibility
- Accessor<T> phantom brand on all reactive getters (signal, derived,
  memo, memoFn, writable, array) — zero runtime cost, better DX hover
- NodeChildren explicitly lists Accessor<NodeChild>
- New sibujs-eslint-plugin: no-called-accessor-in-prop warns when a
  signal getter is called in a prop value position instead of passed directly
@hexplus hexplus merged commit f94b1ff into main Apr 7, 2026
1 check passed
@hexplus hexplus deleted the feature/improvements-core branch April 7, 2026 03:23
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.

1 participant