Skip to content

feat(playground): display json-difference version in header#94

Merged
lukascivil merged 2 commits intomasterfrom
feat/playground-lib-version
Apr 23, 2026
Merged

feat(playground): display json-difference version in header#94
lukascivil merged 2 commits intomasterfrom
feat/playground-lib-version

Conversation

@lukascivil
Copy link
Copy Markdown
Owner

@lukascivil lukascivil commented Apr 23, 2026

Objective

Surface the installed json-difference version directly in the playground UI so visitors can tell which library build they are exercising. Also tighten the playground's Nx/Vite configuration so local dev and nx build behave consistently.

What was done

  • Read the library version at build time in apps/playground/src/App.tsx via import { version as jsonDifferenceVersion } from 'json-difference/package.json' and render it as v{version} below the main heading.
  • Wrapped the heading and version text in a centered Box so the subtitle inherits the layout instead of re-declaring alignment.
  • In apps/playground/project.json, declared outputs: ["{options.outputPath}"] on build, switched outputPath to {projectRoot}/dist, wired serve to buildTarget: playground:build, and dropped the now-redundant defaultConfiguration entries.
  • In apps/playground/vite.config.ts, pinned server/preview to localhost:3000 and allowed the workspace root via searchForWorkspaceRoot(import.meta.dirname) so Vite can resolve json-difference/package.json from the monorepo.

Test plan

  • pnpm nx serve playground and confirm the header shows v<current json-difference version>.
  • pnpm nx build playground completes and emits to apps/playground/dist.
  • pnpm nx preview playground serves the built app on localhost:3000.

@lukascivil lukascivil self-assigned this Apr 23, 2026
@lukascivil lukascivil changed the title refactor: adjust serber feat(playground): display json-difference version in header Apr 23, 2026
@lukascivil lukascivil merged commit c3d48e2 into master Apr 23, 2026
4 checks passed
@lukascivil lukascivil deleted the feat/playground-lib-version branch April 23, 2026 01:37
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