Skip to content

chore(core): drop the unused VOS_VERSION constant from compiled output - #80

Merged
hblee12294 merged 1 commit into
mainfrom
chore/drop-dead-vos-version
Aug 10, 2026
Merged

chore(core): drop the unused VOS_VERSION constant from compiled output#80
hblee12294 merged 1 commit into
mainfrom
chore/drop-dead-vos-version

Conversation

@hblee12294

Copy link
Copy Markdown
Member

Every compiled module opened initVos with const VOS_VERSION = <n>; and nothing ever read it — not the runtime, not the bridge, not any consumer. This removes the emit, and with it the version local that existed only to interpolate into it.

The config's version field is untouched and stays load-bearing: it is the discriminator migrateConfig reads to upgrade older configs, and a required field on vosConfigJsonSchema. Only the dead emit goes.

Diff

 export const initVos = async (container, deps) => {
-  const VOS_VERSION = ${version};
   const { THREE, gsap, resolution } = deps;

Verification

  • pnpm build, pnpm typecheck, pnpm lint, pnpm test all pass repo-wide (150 core tests, unchanged from the baseline on main; typecheck matters here because dropping the emit would otherwise leave version unused).
  • Compiled a config against the built package on both tween backends (vos and gsap): VOS_VERSION is absent and the emitted module still parses as valid JS.
  • Confirmed by grep that nothing in this repo referenced the constant.

Compiled output bytes shift by one line for every config, so downstream committed build artifacts want a regenerate on the next engine bump.

Every compiled module opened `initVos` with `const VOS_VERSION = <n>;` and
nothing ever read it — not the runtime, not the bridge, not any consumer.
Removing the emit also retires the `version` local that existed only to
interpolate into it.

The config's `version` field is untouched and still load-bearing: it is the
discriminator `migrateConfig` reads to upgrade older configs, and a required
field on `vosConfigJsonSchema`.
@hblee12294
hblee12294 marked this pull request as ready for review August 10, 2026 06:06
@hblee12294
hblee12294 merged commit bce620d into main Aug 10, 2026
3 checks passed
@hblee12294
hblee12294 deleted the chore/drop-dead-vos-version branch August 10, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant