-
Notifications
You must be signed in to change notification settings - Fork 552
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: monitor support for --all-projects #929
Conversation
55887fc
to
0294534
Compare
@@ -0,0 +1,25 @@ | |||
import { GoodResult, BadResult } from './types'; | |||
|
|||
export function processJsonMonitorResponse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copied as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- types
5bfe017
to
bc65d44
Compare
// TODO: the type should depend on allSubProjects flag | ||
const inspectResult: pluginApi.InspectResult = await promiseOrCleanup( | ||
moduleInfo.inspect(path, targetFile, { ...options }), | ||
const inspectResult = await promiseOrCleanup( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key change
bc65d44
to
5f4d918
Compare
c7afcd7
to
702038a
Compare
d330103
to
5ade302
Compare
src/cli/commands/monitor/index.ts
Outdated
} | ||
|
||
throw new Error(json); | ||
return processJsonMonitorResponse(results); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate PR?
d018a1c
to
0988aa3
Compare
662cb78
to
573e59d
Compare
8dc3a94
to
39deb39
Compare
src/cli/index.ts
Outdated
'project-name or file or package-manager or docker', | ||
'all-projects', | ||
]); | ||
if (args.options['project-name'] && args.options.allProjects) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be a separate function that validates arguments?
0b579a7
to
a528b27
Compare
package.json
Outdated
@@ -28,7 +28,7 @@ | |||
"format": "prettier --write '{src,test,scripts}/**/*.{js,ts}'", | |||
"prepare": "npm run build", | |||
"test:common": "npm run check-tests && npm run build && npm run lint && node --require ts-node/register src/cli test --org=snyk", | |||
"test:acceptance": "tap test/acceptance/**/*.test.* -Rspec --timeout=300 --node-arg=-r --node-arg=ts-node/register", | |||
"test:acceptance": "tap test/acceptance/cli-test/*.test.* -Rspec --timeout=300 --node-arg=-r --node-arg=ts-node/register", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this?
f224c20
to
04fe3c4
Compare
@@ -9,7 +9,7 @@ export function formatTestMeta( | |||
): string { | |||
const padToLength = 19; // chars to align | |||
const packageManager = res.packageManager || options.packageManager; | |||
const targetFile = res.targetFile || options.file; | |||
const targetFile = res.targetFile || res.displayTargetFile || options.file; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is used for display purposes and not being sent to the back end
43397fb
to
2318dfc
Compare
Co-authored-by: dkontorovskyy <dan.kontorovskyy@gmail.com>
2318dfc
to
ba4658a
Compare
🎉 This PR is included in version 1.274.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What does this PR do?
--all-project
flag is enabled, auto detect => scan and monitor all supported projects (yarn, npm, rubygems, maven) in the given directory only initiallyWhere should the reviewer start?
Relies on this refactor to go in first: #928