Skip to content

blocks-cli emits deprecated @decocms/start & @decocms/apps specifiers; no start@6.x → 7.x upgrade path #367

Description

@JonasJesus42

Summary

The @decocms/blocks-cli migration/generator scripts (v7.17.0) still emit deprecated @decocms/start and @decocms/apps import specifiers in several code paths, and there is no upgrade path for sites that were migrated with the pre-split tooling (@decocms/start@6.30.0) to the new 7.x monorepo (@decocms/tanstack + @decocms/blocks + @decocms/blocks-admin + @decocms/apps-*).

Discovered while porting deco-sites/montecarlo-tanstack (migrated on start@6.30.0) to the 7.x packages by hand.

1. blocks-cli still emits legacy specifiers

Inspecting the published @decocms/blocks-cli@7.17.0 tarball:

  • scripts/migrate/transforms/jsx.ts:258,260,306,308 → emit @decocms/start/hooks
  • scripts/migrate/post-cleanup/rules.ts:485 → emits @decocms/start/sdk
  • scripts/migrate/phase-cleanup.ts → emits @decocms/apps/vtex/utils/*, @decocms/apps/vtex/loaders/intelligentSearch/*

@decocms/start is frozen at 6.30.0 and @decocms/apps at 5.4.0; the current line is @decocms/tanstack/@decocms/blocks/@decocms/apps-* @ 7.17.0. New migrations should never emit the frozen packages.

2. No start@6.30.0 → 7.x upgrade path

deco-migrate only goes Fresh→TanStack; a site already migrated on start@6.30.0 has no tooling to move it onto the 7.x split. The mapping we derived by hand (works, dev boots clean):

Old (@decocms/start / @decocms/apps) New
@decocms/start/vite @decocms/tanstack/vite
@decocms/start/routes cmsRouteConfig,cmsHomeRouteConfig @decocms/tanstack (root)
@decocms/start/routes deferredSectionLoader @decocms/tanstack/sdk/deferredSectionLoader
@decocms/start/routes decoMetaRoute/decoRenderRoute/decoInvokeRoute @decocms/tanstack decoMetaRouteConfig()/… (factories)
@decocms/start/hooks DecoPageRenderer,DecoRootLayout,PreviewProviders @decocms/tanstack (root)
@decocms/start/hooks RenderSection @decocms/tanstack SectionRenderer (renamed)
@decocms/start/sdk/workerEntry createDecoWorkerEntry / sdk/router createDecoRouter @decocms/tanstack (root)
@decocms/start/sdk/cookiePassthrough @decocms/tanstack/sdk/cookiePassthrough
@decocms/start/sdk/* (useScript, useDevice, clx, signal, …) @decocms/blocks/sdk/*
@decocms/start/cms @decocms/blocks/cms
@decocms/start/setup @decocms/blocks/setup
@decocms/start/types/widgets @decocms/blocks/types/widgets
@decocms/start/admin @decocms/blocks-admin (root)
@decocms/apps/commerce/* @decocms/apps-commerce/*
@decocms/apps/commerce/components/Image @decocms/blocks/hooks (Image moved here)
@decocms/apps/vtex/* @decocms/apps-vtex/*

Note the symbol renames (decoMetaRoutedecoMetaRouteConfig(), RenderSectionSectionRenderer) and the relocations (Image component moved from apps to @decocms/blocks/hooks; deferredSectionLoader is only at the subpath, not the root barrel) — a pure specifier rewrite is not enough.

Ask

  • Fix blocks-cli to never emit @decocms/start/@decocms/apps.
  • Provide a deco-upgrade-style codemod (start@6.x → 7.x) using the mapping above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions