Test helper getfind codemod

The deprecated get function was removed from PlumaTestHelpers in v3. This codemod rewrites get calls to find:

// Before
import { PlumaTestHelpers } from '@customerio/pluma-components/react/test-helpers/pluma-test-helpers';
const button = PlumaTestHelpers.get('Button', container);

// After
const button = PlumaTestHelpers.find('Button', container);

get and find take the same arguments (component, optional container, optional options) and perform the same container-scoped lookup, so the rename is behavior-preserving in the common case.

Running it

Run it through the Pluma CLI from inside your consuming app. Always start with a dry run to review the diff and the review notes before applying:

# from the root of your consuming app

# Dry run first (no writes; per-file diff + review notes printed inline)
pnx @customerio/pluma-cli@latest upgrade --codemod test-helper-get-rename react --dry ./src
pnx @customerio/pluma-cli@latest upgrade --codemod test-helper-get-rename ember --dry ./tests

# Then apply for real
pnx @customerio/pluma-cli@latest upgrade --codemod test-helper-get-rename react ./src
pnx @customerio/pluma-cli@latest upgrade --codemod test-helper-get-rename ember ./tests

Both frameworks accept --dry / -d. The React path also forwards standard jscodeshift flags.

What gets matched

React. The get member of a PlumaTestHelpers binding imported from a Pluma test-helpers module (the import source contains both pluma-components and test-helpers, e.g. @customerio/pluma-components/react/test-helpers/pluma-test-helpers). The transform follows the local name, so an aliased import (import { PlumaTestHelpers as TH } from …) still migrates TH.get(…). An unrelated .get(…) — a Map, a store, your own object — is left alone because it isn't the PlumaTestHelpers binding.

Ember. PlumaTestHelpers.get(…) calls in .gts/.gjs and classic .ts/.js test files (.hbs is walked too but never contains these calls). Test-helper calls are plain JS — they never appear inside a <template> — and PlumaTestHelpers.get is a token unique enough not to collide with anything a consumer owns, so the Ember transform is a formatting-preserving textual rename (the same approach as the primitive rename).

Working on the codemod itself

The React transform is a bespoke jscodeshift transform; the Ember transform is a textual rename that reuses the shared CLI runner under ../../_shared/. There's a test suite under tests/:

pnpm --filter @customerio/pluma-cli run test:transforms

It uses Node's built-in test runner (node --test).