-
Notifications
You must be signed in to change notification settings - Fork 74
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
adds check command #2452
base: main
Are you sure you want to change the base?
adds check command #2452
Conversation
🦋 Changeset detectedLatest commit: 2943d66 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
* Command that runs type checking and CDK synthesis without deployment | ||
*/ | ||
export class CheckCommand implements CommandModule { | ||
command = 'check'; |
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.
Not a big fan of the command name check
. It's more closely related to build
and perhaps --dryRun
isn't bad either for the existing sandbox
command. This way customers can utilize the watch
nature of sandbox for builds as well.
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.
I agree that it's more of a "build", though the check
name was inspired by other projects that provide similar functionality with the intent of a sort of "preflight" task before merging changes. There is another request to provide a "diff" function and integrate cdk-nag to perform diagnostics and/or highlight best practices that I think would fit nicely with the "check" theme
https://docs.astro.build/en/reference/cli-reference/#astro-check
https://svelte.dev/docs/cli/sv-check
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.
There is definitely overlap between check
and build
. We might be slightly different in the sense that we "synth" as well. We discussed offline to do an API review of this change will all the proposals.
Problem
folks may need to run sandbox command to compile/synthesize their backend for any errors.
The
npx ampx check
will dry run with just tsc and synth without deploying any resources.Screen.Recording.2025-01-25.at.10.06.05.PM.mov
Issue number, if available:
Changes
Corresponding docs PR, if applicable:
Validation
Checklist
run-e2e
label set.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.