codemod 1.7.14 → 1.7.16

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.
Files changed (2) hide show
  1. package/README.md +3 -3
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -104,10 +104,10 @@ Packages can be as simple as a single transformation or as complex as multi-step
104
104
 
105
105
  ```typescript
106
106
  // Example: Replace console.log with logger.info
107
- import type { Transform } from "codemod:ast-grep";
107
+ import type { Codemod } from "codemod:ast-grep";
108
108
  import type TSX from "codemod:ast-grep/langs/tsx";
109
109
 
110
- const transform: Transform<TSX> = (root) => {
110
+ const codemod: Codemod<TSX> = (root) => {
111
111
  const rootNode = root.root();
112
112
 
113
113
  // Find all console.log calls
@@ -128,7 +128,7 @@ const transform: Transform<TSX> = (root) => {
128
128
  return rootNode.commitEdits(edits);
129
129
  };
130
130
 
131
- export default transform;
131
+ export default codemod;
132
132
  ```
133
133
 
134
134
  jssg combines the power of AST transformations with the flexibility of JavaScript, making complex transformations intuitive and testable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemod",
3
- "version": "1.7.14",
3
+ "version": "1.7.16",
4
4
  "description": "Codemod platform for semantic code transformations",
5
5
  "keywords": [
6
6
  "ast",
@@ -26,11 +26,11 @@
26
26
  "detect-libc": "^2.0.3"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@codemod.com/cli-darwin-arm64": "1.7.14",
30
- "@codemod.com/cli-darwin-x64": "1.7.14",
31
- "@codemod.com/cli-linux-arm64-gnu": "1.7.14",
32
- "@codemod.com/cli-linux-x64-gnu": "1.7.14",
33
- "@codemod.com/cli-win32-x64-msvc": "1.7.14"
29
+ "@codemod.com/cli-darwin-arm64": "1.7.16",
30
+ "@codemod.com/cli-darwin-x64": "1.7.16",
31
+ "@codemod.com/cli-linux-arm64-gnu": "1.7.16",
32
+ "@codemod.com/cli-linux-x64-gnu": "1.7.16",
33
+ "@codemod.com/cli-win32-x64-msvc": "1.7.16"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">= 16.0.0"