#83 new utilities#84
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new reusable utilities to @shiftcode/core, including an onInit helper built on Angular signals/effects and an enhancement to logger transport registration.
Changes:
- Export new
onInitutility viapublic-api.ts. - Introduce
onInit()helper + Vitest coverage for effect timing and cleanup behavior. - Extend
withCustomLogTransport()to optionally register viauseExisting.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| libs/core/src/public-api.ts | Re-exports the newly added onInit utility from core’s public API surface. |
| libs/core/src/lib/static-utils/on-init.function.ts | Adds onInit() helper implemented via effect() + untracked() with optional cleanup. |
| libs/core/src/lib/static-utils/on-init.function.spec.ts | Adds tests for single-run behavior and cleanup integration. |
| libs/core/src/lib/logger/with-custom-log-transport.function.ts | Adds useExisting option for multi-provider registration of LogTransport. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds new reusable utilities across @shiftcode/ngx-core and @shiftcode/ngx-components (issue #83), and bumps package versions for the PR release line.
Changes:
- Introduces
onInit()(signal/effect-based init helper) andInputsOf<T>(type-level extraction ofInputSignal/ModelSignalinputs) inngx-core, including unit tests and public exports. - Adds an
ApplyPipeinngx-componentsfor applying one-arg functions in templates (with tests) and exports it via the components public API. - Extends
withCustomLogTransport()to optionally register transports viauseExisting, with a new test, and bumps versions to15.2.0-pr83.0.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/core/src/public-api.ts | Exposes newly added static utilities from the core package. |
| libs/core/src/lib/static-utils/on-init.function.ts | Adds onInit() helper built on Angular signals effects. |
| libs/core/src/lib/static-utils/on-init.function.spec.ts | Verifies onInit() behavior and cleanup via injector destruction. |
| libs/core/src/lib/static-utils/inputs-of.type.ts | Adds InputsOf<T> mapped type for InputSignal/ModelSignal props. |
| libs/core/src/lib/static-utils/inputs-of.type.spec.ts | Type-level tests for InputsOf<T> behavior. |
| libs/core/src/lib/logger/with-custom-log-transport.function.ts | Adds useExisting option for custom log transport registration. |
| libs/core/src/lib/logger/with-custom-log-transport.function.spec.ts | Tests useExisting behavior with singleton reuse. |
| libs/core/package.json | Bumps core package version. |
| libs/components/src/public-api.ts | Exports the new apply pipe from the components package. |
| libs/components/src/lib/apply/apply.pipe.ts | Adds ApplyPipe implementation. |
| libs/components/src/lib/apply/apply.pipe.spec.ts | Adds unit + integration-style tests for ApplyPipe. |
| libs/components/package.json | Bumps components package version. |
| lerna.json | Bumps monorepo version. |
| apps/styleguide/package.json | Bumps styleguide app version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
closes #83