Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

@clearcms/create@0.4.0

Choose a tag to compare

@github-actions github-actions released this 07 May 04:23
a0fa1bd

Minor Changes

  • 505a71a Thanks @slavasolutions! - Fix scaffolded projects so a fresh npx @clearcms/create actually works.

    Bundles four bugs surfaced by adopter testers on v0.4.0:

    • #86 — admin pin out-of-range. @clearcms/create@0.3.0 substituted
      __CLEAR_VERSION__ to ^0.3.0, but no @clearcms/admin@0.3.x was
      ever published to npm (v0.3 was skipped via the v0.4 fat train). Stock
      pnpm install failed with ERR_PNPM_NO_MATCHING_VERSION. This minor
      bump lifts @clearcms/create to the 0.4.x line, so the
      __CLEAR_VERSION__ substitution emits ^0.4.0 — which resolves to
      @clearcms/admin@0.4.1 and onward.
    • #90 — pnpm 10 silent build-script skip. Added
      pnpm.onlyBuiltDependencies: ["esbuild", "sharp"] to the scaffold's
      package.json. Without this, pnpm 10 prints
      Run "pnpm approve-builds" and skips sharp's native binding —
      silently degrading admin's image-transform path to JS. Pre-approving
      these two specifically keeps the scaffold strict (no arbitrary
      postinstall scripts) but unblocks the two builds we need.
    • #92pnpm typecheck failed against REST backend.
      pnpm typecheck ran astro check without CLEAR_BACKEND=fs, so the
      loaders defaulted to REST and tried to fetch /api/v1/pages while
      the admin wasn't running. Mirrored pnpm build's cross-env prefix.
    • #93 — scaffold templates failed their own typecheck. Two distinct
      TS errors:
      1. src/layouts/Base.astro accessed item.kind and item.href on a
        NavNode discriminated union without proper narrowing. Switched
        to 'kind' in item for narrowing + defensive 'href' in child
        for nested children.
      2. src/pages/preview.astro passed description={description} where
        description could be undefined. Astro 6's
        exactOptionalPropertyTypes: true rejects explicit-undefined for
        optional props. Switched to a conditional spread:
        {...(description !== undefined ? { description } : {})}.

    After this lands, a stock npx @clearcms/create my-site && cd my-site && pnpm install && pnpm dev
    boots admin + site cleanly on a fresh machine, and pnpm typecheck returns 0 errors.