codeceptjs 4.0.5 → 4.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/migration-4.md +24 -2
- package/lib/command/init.js +3 -1
- package/package.json +2 -4
package/docs/migration-4.md
CHANGED
|
@@ -7,9 +7,31 @@ title: Migrating from 3.x to 4.x
|
|
|
7
7
|
|
|
8
8
|
CodeceptJS 4.x is a major release. It moves the codebase from CommonJS to native ESM, drops several long-deprecated helpers and plugins, replaces legacy plugins with first-class APIs, and bumps most third-party dependencies.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Migrate Automatically with an Agent
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The fastest way to upgrade is to let an AI agent do it. This release is mechanical enough that an agent handles most of it end-to-end.
|
|
13
|
+
|
|
14
|
+
Install CodeceptJS 4:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install codeceptjs@4
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then install the skills bundle. It works the same in Claude Code or any other agent:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx skills add codeceptjs/skills
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The bundle ships a `migrate-codeceptjs-4` skill. Point an agent at the project and run it:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
claude "/migrate-codeceptjs-4"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
It reads your config and tests, applies the mechanical changes, runs the suite, and fixes what breaks.
|
|
33
|
+
|
|
34
|
+
The rest of this guide documents every change the skill makes — read it if you prefer to migrate by hand, or to review what the agent did.
|
|
13
35
|
|
|
14
36
|
## 1. Update Node and Package
|
|
15
37
|
|
package/lib/command/init.js
CHANGED
|
@@ -206,7 +206,7 @@ export default async function (initPath, options = {}) {
|
|
|
206
206
|
const stepFile = `./steps_file.${extension}`
|
|
207
207
|
fs.writeFileSync(path.join(testsPath, stepFile), extension === 'ts' ? defaultActorTs : defaultActor)
|
|
208
208
|
|
|
209
|
-
config.include = { I: isTypeScript ? './steps_file' : stepFile }
|
|
209
|
+
config.include = { I: isTypeScript ? './steps_file.ts' : stepFile }
|
|
210
210
|
|
|
211
211
|
print(`Steps file created at ${stepFile}`)
|
|
212
212
|
|
|
@@ -317,6 +317,8 @@ export default async function (initPath, options = {}) {
|
|
|
317
317
|
return
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
if (process.env.CODECEPT_TEST) return
|
|
321
|
+
|
|
320
322
|
const generatedTest = generateTest(testsPath)
|
|
321
323
|
if (!generatedTest) return
|
|
322
324
|
generatedTest.then(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
6
6
|
"keywords": [
|
|
@@ -137,11 +137,9 @@
|
|
|
137
137
|
"xpath": "0.0.34",
|
|
138
138
|
"zod": "^4.1.11"
|
|
139
139
|
},
|
|
140
|
-
"optionalDependencies": {
|
|
141
|
-
"@codeceptjs/detox-helper": "1.1.14"
|
|
142
|
-
},
|
|
143
140
|
"devDependencies": {
|
|
144
141
|
"@apollo/server": "^5",
|
|
142
|
+
"@codeceptjs/detox-helper": "1.1.14",
|
|
145
143
|
"@codeceptjs/expect-helper": "^4.0.0-beta.5",
|
|
146
144
|
"@codeceptjs/mock-request": "0.3.1",
|
|
147
145
|
"@eslint/eslintrc": "3.3.3",
|