migrate-codeceptjs-4

Installation
SKILL.md

Migrate CodeceptJS 3.x → 4.x

CodeceptJS 4 is ESM-only and TypeScript-first. There is no compatibility shim for CommonJS — every helper, page object, custom step, and config file must be ESM. This skill drives a project through the upgrade end-to-end.

The authoritative reference is node_modules/codeceptjs/docs/migration-4.md (after npm install codeceptjs@4). Read it once; this skill orchestrates the work and surfaces the parts agents miss.

When to trigger

Detect before acting. Look for any of:

  • package.json lists "codeceptjs": "^3" / "3.x", or has no "type": "module".
  • Tests, page objects, helpers, or config use require() / module.exports against CodeceptJS.
  • Config still references removed helpers (Nightmare, Protractor, TestCafe, AI, SoftExpectHelper, Mochawesome) or removed plugins (autoLogin, tryTo, retryTo, eachElement, commentStep, fakerTransform, enhancedRetryFailedStep, allure, htmlReporter, wdio, selenoid, screenshotOnFail, pauseOnFail, stepByStepReport).
  • 3.x APIs: ai.request, Joi schemas in seeResponseMatchesJsonSchema, restart: 'browser', I.retry(), I.limitTime(), Playwright customLocators, I.softExpect* / I.flushSoftAssertions.
  • --reporter mochawesome in scripts/CI, or mochawesome in package.json / mocha.reporterOptions.

If none of these hint at 3.x, the project is likely on 4.x already — hand back to codeceptjs-fundamentals.

Installs
23
GitHub Stars
1
First Seen
Jun 5, 2026
migrate-codeceptjs-4 — codeceptjs/skills