@cedarjs/codemods 5.0.2-rc.5 → 6.0.0-canary.2616
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.
|
@@ -11,7 +11,7 @@ const handler = () => {
|
|
|
11
11
|
async ({ setOutput }) => {
|
|
12
12
|
const redwoodProjectPaths = getPaths();
|
|
13
13
|
const files = getFilesWithPattern({
|
|
14
|
-
|
|
14
|
+
pattern: "validateWith",
|
|
15
15
|
filesToSearch: [redwoodProjectPaths.api.src]
|
|
16
16
|
});
|
|
17
17
|
await runTransform({
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { rgPath } from "@vscode/ripgrep";
|
|
2
|
+
import execa from "execa";
|
|
3
3
|
const getFilesWithPattern = ({
|
|
4
|
-
|
|
4
|
+
pattern,
|
|
5
5
|
filesToSearch
|
|
6
6
|
}) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
for (const entry of entries) {
|
|
18
|
-
if (!entry.isFile()) {
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
const filePath = path.join(entry.parentPath, entry.name);
|
|
22
|
-
try {
|
|
23
|
-
const contents = fs.readFileSync(filePath, "utf8");
|
|
24
|
-
if (contents.includes(substring)) {
|
|
25
|
-
found.push(filePath);
|
|
26
|
-
}
|
|
27
|
-
} catch {
|
|
28
|
-
}
|
|
29
|
-
}
|
|
7
|
+
try {
|
|
8
|
+
const { stdout } = execa.sync(rgPath, [
|
|
9
|
+
"--files-with-matches",
|
|
10
|
+
pattern,
|
|
11
|
+
...filesToSearch
|
|
12
|
+
]);
|
|
13
|
+
return stdout.toString().split("\n");
|
|
14
|
+
} catch {
|
|
15
|
+
return [];
|
|
30
16
|
}
|
|
31
|
-
return found;
|
|
32
17
|
};
|
|
33
18
|
var getFilesWithPattern_default = getFilesWithPattern;
|
|
34
19
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/codemods",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-canary.2616",
|
|
4
4
|
"description": "Codemods to ease upgrading a CedarJS Project",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,10 +29,11 @@
|
|
|
29
29
|
"@babel/parser": "7.29.7",
|
|
30
30
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
31
31
|
"@babel/traverse": "7.29.7",
|
|
32
|
-
"@cedarjs/cli-helpers": "
|
|
33
|
-
"@cedarjs/project-config": "
|
|
32
|
+
"@cedarjs/cli-helpers": "6.0.0-canary.2616",
|
|
33
|
+
"@cedarjs/project-config": "6.0.0-canary.2616",
|
|
34
34
|
"@svgr/core": "8.1.0",
|
|
35
35
|
"@svgr/plugin-jsx": "8.1.0",
|
|
36
|
+
"@vscode/ripgrep": "1.17.1",
|
|
36
37
|
"@whatwg-node/fetch": "0.10.13",
|
|
37
38
|
"cheerio": "1.2.0",
|
|
38
39
|
"deepmerge": "4.3.1",
|
|
@@ -44,14 +45,14 @@
|
|
|
44
45
|
"prettier": "3.8.4",
|
|
45
46
|
"tasuku": "2.3.0",
|
|
46
47
|
"typescript": "5.9.3",
|
|
47
|
-
"yargs": "17.7.
|
|
48
|
+
"yargs": "17.7.2"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@cedarjs/framework-tools": "
|
|
51
|
+
"@cedarjs/framework-tools": "6.0.0-canary.2616",
|
|
51
52
|
"@types/babel__core": "7.20.5",
|
|
52
53
|
"@types/jscodeshift": "17.3.0",
|
|
53
54
|
"@types/yargs": "17.0.35",
|
|
54
|
-
"memfs": "4.
|
|
55
|
+
"memfs": "4.57.7",
|
|
55
56
|
"publint": "0.3.21",
|
|
56
57
|
"ts-dedent": "2.3.0",
|
|
57
58
|
"vitest": "3.2.6"
|