Skip to content

Develop#17

Merged
gabrielrufino merged 6 commits intomainfrom
develop
May 25, 2025
Merged

Develop#17
gabrielrufino merged 6 commits intomainfrom
develop

Conversation

@gabrielrufino
Copy link
Collaborator

No description provided.

@gabrielrufino gabrielrufino self-assigned this May 25, 2025
@gabrielrufino gabrielrufino requested a review from Copilot May 25, 2025 20:27
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 explicit TypeScript typings to the expect helper and updates the package version along with dependency bumps.

  • Annotated expect function parameters and return type
  • Changed RequiredParamError to use param instead of value
  • Bumped package version and updated dependency versions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/expect.ts Added string types to expect signature and fixed error constructor arg
package.json Updated version to 1.1.9 and bumped several dependencies/devDependencies

import { validators } from './validators'

export function expect(value, type) {
export function expect(value: string, type: string): void {
Copy link

Copilot AI May 25, 2025

Choose a reason for hiding this comment

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

Typing type as a plain string loses safety over valid validator keys. Consider using type: keyof typeof validators to restrict to known validator names.

Suggested change
export function expect(value: string, type: string): void {
export function expect(value: string, type: keyof typeof validators): void {

Copilot uses AI. Check for mistakes.
@gabrielrufino gabrielrufino added the bug Something isn't working label May 25, 2025
@gabrielrufino gabrielrufino requested a review from Copilot May 25, 2025 20:29
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 explicit TypeScript annotations to the expect helper, refines the error thrown for missing parameters, and updates package and dev-dependency versions.

  • Add string type annotations and a return type to expect()
  • Improve RequiredParamError to reference the parameter name
  • Bump package version and dependency versions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/expect.ts Typed the expect parameters and return type; updated error to use param instead of the missing value
package.json Version bumped to 1.1.10; updated @actions/github, ESLint, and TypeScript

@gabrielrufino gabrielrufino merged commit 939bf99 into main May 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants