Replace curp lib with curp-validation#287
Merged
franciscocardoso merged 1 commit intoMay 29, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Swaps the optional peer dependency used by CurpNumberAssert from the curp package to @randyd45/curp-validation, updating the assert implementation, types, README, and lockfile to match. The validation call changes from curp.validar(value) to new CURP(value).isFormatValid().
Changes:
- Replace
curpwith@randyd45/curp-validationinpackage.json(dev / peer / optional peer / meta) andyarn.lock. - Update
src/asserts/curp-number-assert.jsto importCURPand usenew CURP(value).isFormatValid(), and update the "not installed" error string accordingly. - Update the TypeScript declaration
@requirestag and the README dependency table/link to reference the new package.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Replaces curp with @randyd45/curp-validation across devDependencies, peerDependencies, peerDependenciesMeta and optionalPeerDependencies (pinned to 1.0.4). |
| yarn.lock | Removes the curp@^1.3.1 entry and adds the resolved @randyd45/curp-validation@1.0.4 entry. |
| src/asserts/curp-number-assert.js | Switches to the new package's CURP class API and updates the missing-dependency error message. |
| src/types/index.d.ts | Updates the @requires JSDoc tag for curpNumber() to reference the new package name. |
| README.md | Updates the asserts table row and the markdown link reference for the CURP dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6e3bd59 to
f4bae8b
Compare
franciscocardoso
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
curplib withcurp-validation