Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/docs/lib/homepage-i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Supports: en (English), cn (Chinese/中文)
*/

import { SPEC_VERSION } from './version';

export interface HomepageTranslations {
// Hero Section
badge: {
Expand Down Expand Up @@ -86,7 +88,7 @@ export interface HomepageTranslations {
export const en: HomepageTranslations = {
badge: {
status: 'Protocol Specification',
version: 'v0.3.3 (Draft)',
version: SPEC_VERSION,
},
hero: {
title: {
Expand Down Expand Up @@ -157,7 +159,7 @@ export const en: HomepageTranslations = {
export const cn: HomepageTranslations = {
badge: {
status: '协议规范',
version: 'v1.0',
version: SPEC_VERSION,
},
hero: {
title: {
Expand Down
13 changes: 13 additions & 0 deletions apps/docs/lib/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Version utilities
*
* Import the version number from @objectstack/spec package
*/

import specPackage from '../../../packages/spec/package.json';

/**
* The current version of @objectstack/spec
* Computed once at module initialization
*/
export const SPEC_VERSION = `v${specPackage.version}`;
Comment on lines +7 to +13

Copilot AI Jan 27, 2026

Copy link

Choose a reason for hiding this comment

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

Importing packages/spec/package.json via a deep relative path hard-codes the monorepo layout and reaches across package boundaries. Consider switching to reading the installed workspace package (e.g., add @objectstack/spec as a dependency and resolve its package root at runtime/build-time) or exposing a version export from @objectstack/spec, so apps/docs doesn’t depend on ../../../packages/... paths.

Copilot uses AI. Check for mistakes.
Loading