amplify-cli
amplify-cli copied to clipboard
fix: usage data consent being shown on post init success.
Description of changes
Post install script is no longer running on latest npm version so this change moves the notice of data collection to post init successful. Moving the amplify-diagnose consent into the diagnose command logic.
Before amplify-diagnose consent was shown on post init success:
Post install script never ran unless you configured npm to show scripts that are running in the background:
After:
Issue #, if available
Description of how you validated changes
Checklist
- [x] PR description included
- [x]
yarn testpasses - [ ] Tests are changed or added
- [ ] Relevant documentation is changed or added (and PR referenced)
- [ ] New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
- [ ] Pull request labels are added
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Merging #12622 (05e93dd) into dev (ec9a2ba) will increase coverage by
47.58%. The diff coverage is44.33%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@ Coverage Diff @@
## dev #12622 +/- ##
===========================================
+ Coverage 0.00% 47.58% +47.58%
===========================================
Files 1296 842 -454
Lines 149743 38340 -111403
Branches 1296 7836 +6540
===========================================
+ Hits 0 18246 +18246
+ Misses 148447 18469 -129978
- Partials 1296 1625 +329
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ify-category-function/src/events/prePushHandler.ts | 33.33% <0.00%> (+33.33%) |
:arrow_up: |
| ...ib/S3AndCloudFront/helpers/configure-CloudFront.js | 87.06% <ø> (+87.06%) |
:arrow_up: |
| ...lify-category-hosting/lib/S3AndCloudFront/index.js | 89.65% <ø> (+89.65%) |
:arrow_up: |
| ...s/amplify-cli-core/src/errors/amplify-exception.ts | 82.35% <ø> (+82.35%) |
:arrow_up: |
| ...ackages/amplify-cli-core/src/help/commands-info.ts | 100.00% <ø> (+100.00%) |
:arrow_up: |
| packages/amplify-cli-core/src/types.ts | 100.00% <ø> (+100.00%) |
:arrow_up: |
| packages/amplify-cli/src/commands/console.ts | 0.00% <0.00%> (ø) |
|
| packages/amplify-cli/src/commands/diagnose.ts | 71.85% <0.00%> (+71.85%) |
:arrow_up: |
| packages/amplify-cli/src/commands/pull.ts | 0.00% <0.00%> (ø) |
|
| ...es/amplify-provider-awscloudformation/src/index.ts | 60.20% <ø> (+60.20%) |
:arrow_up: |
| ... and 28 more |
... and 1267 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
To test this flow, you will need to checkout this PR, make a change in the above file, and run yarn setup-dev. Then you will need to init a new Amplify project, confirm that the data consent screen is shown. Then init another amplify project and confirm that the data consent is not seen.
Post install script is no longer running on latest npm version
~~Do we have a link for that?~~
Reference: https://github.com/npm/cli/issues/3647