Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: detect cruise script #288

Merged
merged 5 commits into from
Dec 9, 2023
Merged

feat: detect cruise script #288

merged 5 commits into from
Dec 9, 2023

Conversation

MH4GF
Copy link
Owner

@MH4GF MH4GF commented Dec 5, 2023

Changed to detect cruiseScript based on the package manager used.

Problem

This was due to mismatches, such as users using pnpm but executing with yarn. Each package manager has its own way to run depcruise binaries, so use it.

Copy link
Contributor

github-actions bot commented Dec 5, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

subgraph 0["src"]
1["options.ts"]
subgraph 2["options"]
3["filterSupportedFiles.ts"]
4["formatFocusOption.ts"]
5["getConfigFilePath.ts"]
6["validateOptions.ts"]
8["validateOptions.test.ts"]
end
7["ActionError.ts"]
end
1-->3
1-->4
1-->5
1-->6
1-->6
6-->7
8-->7
8-->6
8-->6

style 1 fill:lime,color:black
style 6 fill:lime,color:black
style 8 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action 4822db6


working directory: .

execute command
pnpm exec depcruise --output-type mermaid --config .dependency-cruiser.js --focus "^dist/index.js|^src/options.ts|^src/options/validateOptions.test.ts|^src/options/validateOptions.ts" dist/index.js src/options.ts src/options/validateOptions.test.ts src/options/validateOptions.ts

Copy link
Contributor

github-actions bot commented Dec 9, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

0["index.js"]


style 0 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action aa4bbd0


working directory: test/sample

execute command
yarn run -s depcruise --output-type mermaid --config .dependency-cruiser.js --focus "^index.js" index.js

Copy link
Contributor

github-actions bot commented Dec 9, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

0["index.js"]


style 0 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action aa4bbd0


working directory: test/esm-sample

execute command
yarn run -s depcruise --output-type mermaid --config .dependency-cruiser.cjs --focus "^index.js" index.js

Copy link
Contributor

github-actions bot commented Dec 9, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

subgraph 0["packages"]
subgraph 1["foo"]
2["index.js"]
end
end
subgraph 3["node_modules"]
subgraph 4["cowsay"]
5["index.js"]
end
end
2-->5

style 2 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action aa4bbd0


working directory: test/bun-workspace

execute command
bun x depcruise --output-type mermaid --config .dependency-cruiser.cjs --focus "^packages/foo/index.js" packages/foo/index.js

Copy link
Contributor

github-actions bot commented Dec 9, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

subgraph 0["packages"]
subgraph 1["foo"]
2["index.js"]
end
end
subgraph 3["node_modules"]
subgraph 4["cowsay"]
5["index.js"]
end
end
2-->5

style 2 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action aa4bbd0


working directory: test/npm-workspace

execute command
npx --no-install depcruise --output-type mermaid --config .dependency-cruiser.cjs --focus "^packages/foo/index.js" packages/foo/index.js

Copy link
Contributor

github-actions bot commented Dec 9, 2023

dependency-cruiser report

visualize dependenices of changed files.

flowchart LR

subgraph 0["packages"]
subgraph 1["foo"]
2["index.js"]
end
end
subgraph 3["node_modules"]
subgraph 4[".pnpm"]
subgraph 5["cowsay@1.5.0"]
subgraph 6["node_modules"]
subgraph 7["cowsay"]
8["index.js"]
end
end
end
end
end
2-->8

style 2 fill:lime,color:black
Loading

Report generated by dependency-cruiser report action aa4bbd0


working directory: test/pnpm-workspace

execute command
pnpm exec depcruise --output-type mermaid --config .dependency-cruiser.cjs --focus "^packages/foo/index.js" packages/foo/index.js

This reverts commit aa4bbd0.
@MH4GF MH4GF marked this pull request as ready for review December 9, 2023 07:33
@MH4GF MH4GF added the bug Something isn't working label Dec 9, 2023
@MH4GF MH4GF changed the title wip: detect cruise script feat: detect cruise script Dec 9, 2023
@MH4GF MH4GF merged commit 6996344 into main Dec 9, 2023
6 checks passed
@MH4GF MH4GF deleted the detect-cruise-script branch December 9, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Error if packageManager field is set to anything other than yarn
1 participant