Skip to content

For Alpha 13#40

Merged
baxyz merged 7 commits intomainfrom
for-alpha-13
Apr 15, 2026
Merged

For Alpha 13#40
baxyz merged 7 commits intomainfrom
for-alpha-13

Conversation

@baxyz
Copy link
Copy Markdown
Contributor

@baxyz baxyz commented Apr 14, 2026

  • integrate benchmarking in CI workflow
  • create benchmark files for string and array helpers
  • update documentation for benchmarking commands

Description

Please include a summary of what this PR does and why it's needed.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring
  • Test improvement

Related Issues

Closes #(issue number)

How Has This Been Tested?

Describe the tests you ran and how to reproduce them:

  • Test A
  • Test B

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly
  • I have added tests for my changes
  • All new and existing tests passed locally
  • My commits follow the conventional commit format

Screenshots (if applicable)

Add screenshots for UI changes.

Additional Context

Add any other context about the PR here.

- integrate benchmarking in CI workflow
- create benchmark files for string and array helpers
- update documentation for benchmarking commands
Copilot AI review requested due to automatic review settings April 14, 2026 21:39
Comment thread .github/workflows/job-bench.yml Fixed
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

This PR introduces Vitest Bench benchmarking support to the project and CI, adds benchmark suites for a range of helpers, and updates docs/scripts to run benchmarks locally and in PR validation.

Changes:

  • Add pnpm bench / pnpm bench:watch scripts and wire benchmark file discovery into Vitest config.
  • Add a non-blocking “bench” job to PR validation via a reusable GitHub Actions workflow that runs benchmarks and reports results.
  • Add new *.bench.ts files across URL/string/array/object/function helpers and remove the radashi dependency previously used by some benches.

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vitest.config.ts Adds benchmark include pattern to Vitest configuration.
pnpm-lock.yaml Removes radashi from the lockfile.
package.json Adds benchmark scripts; removes radashi dependency.
helpers/url/withoutTrailingSlash.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/url/withoutLeadingSlash.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/url/withTrailingSlash.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/url/withLeadingSlash.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/url/relativeURLToAbsolute.bench.ts Adds benchmark coverage for relative→absolute URL helper.
helpers/url/onlyPath.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/url/extractPureURI.bench.ts Adds benchmark coverage for URI extraction helper.
helpers/url/cleanPath.bench.ts Switches benchmark to use local helper + Vitest bench APIs.
helpers/string/titleCase.bench.ts Adds benchmark coverage for title casing helper.
helpers/string/snakeCase.bench.ts Adds benchmark coverage for snake_case helper.
helpers/string/slugify.bench.ts Adds benchmark coverage for slugify helper.
helpers/string/pascalCase.bench.ts Adds benchmark coverage for PascalCase helper.
helpers/string/kebabCase.bench.ts Adds benchmark coverage for kebab-case helper.
helpers/string/camelCase.bench.ts Adds benchmark coverage for camelCase helper.
helpers/object/deepMerge.bench.ts Adds benchmark coverage for deep merge helper.
helpers/object/deepCompare.bench.ts Adds benchmark coverage for deep compare helper.
helpers/object/deepClone.bench.ts Adds benchmark coverage for deep clone helper.
helpers/function/memoize.bench.ts Adds benchmark coverage for memoize helper.
helpers/array/unique.bench.ts Adds benchmark coverage for unique helper.
helpers/array/sort.bench.ts Adds benchmark coverage for sort helper functions.
helpers/array/intersection.bench.ts Adds benchmark coverage for intersection helper.
helpers/array/difference.bench.ts Adds benchmark coverage for difference helper.
helpers/array/deepEquals.bench.ts Adds benchmark coverage for deep array equality helper.
AGENTS.md Documents benchmark commands and non-blocking intent.
.github/workflows/pr-validation.yml Adds bench job and PR comment section reporting benchmark status.
.github/workflows/job-bench.yml New reusable workflow that runs benchmarks and extracts summary outputs.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vitest.config.ts
Comment thread .github/workflows/job-bench.yml Outdated
Comment thread .github/workflows/job-bench.yml
Comment thread .github/workflows/job-bench.yml Outdated
baxyz added 5 commits April 15, 2026 21:22
…xtraction

- change summary description to reflect benchmarked suites
- ensure total suites extraction handles errors gracefully
- delete isNotNullish function and its tests
- update returnOrThrowError to use isNullish
- add isTruthy function and its examples/tests
- add isIterable to check for iterable objects
- add isMap to check for Map instances
- add isNegativeNumber to check for negative numbers
- add isNonEmptyArray to check for non-empty arrays
- add isNonEmptyString to check for non-empty strings
- add isNull to check for null values
- add isNumber to check for valid numbers
- add isPlainObject to check for plain objects
- add isPositiveNumber to check for positive numbers
- add isPrimitive to check for primitive types
- add isPromise to check for promise-like objects
- add isRegExp to check for RegExp instances
- add isString to check for string values
- add isSymbol to check for symbol values
- add isTimestamp to check for valid timestamps
- add isUndefined to check for undefined values
- add isValidDate to check for valid Date instances
- add isValidRegex to check for valid regex patterns
- add tests for all new helpers
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

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread helpers/type/isPromise.ts Outdated
Comment thread .github/workflows/pr-validation.yml
@baxyz baxyz merged commit 9e4e890 into main Apr 15, 2026
3 checks passed
@baxyz baxyz deleted the for-alpha-13 branch April 15, 2026 21:13
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.

3 participants