Skip to content

fix(deps): update dependency @harperfast/schema-codegen to v2 - #132

Merged
dawsontoth merged 1 commit into
mainfrom
renovate/harperfast-schema-codegen-2.x
Aug 11, 2026
Merged

fix(deps): update dependency @harperfast/schema-codegen to v2#132
dawsontoth merged 1 commit into
mainfrom
renovate/harperfast-schema-codegen-2.x

Conversation

@renovate

@renovate renovate Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@harperfast/schema-codegen (source) ^1.0.10^2.0.0 age confidence

Release Notes

HarperFast/schema-codegen (@​harperfast/schema-codegen)

v2.0.0

Compare Source

⚠ BREAKING CHANGES
  • the generated module augmentation now targets harper by
    default instead of harperdb. Harper 4.x applications that import from
    harperdb must set module: harperdb in their schema-codegen config.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Features
  • sanitize database names, augment 'harper', and scope codegen by database (b378586), closes #​29
Bug Fixes
  • coerce numeric database filter patterns to strings (d152a54)

Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • "before 9am on Monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner August 10, 2026 05:03
@dawsontoth
dawsontoth merged commit 115f6ae into main Aug 11, 2026
36 checks passed
@dawsontoth
dawsontoth deleted the renovate/harperfast-schema-codegen-2.x branch August 11, 2026 11:30
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.11.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dawsontoth dawsontoth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved — and this one quietly fixes the TS templates

All 34 checks green (every template × npm/pnpm/yarn generate job). The bump is @harperfast/schema-codegen ^1.0.10 -> ^2.0.0 across all 11 templates.

I diffed the v1.1.4 and v2.0.0 tarballs to find what the major actually is. It's the new module option:

module — default harper — The runtime package to augment. Harper 5.x apps import from harper; set this to harperdb for Harper 4.x apps.

v1 hardcoded harperdb in the generated declaration file:

// v1 utils/generateTablesDTS.js
content += `import type { Table } from 'harperdb';\n`;
content += `declare module 'harperdb' {\n`;

v2 parameterizes it and defaults to harper:

// v2
export function generateTablesDTS(globalTypesPath, schemaTypesPath, tables, moduleName = 'harper') {
	content += `import type { Table } from '${moduleName}';\n`;
	content += `declare module '${moduleName}' {\n`;

These templates are Harper 5.xtemplate-react-ts/README.md:40 documents import { type RecordObject, type RequestTargetOrId, Resource } from 'harper'. So under v1, the five templates that emit globalTypes (react-ts, react-ts-ssr, vanilla-ts, vue-ts, vue-ts-ssr) were generating declare module 'harperdb' — augmenting a module the scaffolded app never imports, leaving tables untyped for the user. v2's default corrects that. Worth calling out since it reads like a routine major but is actually a latent-bug fix.

The other six templates use jsdoc: output, where module is never consulted (regenerateAll only passes moduleName into generateTablesDTS, guarded by if (globalTypes)), so they're unaffected either way.

The one other v2 change touching the jsdoc path is cosmetic: the database-name prefix on generated type names now runs through toIdentifier(), so a database like metrics-github yields metricsGithub_ instead of the invalid metrics-github_. Only affects non-default database names that aren't valid identifiers.

Package has no dependencies, peers, or engines in either version, so there's no tree churn to worry about — unlike the @harperfast/oauth v2 situation.

Related: I approved the same bump in central-manager (#608), where the module default does not apply because CM only uses jsdoc: — CM would need an explicit module: harperdb if it ever adds globalTypes, since it's still a Harper 4.x app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant