Skip to content

Commit 5ccdb15

Browse files
felixtrzmeta-codesync[bot]
authored andcommitted
chore(release): bump version to 0.2.1 and make docs version dynamic
Summary: This commit bumps all package versions from 0.2.0 to 0.2.1 across the monorepo. The main change is in the VitePress documentation config, which previously had a hardcoded version string (v0.1.0 that was already outdated). It now dynamically reads the version from packages/core/package.json at build time via a new loadVersion() function, ensuring the docs always display the correct version. The function includes error handling that will fail the build with a clear message if the package.json is missing or lacks a version field, rather than silently falling back to an incorrect value. Reviewed By: zjm-meta Differential Revision: D87456203 Privacy Context Container: L1334777 fbshipit-source-id: 91e15a6e8748ce5ee78f3956926746e53cedb12c
1 parent 9a19553 commit 5ccdb15

11 files changed

Lines changed: 23 additions & 11 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ function loadTypedocSidebar() {
1919
return [];
2020
}
2121

22+
function loadVersion() {
23+
const p = path.resolve(__dirname, '../../packages/core/package.json');
24+
if (!fs.existsSync(p)) {
25+
throw new Error(`Failed to load version: ${p} does not exist`);
26+
}
27+
const pkg = JSON.parse(fs.readFileSync(p, 'utf8'));
28+
if (!pkg.version) {
29+
throw new Error(`Failed to load version: no version field in ${p}`);
30+
}
31+
return `v${pkg.version}`;
32+
}
33+
2234
export default defineConfig({
2335
// Build static site even if some cross-package API links are unresolved in early builds
2436
ignoreDeadLinks: true,
@@ -57,7 +69,7 @@ gtag('config', 'G-V03QDNGKY3');`,
5769
{ text: 'Concepts', link: '/concepts/' },
5870
{ text: 'API', link: '/api/' },
5971
{
60-
text: `v0.1.0`,
72+
text: loadVersion(),
6173
items: [
6274
{ text: 'NPM', link: 'https://www.npmjs.com/package/@iwsdk/core' },
6375
{

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/core",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Javascript WebXR Runtime for Emulation",
55
"type": "module",
66
"main": "dist/index.js",

packages/create/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/create",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Interactive CLI to scaffold Immersive Web SDK starter apps",
55
"type": "module",
66
"private": false,

packages/glxf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/glxf",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "GLXF (GLTF eXtended Format) loader for Three.js - composite scene format for WebXR applications",
55
"type": "module",
66
"main": "dist/index.js",

packages/locomotor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/locomotor",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Locomotion engine for WebXR applications - physics-based movement, teleportation, and collision detection for Three.js",
55
"type": "module",
66
"main": "dist/index.js",

packages/starter-assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/starter-assets",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "CDN-ready assets and recipes for IWSDK starters (VR/AR manual & metaspatial).",
55
"type": "module",
66
"files": [

packages/vite-plugin-gltf-optimizer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/vite-plugin-gltf-optimizer",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"type": "module",
55
"description": "Vite plugin for GLTF/GLB optimization during build using gltf-transform",
66
"main": "dist/index.js",

packages/vite-plugin-iwer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/vite-plugin-iwer",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"type": "module",
55
"description": "Vite plugin for WebXR emulation runtime injection using IWER",
66
"main": "dist/index.js",

packages/vite-plugin-metaspatial/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/vite-plugin-metaspatial",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"type": "module",
55
"description": "Vite plugins for Meta Spatial SDK integration: component discovery & GLXF generation",
66
"main": "dist/index.js",

packages/vite-plugin-uikitml/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@iwsdk/vite-plugin-uikitml",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"type": "module",
55
"description": "Vite plugin for compiling UIKitML files to JSON",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)