-
-
Notifications
You must be signed in to change notification settings - Fork 6
fix: improve error message when package.json is missing #122
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
Open
dreyfus92
wants to merge
7
commits into
e18e:main
Choose a base branch
from
dreyfus92:improve-error-handling
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
34c4083
fix: improve error message when package.json is missing
dreyfus92 909b7e0
update: snapshots
dreyfus92 5b18f6a
refactor: enhance CLI environment variable handling for consistent ou…
dreyfus92 02b6255
fix: adjust formatting for duplicate dependency messages in output
dreyfus92 012567a
moar tests
dreyfus92 a9ab032
fix: update color handling in dependency analysis and adjust test sna…
dreyfus92 3cd1dc8
format
dreyfus92 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,43 @@ | ||
| // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
|
||
| exports[`CLI > should display package report 1`] = ` | ||
| "[36me18e[39m (cli <version>) | ||
| "e18e (cli <version>) | ||
|
|
||
| [90m┌[39m Analyzing... | ||
| [90m│[39m | ||
| [34m●[39m Summary | ||
| [90m│[39m [36mPackage Name[39m mock-package | ||
| [90m│[39m [36mVersion[39m 1.0.0 | ||
| [90m│[39m [36mInstall Size[39m 53.0 B | ||
| [90m│[39m [36mDependencies[39m 1 (1 production, 0 development) | ||
| [90m│[39m [36mES Modules[39m 100% (1 ESM, 0 CJS) | ||
| [90m│[39m | ||
| [34m●[39m Results: | ||
| [90m│[39m | ||
| [90m│[39m | ||
| [90m└[39m Done! | ||
| ┌ Analyzing... | ||
| │ | ||
| ● Summary | ||
| │ Package Name mock-package | ||
| │ Version 1.0.0 | ||
| │ Install Size 53.0 B | ||
| │ Dependencies 1 (1 production, 0 development) | ||
| │ ES Modules 100% (1 ESM, 0 CJS) | ||
| │ | ||
| ● Results: | ||
| │ | ||
| │ | ||
| └ Done! | ||
|
|
||
| " | ||
| `; | ||
|
|
||
| exports[`CLI > should display package report 2`] = `""`; | ||
|
|
||
| exports[`CLI > should run successfully with default options 1`] = ` | ||
| "[36me18e[39m (cli <version>) | ||
| "e18e (cli <version>) | ||
|
|
||
| [90m┌[39m Analyzing... | ||
| [90m│[39m | ||
| [34m●[39m Summary | ||
| [90m│[39m [36mPackage Name[39m mock-package | ||
| [90m│[39m [36mVersion[39m 1.0.0 | ||
| [90m│[39m [36mInstall Size[39m 53.0 B | ||
| [90m│[39m [36mDependencies[39m 1 (1 production, 0 development) | ||
| [90m│[39m [36mES Modules[39m 100% (1 ESM, 0 CJS) | ||
| [90m│[39m | ||
| [34m●[39m Results: | ||
| [90m│[39m | ||
| [90m│[39m | ||
| [90m└[39m Done! | ||
| ┌ Analyzing... | ||
| │ | ||
| ● Summary | ||
| │ Package Name mock-package | ||
| │ Version 1.0.0 | ||
| │ Install Size 53.0 B | ||
| │ Dependencies 1 (1 production, 0 development) | ||
| │ ES Modules 100% (1 ESM, 0 CJS) | ||
| │ | ||
| ● Results: | ||
| │ | ||
| │ | ||
| └ Done! | ||
|
|
||
| " | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why?
this feels like a workaround rather than a necessity.
are you doing this because we didn't have any snapshots yet which use colours? we should just set FORCE_COLOR to
1in the vitest config env (although vitest 4 might already do this)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.
indeed it was a workaround cause i couldn't make the tests work properly even after updating the snapshots.