Fix missing @objectstack/core dependency in examples/basic#453
Conversation
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.19.30 to 25.0.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 25.0.10 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dd57d39 to
73467e1
Compare
…in examples/basic Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request upgrades the @types/node dependency from version 20.x to 25.1.0 across the entire monorepo and fixes a missing dependency issue in the examples/basic package.
Changes:
- Upgraded
@types/nodefrom^20.x.xto^25.1.0across all packages and examples - Added missing
@objectstack/coredependency toexamples/basic/package.json - Added type assertion in
logger-example.tsto resolve type inference issues
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated root package @types/node to ^25.1.0 |
| packages/spec/package.json | Updated @types/node to ^25.1.0 |
| packages/core/package.json | Updated @types/node to ^25.1.0 |
| packages/cli/package.json | Updated @types/node to ^25.1.0 |
| packages/ai-bridge/package.json | Updated @types/node to ^25.1.0 |
| packages/plugins/plugin-hono-server/package.json | Updated @types/node to ^25.1.0 |
| packages/plugins/plugin-msw/package.json | Updated @types/node to ^25.1.0 |
| apps/docs/package.json | Updated @types/node to ^25.1.0 |
| examples/ai-support/package.json | Updated @types/node to ^25.1.0 |
| examples/basic/package.json | Added @objectstack/core dependency and updated @types/node |
| examples/basic/logger-example.ts | Added type assertion for db service to fix TypeScript compilation |
| pnpm-lock.yaml | Updated lockfile with all dependency version changes and resolution updates |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
|
|
||
| init: async (ctx: PluginContext) => { | ||
| const db = ctx.getService('db'); | ||
| const db = ctx.getService('db') as { connected: boolean }; |
There was a problem hiding this comment.
The type assertion used here bypasses TypeScript's type safety. The getService method is already generic and should be able to infer or accept a type parameter. Consider using the generic parameter instead of type assertion for better type safety.
For example, you could use: const db = ctx.getService<{ connected: boolean }>('db');
This would provide the same type information while maintaining the intent of the generic method and avoiding the use of as which can hide potential runtime errors.
| const db = ctx.getService('db') as { connected: boolean }; | |
| const db = ctx.getService<{ connected: boolean }>('db'); |
73467e1 to
5813a7a
Compare
5813a7a to
987302a
Compare
db5cb32
into
dependabot/npm_and_yarn/types/node-25.0.10
CI build failure in examples/basic after @types/node upgrade. The logger-example.ts imports from @objectstack/core but the dependency wasn't declared, causing TS2307 module resolution errors.
Changes
@objectstack/core: workspace:*dependencyOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.