fix(deps): update dependency @harperfast/schema-codegen to v2 - #132
Conversation
|
🎉 This PR is included in version 1.11.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
dawsontoth
left a comment
There was a problem hiding this comment.
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— defaultharper— The runtime package to augment. Harper 5.x apps import fromharper; set this toharperdbfor 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.x — template-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.
This PR contains the following updates:
^1.0.10→^2.0.0Release Notes
HarperFast/schema-codegen (@harperfast/schema-codegen)
v2.0.0Compare Source
⚠ BREAKING CHANGES
harperbydefault instead of
harperdb. Harper 4.x applications that import fromharperdbmust setmodule: harperdbin their schema-codegen config.Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Features
Bug Fixes
Configuration
📅 Schedule: (in timezone America/New_York)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.