Skip to content

fix(commerce-elastic-path): restore EPMultiLocationStock as deprecated (unblocks publish-hostless) - #512

Merged
field123 merged 1 commit into
masterfrom
fix/ep-restore-deprecate-multi-location-stock
Aug 28, 2026
Merged

fix(commerce-elastic-path): restore EPMultiLocationStock as deprecated (unblocks publish-hostless)#512
field123 merged 1 commit into
masterfrom
fix/ep-restore-deprecate-multi-location-stock

Conversation

@field123

Copy link
Copy Markdown
Collaborator

@elasticpath/plasmic-ep-commerce-elastic-path is a published npm package of Elastic
Path commerce components for the Plasmic visual builder. It is also distributed as a
"hostless package" — a Plasmic project that carries the component definitions, refreshed
by a publish-hostless job.

0.5.0 removed EPMultiLocationStock. That makes publish-hostless fail outright:

[error] Hostless package removed components plasmic-commerce-ep-multi-location-stock

A component that disappears from a hostless package's registered set is treated as a
fatal error (server/code-components/code-components.ts asserts, commented "should be a
fatal error anyways"). The only repair path is Studio's client-side prompt to remap or
delete instances, which needs a human in a browser, so a headless publish cannot get past
it. 0.5.0 therefore cannot be published as a hostless bundle at all, and the npm
release is unusable for designers until this lands.

What this does

Restores the registration, marked deprecated:

  • displayName: "EP Multi-Location Stock (deprecated)"
  • description pointing at the replacement — EPStockProvider with EPLocationPicker
    and EPLocationField
  • hideFromContentCreators: true

The component code and its three presentational helpers come back unchanged, so existing
projects using it keep rendering.

Why not just delete it

Components in a hostless package can be deprecated but not removed. Upstream does the
same rather than deleting: Table (deprecated) in antd5, Aria Heading (deprecated)
in react-aria — both hostless packages, both still fully registered.

Checked for alternatives first: no bundle migration has ever removed a code component,
and the error had never occurred in any previous publish-hostless run.

Also

  • plasmicpkgs-dev pin and pnpm-lock.yaml bumped to 0.5.1 — the EP fork integrity test
    requires the pin to equal the workspace version, and --frozen-lockfile requires the
    lockfile to match
  • 0.5.0's changelog entry keeps the removal on record, flagged as reverted here, since
    0.5.0 is already on npm

Follow-up, not in this PR

The deprecated component should not be insertable going forward. hideFromContentCreators
only applies in content-creator mode, and the per-item hidden flag for hostless packages
lives in DEVFLAGS.hostLessComponents, which has no entry for this package. Needs its own
change once the insert path is confirmed.

0.5.0 removed the component outright, which makes publish-hostless fail with
"Hostless package removed components plasmic-commerce-ep-multi-location-stock".
A component missing from a hostless package's registered set is a fatal error
there, and the only repair path is Studio's client-side remap prompt, so a
headless publish cannot get past it — 0.5.0 cannot be published as a hostless
bundle at all.

Components in a hostless package can be deprecated but not removed, which is
what upstream does: "Table (deprecated)" in antd5, "Aria Heading (deprecated)"
in react-aria. The registration comes back with a deprecated displayName, a
description pointing at EPStockProvider + EPLocationPicker + EPLocationField,
and hideFromContentCreators.
@field123
field123 merged commit 3f603a1 into master Aug 28, 2026
9 checks passed
field123 added a commit that referenced this pull request Aug 28, 2026
…loader-bundle-env and the example app (#513)

0.5.1 restores the component whose removal in 0.5.0 makes publish-hostless fail
(#512). The `^0.5.0` ranges already allowed 0.5.1, but all three lockfiles
pinned the resolved version at 0.5.0 and publish-hostless installs with
--frozen-lockfile, so it would have installed 0.5.0 again and failed the same
way. Ranges moved to ^0.5.1 as well, to record the real floor.
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