Add Angular framework adapter to core#104
Conversation
|
@sonukapoor is attempting to deploy a commit to the Open Circle Team on Vercel. A member of the Team first needs to authorize it. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR adds Angular as a supported framework to the core package. The change extends the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
0b74f86 to
217995f
Compare
There was a problem hiding this comment.
Pull request overview
Adds first-class Angular support to @formisch/core by introducing an Angular framework adapter and exposing it as @formisch/core/angular.
Changes:
- Added
packages/core/src/framework/index.angular.tsimplementing Formisch’s framework adapter using Angularsignal()anduntracked(). - Extended the core
Frameworkunion type to include'angular'. - Exposed the new Angular entrypoint via
packages/core/package.jsonexports and added@angular/coreas an optional peer dependency (plus devDependency for local builds).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds @angular/core to the lockfile for core package development. |
| packages/core/src/framework/index.ts | Extends the Framework union with 'angular'. |
| packages/core/src/framework/index.angular.ts | New Angular adapter wiring Angular signals to Formisch’s framework interface. |
| packages/core/package.json | Exposes ./angular entrypoint and adds Angular dependency metadata. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@packages/core/package.json`:
- Line 75: The peerDependency range for "`@angular/core`" is too restrictive
(currently "^17.0.0") and conflicts with the devDependency using "^21.0.0";
update the "peerDependencies" entry for "`@angular/core`" to a broader range that
covers supported Angular versions (for example ">=17.0.0 <22.0.0" or a caret
range like "^17 || ^18 || ^19 || ^20 || ^21") so peer resolution won't warn for
Angular 18+; ensure the change is applied to the "peerDependencies" block and
keep the devDependency for "`@angular/core`" at "^21.0.0" if you need that for
local testing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3edae2e9-318a-4c37-ac28-efb6424cc3cf
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
packages/core/package.jsonpackages/core/src/framework/index.angular.tspackages/core/src/framework/index.ts
| * | ||
| * @returns The created signal. | ||
| */ | ||
| export function createSignal<T>(): Signal<T | undefined>; |
There was a problem hiding this comment.
I don't think we need the "without an initial value" variant. I would keep it similar to the SolidJS implementation.
| * | ||
| * @returns The return value of the function. | ||
| */ | ||
| export function untrack<T>(fn: () => T): T { |
There was a problem hiding this comment.
Can you try changing that to export { untracked as untrack } from '@angular/core'? I would prefer it if it does not break the types. See the other frameworks for reference.
fa219e9 to
edcd736
Compare
Wires Angular signals (WritableSignal, untracked) to the Formisch framework interface. Adds @angular/core as optional peer dep and exports @formisch/core/angular. Closes open-circle#103
- Add angular build entry to tsdown.config.ts so dist/index.angular.* is emitted and @angular/core is treated as external - Widen peer dep range from ^17.0.0 to >=17.0.0 to cover Angular 18+ - Explicitly type the createSignal setter parameter as T | undefined - Fix Signal import path after upstream type reorganization
Use non-generic implementation signature to align with the pattern in index.ts and avoid overload-compatibility errors.
Aligns with the SolidJS adapter pattern: createSignal takes a required initial value, and untrack is a direct re-export rather than a wrapper.
edcd736 to
5f7097f
Compare
Adds the Angular framework adapter to core. The adapter wires Angular's
WritableSignalanduntracked()to Formisch's framework interface -createSignalwrapsWritableSignal<T>with a{ value }getter/setter to match theSignal<T>contract,batchis a no-op since Angular's scheduler coalesces writes automatically, anduntrackdelegates tountracked()from@angular/core.Also adds
'angular'to theFrameworktype, exports@formisch/core/angular, and adds@angular/coreas an optional peer dependency (>=17, where signals are stable).This is the foundation for the upcoming
frameworks/angularpackage.