Skip to content

fix(sync-actions): correct Counter literal and pin platform-sdk off latest - #62

Merged
ajimae merged 3 commits into
mainfrom
fix/recurring-orders-counter-type
Sep 24, 2026
Merged

ajimae merged 3 commits into
mainfrom
fix/recurring-orders-counter-type

Conversation

@ajimae

@ajimae ajimae commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Two related commits: the first fixes the red Type checking job, the second removes the root cause that let it go red.

1. Counter literal casing

tsc was failing in packages/sync-actions/test/recurring-orders-sync.spec.ts:

error TS2322: Type '"counter"' is not assignable to type '"Counter"'.  (132,28)
error TS2322: Type '"counter"' is not assignable to type '"Counter"'.  (136,9)

@commercetools/platform-sdk declares the skip-configuration discriminator capitalised:

export interface Counter extends ISkipConfiguration {
  readonly type: 'Counter';
  ...
}

Both occurrences now use 'Counter'.

2. latest → ^9.4.0

packages/sync-actions/package.json carried "@commercetools/platform-sdk": "latest". That descriptor re-resolves on every lockfile refresh and happily crosses major boundaries, which bypasses the dependencyDashboardApproval gate renovate.json applies to major updates. That is how the 8.x → 9.x jump landed unreviewed and broke tsc.

A caret range is consistent with the other two workspaces (^8.9.0) and routes future updates through reviewable Renovate PRs.

The lockfile now resolves to 9.5.0 (the newest match), replacing the previous latest-keyed entry at 9.4.0.

Context

main is currently red for the same reason. Its QA run for b2bfcf7 (33983569258) finished as action_required with 0 jobs and never executed, so nothing caught it. Merging this fixes main, and #61 picks it up through its merge commit.

Verification

Against the resolved 9.5.0:

  • yarn install --immutable → exit 0
  • yarn typecheck → exit 0
  • yarn jest packages/sync-actions → 45 suites, 732 tests, all passing

CI on the first commit was green across all 6 jobs, including both Regression Testing matrix legs.

🤖 Generated with Claude Code

…n type

`@commercetools/platform-sdk` declares the skip configuration
discriminator as the string literal `'Counter'`, but the recurring
orders test used lowercase `'counter'`, failing `tsc` with TS2322.

The breakage surfaced after the dependency bump in b2bfcf7 resolved
`sync-actions`' `"@commercetools/platform-sdk": "latest"` to 9.4.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ajimae
ajimae requested a review from a team as a code owner September 24, 2026 14:14
@changeset-bot

changeset-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ba27b2a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@commercetools/sync-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

`"@commercetools/platform-sdk": "latest"` re-resolved to a new version
on every lockfile refresh, silently crossing major boundaries and
bypassing the `dependencyDashboardApproval` gate Renovate applies to
major updates. That is how the 8.x -> 9.x jump landed unreviewed and
broke `tsc` on main.

A caret range matches the other workspaces (`^8.9.0`) and lets Renovate
manage updates through reviewable PRs.

Lockfile now resolves to 9.5.0; typecheck and the full sync-actions
suite (45 suites, 732 tests) pass against it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ajimae ajimae changed the title fix(sync-actions): use correct Counter literal for skipConfiguration type fix(sync-actions): correct Counter literal and pin platform-sdk off latest Sep 24, 2026
Add a patch changeset so the `latest` -> `^9.4.0` move is recorded in
the published CHANGELOG for @commercetools/sync-actions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ajimae
ajimae merged commit d552b84 into main Sep 24, 2026
8 checks passed
This was referenced Sep 24, 2026
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