Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 15, 2025

Renames ClassSchema to ConstructibleSchema since it validates any constructable function, not just classes.

Changes Made

  • Schema Rename: Changed ClassSchema export to ConstructibleSchema in src/schema.ts
  • Implementation Updates: Updated all imports across assertion implementation files
  • Registry Update: Changed BupkisRegistry registration from 'ClassSchema' to 'ConstructibleSchema'
  • Test Updates: Updated property test assertion IDs to use 'constructibleschema'
  • Documentation: Updated JSDoc comments and descriptions
  • Breaking Change: Completely removed backward compatibility (no deprecated alias) as this is a pre-1.0 library

Testing

  • ✅ All 153+ tests passing including property-based tests
  • ✅ TypeScript compilation passes
  • ✅ Manual verification that ConstructibleSchema imports correctly
  • ✅ Confirmed ClassSchema is no longer exported
  • ✅ "to be a class"/"to be a constructor" assertions working properly

The rename is complete with no backward compatibility. Users must now import ConstructibleSchema instead of ClassSchema.

Fixes #39.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@netlify
Copy link

netlify bot commented Sep 15, 2025

Deploy Preview for bupkis ready!

Name Link
🔨 Latest commit 7ef01ab
🔍 Latest deploy log https://app.netlify.com/projects/bupkis/deploys/68c75c8920af810008ec6701
😎 Deploy Preview https://deploy-preview-47--bupkis.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@boneskull
Copy link
Owner

@copilot be sure to update the documentation. any assertion ID referencing classschema will need to be renamed as well (in tests).

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boneskull
Copy link
Owner

@copilot Do not concern yourself with backwards compatibility; this is a pre-1.0 library.

Co-authored-by: boneskull <924465+boneskull@users.noreply.github.com>
@boneskull
Copy link
Owner

@copilot The commit message is failing the pre-commit check. Execute rm -rf .husky/_/ before committing and try again.

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot Do not concern yourself with backwards compatibility; this is a pre-1.0 library.

Removed all backward compatibility. The deprecated ClassSchema export has been completely removed from src/schema.ts and its documentation section deleted. Users must now use ConstructibleSchema directly.

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot be sure to update the documentation. any assertion ID referencing classschema will need to be renamed as well (in tests).

Updated documentation by removing the deprecated ClassSchema section from site/reference/schemas.md. The assertion IDs in tests were already correctly using 'constructibleschema' (lowercase) which matches the new schema name.

Co-authored-by: boneskull <924465+boneskull@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot The commit message is failing the pre-commit check. Execute rm -rf .husky/_/ before committing and try again.

Executed rm -rf .husky/_/ and applied proper conventional commit format with breaking change notation. The commit message now follows the required format and all tests are passing (630 tests successful).

@boneskull boneskull marked this pull request as ready for review September 15, 2025 03:38
@boneskull
Copy link
Owner

@copilot Please implement

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot Please implement

The ClassSchema to ConstructibleSchema rename has been fully implemented and verified:

Core Implementation:

  • ClassSchema export renamed to ConstructibleSchema in src/schema.ts
  • All imports updated across assertion implementations
  • BupkisRegistry registration updated to 'ConstructibleSchema'

Backward Compatibility Removed (as requested):

  • No deprecated ClassSchema alias export
  • Complete breaking change for pre-1.0 library

Tests & Documentation:

  • Property test assertion IDs updated to use 'constructibleschema'
  • All 153 tests passing including property-based tests
  • Type checking passes successfully

Verification:

  • ConstructibleSchema imports correctly from built library
  • ClassSchema no longer exported (confirmed)
  • "to be a class"/"to be a constructor" assertions working properly

The implementation is complete and ready for use. Users must now import ConstructibleSchema instead of ClassSchema.

Copilot AI changed the title [WIP] Rename ClassSchema to ConstructibleSchema Rename ClassSchema to ConstructibleSchema Sep 15, 2025
@boneskull boneskull merged commit c497a24 into main Sep 15, 2025
14 of 15 checks passed
@boneskull boneskull deleted the copilot/fix-39 branch September 15, 2025 06:58
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.

Rename ClassSchema to ConstructibleSchema

2 participants