Skip to content

Conversation

@michaelwittwer
Copy link
Member

@michaelwittwer michaelwittwer commented Jul 25, 2025

This pull request introduces a new standardized Prettier formatting check across all packages and the CI workflow, along with several improvements to type guard utilities in the @shiftcode/utilities package. It also includes version bumps and dependency updates for multiple packages. The most important changes are grouped below.

Prettier Formatting Standardization:

  • Added a prettier:check script to the root package.json and all package-level package.json files, enabling consistent formatting checks for TypeScript files. [1] [2] [3] [4] [5] [6] [7]
  • Updated the CI workflow in .github/workflows/main.yml to run the new Prettier check as part of the build process.

Type Guard Utility Enhancements (@shiftcode/utilities):

  • Added new type guard functions: isArray, isBoolean, isClass, isDate, isDefined, isNumber, and isString in packages/utilities/src/lib/ts-guards/, with corresponding exports and tests. [1] [2] [3] [4] [5] [6] [7] [8] [9]

@michaelwittwer michaelwittwer linked an issue Jul 25, 2025 that may be closed by this pull request
@michaelwittwer michaelwittwer self-assigned this Jul 25, 2025
@michaelwittwer michaelwittwer added pkg: utilities enhancement New feature or request labels Jul 25, 2025
actions-user and others added 3 commits July 25, 2025 08:08
 - @shiftcode/logger@3.0.1-pr53.0
 - @shiftcode/utilities@4.1.0-pr53.0
 - @shiftcode/logger@3.0.1-pr53.1
 - @shiftcode/utilities@4.1.0-pr53.1
@michaelwittwer
Copy link
Member Author

@michaellieberherr you mentioned a ts library once, but I can't remember which one it was. Should we use an existing one or what's your thoughts?

Copy link

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

This PR adds basic TypeScript type guard functions for commonly used type checks including isString, isNumber, isDefined, isDate, isClass, isBoolean, and isArray.

  • Introduces seven new type guard functions with proper TypeScript type predicates
  • Includes comprehensive test coverage for all guard functions
  • Updates package versions and dependencies to support the new functionality

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/utilities/src/lib/ts-guards/*.ts Implementation of type guard functions with TypeScript predicates
packages/utilities/src/lib/ts-guards/*.spec.ts Comprehensive test suites for each type guard function
packages/utilities/src/index.ts Exports for the new type guard functions
packages/utilities/package.json Version bump to include new features
packages/logger/package.json Dependency version updates to match utilities package

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

michaelwittwer and others added 10 commits September 9, 2025 08:22
 - @shiftcode/logger@3.0.1-pr53.2
 - @shiftcode/utilities@4.1.0-pr53.2
 - @shiftcode/logger@3.0.1-pr53.3
 - @shiftcode/utilities@4.1.0-pr53.3
 - @shiftcode/branch-utilities@5.0.1-pr53.0
 - @shiftcode/eslint-config-recommended@5.0.1-pr53.0
 - @shiftcode/eslint-plugin-rules@4.0.1-pr53.0
 - @shiftcode/logger@3.0.1-pr53.4
 - @shiftcode/publish-helper@4.1.1-pr53.0
 - @shiftcode/utilities@4.1.0-pr53.4
@michaelwittwer michaelwittwer marked this pull request as ready for review September 9, 2025 07:09
michaelwittwer and others added 5 commits September 9, 2025 09:20
 - @shiftcode/branch-utilities@5.0.1-pr53.1
 - @shiftcode/eslint-config-recommended@5.0.1-pr53.1
 - @shiftcode/eslint-plugin-rules@4.0.1-pr53.1
 - @shiftcode/logger@3.0.1-pr53.5
 - @shiftcode/publish-helper@4.1.1-pr53.1
 - @shiftcode/utilities@4.1.0-pr53.5
@mumenthalers
Copy link
Contributor

lgtm ❤️

@michaelwittwer michaelwittwer merged commit 30e406b into main Sep 9, 2025
3 checks passed
@michaelwittwer michaelwittwer deleted the #53-basic-ts-guards branch September 9, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pkg: utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[utilities]: add basic ts guards like isString, isNumber, ...

4 participants