Skip to content

#83 new utilities#84

Merged
mumenthalers merged 7 commits intomainfrom
#83-new-utilities
Apr 30, 2026
Merged

#83 new utilities#84
mumenthalers merged 7 commits intomainfrom
#83-new-utilities

Conversation

@mumenthalers
Copy link
Copy Markdown
Contributor

closes #83

Copilot AI review requested due to automatic review settings April 30, 2026 07:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 onInit utility via public-api.ts.
  • Introduce onInit() helper + Vitest coverage for effect timing and cleanup behavior.
  • Extend withCustomLogTransport() to optionally register via useExisting.

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.

Comment thread libs/core/src/lib/logger/with-custom-log-transport.function.ts
Comment thread libs/core/src/lib/static-utils/on-init.function.ts Outdated
Comment thread libs/core/src/lib/static-utils/on-init.function.ts Outdated
Comment thread libs/core/src/lib/static-utils/on-init.function.spec.ts Outdated
Comment thread libs/core/src/lib/static-utils/on-init.function.spec.ts
Comment thread libs/core/src/lib/logger/with-custom-log-transport.function.ts Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) and InputsOf<T> (type-level extraction of InputSignal/ModelSignal inputs) in ngx-core, including unit tests and public exports.
  • Adds an ApplyPipe in ngx-components for applying one-arg functions in templates (with tests) and exports it via the components public API.
  • Extends withCustomLogTransport() to optionally register transports via useExisting, with a new test, and bumps versions to 15.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.

Comment thread libs/components/src/lib/apply/apply.pipe.spec.ts
Comment thread libs/components/src/lib/apply/apply.pipe.ts
@mumenthalers mumenthalers merged commit a3f4e72 into main Apr 30, 2026
2 checks passed
@mumenthalers mumenthalers deleted the #83-new-utilities branch April 30, 2026 08:42
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.

Add new utilities

4 participants