Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix --diagnostics-file parsing #1116

Conversation

codykaup
Copy link
Contributor

@codykaup codykaup commented Nov 1, 2024

I would appear if you pass anything to --diagnostics-file, it doesn't do anything and just writes to the default location.

This happens because

  1. We're using defaultIfSet instead of defaultUnlessSetOrFalse when parsing that option
  2. Our || operation was actually getting parsed as:
(defaultIfSet(flags.diagnosticsFile, DEFAULT_DIAGNOSTICS_FILE) || flags.diagnostics)
        ? DEFAULT_DIAGNOSTICS_FILE
        : undefined,

So if you set --diagnostics-file or --diagnostics, we'll always use the default file location.

📦 Published PR as canary version: 11.16.5--canary.1116.11667959497.0

✨ Test out this PR locally via:

npm install chromatic@11.16.5--canary.1116.11667959497.0
# or 
yarn add chromatic@11.16.5--canary.1116.11667959497.0

@codykaup codykaup added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Nov 1, 2024
@codykaup codykaup self-assigned this Nov 1, 2024
Copy link
Contributor

github-actions bot commented Nov 1, 2024

📦 Package Size: 5380 KB
✅ Compared to main: 0 KB db3848b (5380 KB)

@codykaup codykaup force-pushed the cody/cap-2363-diagnostics-file-option-does-not-apply-specified-filename-in branch from 83cf229 to d66dee9 Compare November 1, 2024 18:01
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01% (target: -1.00%) 100.00% (target: 80.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (db3848b) 7116 4839 68.00%
Head commit (d66dee9) 7114 (-2) 4838 (-1) 68.01% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1116) 2 2 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@codykaup codykaup marked this pull request as ready for review November 1, 2024 19:53
@codykaup codykaup requested a review from a team November 1, 2024 19:53
@codykaup codykaup added skip-release Auto: Preserve the current version when merged and removed release Auto: Create a `latest` release when merged labels Nov 4, 2024
@codykaup codykaup added this pull request to the merge queue Nov 4, 2024
Merged via the queue into main with commit dfe0a84 Nov 4, 2024
27 checks passed
@codykaup codykaup deleted the cody/cap-2363-diagnostics-file-option-does-not-apply-specified-filename-in branch November 4, 2024 15:48
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.16.4 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Nov 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
patch Auto: Increment the patch version when merged released Verdict: This issue/pull request has been released skip-release Auto: Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants