@pob/codemods 0.9.3 → 0.10.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.10.0](https://github.com/christophehurpeau/pob/compare/@pob/codemods@0.9.4...@pob/codemods@0.10.0) (2025-08-24)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ * drop node 20
11
+
12
+ ### Features
13
+
14
+ * drop node 20 ([bb57350](https://github.com/christophehurpeau/pob/commit/bb573502c71f7316a54b4ce75203c05c0ba2e681))
15
+
16
+ ### Bug Fixes
17
+
18
+ * enhance warning for unsupported expect properties in jest-to-node-runner transform ([f297134](https://github.com/christophehurpeau/pob/commit/f29713468a8fa7dcdf44b104f336d511b461e6bd))
19
+ * properly import before instead of beforeAll ([9c5fbd1](https://github.com/christophehurpeau/pob/commit/9c5fbd171ad9f9a39adc06f0f3a53ba9fbec4fdb))
20
+
21
+ ## [0.9.4](https://github.com/christophehurpeau/pob/compare/@pob/codemods@0.9.3...@pob/codemods@0.9.4) (2025-08-23)
22
+
23
+ Note: no notable changes
24
+
25
+
6
26
  ## [0.9.3](https://github.com/christophehurpeau/pob/compare/@pob/codemods@0.9.2...@pob/codemods@0.9.3) (2025-06-28)
7
27
 
8
28
  Note: no notable changes
@@ -52,12 +52,10 @@ module.exports = (file, api, options) => {
52
52
  })
53
53
  .replaceWith((p) => {
54
54
  const { value } = p;
55
- topLevelMethodsUsed.add(value.callee.name);
55
+ const replaceValue = jestToNodeGlobalMethods[value.callee.name];
56
+ topLevelMethodsUsed.add(replaceValue);
56
57
 
57
- return j.callExpression(
58
- j.identifier(jestToNodeGlobalMethods[value.callee.name]),
59
- value.arguments,
60
- );
58
+ return j.callExpression(j.identifier(replaceValue), value.arguments);
61
59
  });
62
60
 
63
61
  if (topLevelMethodsUsed.size > 0) {
@@ -95,7 +93,9 @@ module.exports = (file, api, options) => {
95
93
  }
96
94
 
97
95
  if (!propertiesMap[propertyName]) {
98
- console.warn(`Unsupported expect property: ${propertyName}`);
96
+ console.warn(
97
+ `Unsupported expect property: ${propertyName} in ${file.path}`,
98
+ );
99
99
  return;
100
100
  }
101
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/codemods",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "codemods for pob",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <302891+christophehurpeau@users.noreply.github.com> (https://christophe.hurpeau.com)",
@@ -13,7 +13,7 @@
13
13
  "homepage": "https://github.com/christophehurpeau/pob",
14
14
  "type": "module",
15
15
  "engines": {
16
- "node": ">=22.14.0"
16
+ "node": ">=22.18.0"
17
17
  },
18
18
  "bin": {
19
19
  "pob-migrate": "./bin/migrate.mjs"
@@ -38,6 +38,6 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/jscodeshift": "17.3.0",
41
- "@types/node": "22.15.32"
41
+ "@types/node": "22.17.2"
42
42
  }
43
43
  }