@joystick.js/cli-canary 0.0.0-canary.1313 → 0.0.0-canary.1314
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from"./read_file_dependency_map.js";import u from"../../path_exists.js";import c from"../../get_platform_safe_path.js";const n=(r="",o={})=>(console.log({path_to_find:r}),Object.entries(o).filter(([a,s])=>{const i=s&&s.imports&&s.imports.some(t=>t.absolute_path.includes(r)||t.absolute_path?.toLowerCase()?.includes(r)),m=s&&s.requires&&s.requires.some(t=>t.absolute_path.includes(r)||t.absolute_path?.toLowerCase()?.includes(r));return i||m}).map(([a])=>a.replace(c(`${process.cwd()}/`),""))),p=async(r="")=>{const o=await l(),e=n(r,o);return Promise.all(e.filter(a=>u(a)))};var g=p;export{g as default};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joystick.js/cli-canary",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-canary.
|
|
5
|
-
"canary_version": "0.0.0-canary.
|
|
4
|
+
"version": "0.0.0-canary.1314",
|
|
5
|
+
"canary_version": "0.0.0-canary.1313",
|
|
6
6
|
"description": "The CLI for Joystick.",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"bin": {
|
|
@@ -31,15 +31,13 @@ const find_codependencies_in_map = (path_to_find = '', map = {}) => {
|
|
|
31
31
|
// NOTE: If a file is renamed to use lowercase (or vice versa), the dependent file
|
|
32
32
|
// should respect that change, even if the developer forgets to update the import
|
|
33
33
|
// path's casing.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
return codependent_dependency.absolute_path.includes(path_to_find) || codependent_dependency.absolute_path?.toLowerCase()?.includes(path_to_find);
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
return has_matching_imports || has_matching_requires;
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
console.log(matching_codependents);
|
|
42
|
-
|
|
43
41
|
return matching_codependents.map(([matching_codependent_path]) => {
|
|
44
42
|
return matching_codependent_path.replace(
|
|
45
43
|
get_platform_safe_path(`${process.cwd()}/`),
|