Skip to content

Fix missing @objectstack/core dependency in examples/basic#453

Merged
hotlong merged 5 commits into
dependabot/npm_and_yarn/types/node-25.0.10from
copilot/update-documentation-for-actions-run
Feb 1, 2026
Merged

Fix missing @objectstack/core dependency in examples/basic#453
hotlong merged 5 commits into
dependabot/npm_and_yarn/types/node-25.0.10from
copilot/update-documentation-for-actions-run

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 1, 2026

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

  • examples/basic/package.json: Added @objectstack/core: workspace:* dependency
  • examples/basic/logger-example.ts: Added type assertion for service registry access to satisfy stricter type checking
// Before: db inferred as unknown, fails TS18046
const db = ctx.getService('db');

// After: explicit type assertion
const db = ctx.getService('db') as { connected: boolean };
Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21498366933/job/61938819139#step:8:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

dependabot Bot and others added 2 commits January 29, 2026 23:23
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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Error Error Feb 1, 2026 3:46am

Request Review

@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/types/node-25.0.10 branch from dd57d39 to 73467e1 Compare February 1, 2026 02:49
…in examples/basic

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review February 1, 2026 02:55
Copilot AI review requested due to automatic review settings February 1, 2026 02:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/node from ^20.x.x to ^25.1.0 across all packages and examples
  • Added missing @objectstack/core dependency to examples/basic/package.json
  • Added type assertion in logger-example.ts to 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 };
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
const db = ctx.getService('db') as { connected: boolean };
const db = ctx.getService<{ connected: boolean }>('db');

Copilot uses AI. Check for mistakes.
Copilot AI changed the title [WIP] Update documentation for actions run Fix missing @objectstack/core dependency in examples/basic Feb 1, 2026
Copilot AI requested a review from hotlong February 1, 2026 02:59
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/types/node-25.0.10 branch from 73467e1 to 5813a7a Compare February 1, 2026 03:05
@dependabot dependabot Bot force-pushed the dependabot/npm_and_yarn/types/node-25.0.10 branch from 5813a7a to 987302a Compare February 1, 2026 03:23
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file size/s labels Feb 1, 2026
@hotlong hotlong merged commit db5cb32 into dependabot/npm_and_yarn/types/node-25.0.10 Feb 1, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants