Skip to content
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

Standardised error output of the @kipper/cli #489

Merged

Conversation

Luna-Klatzer
Copy link
Member

@Luna-Klatzer Luna-Klatzer commented Jul 22, 2023

What type of change does this PR perform?

  • Development or internal changes (These changes do not add new features or fix bugs, but update the code in other ways)
  • Bug fix (Non-breaking change which fixes an issue)

Summary

Standardized @kipper/cli output and cleaned up the code base.

Closes #435

List of Changes

  • Added a new decorator to handle the error output in a standardized way.
  • Code cleanup in the commands and minor restructuring. (Non-breaking change)

Does this PR create new warnings?

No.

Detailed Changelog

Added

  • New modules in @kipper/cli:
    • input, which contains all input-related handling functions and classes.
    • output, which contains the output-related handling functions and classes.
  • New decorator prettifiedErrors in @kipper/cli, which applies standardised error formatting to any thrown error.

Changed

  • Standardised error output for the CLI as described in #435.
  • Error message of KipperInternalError, which does not have " - Report this bug to the developer using the traceback!" as a suffix anymore.
  • Renamed getFile to getParseStream.

Linked issues or PRs

@Luna-Klatzer Luna-Klatzer added the other Other development related change or issue label Jul 22, 2023
@Luna-Klatzer Luna-Klatzer added this to the v0.10.0 milestone Jul 22, 2023
@Luna-Klatzer Luna-Klatzer self-assigned this Jul 22, 2023
…e-kippercli

Signed-off-by: Luna <luna.klatzer@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./kipper/web/kipper-standalone.min.js 128.4 KB (0%) 2.6 s (0%) 1.3 s (+9.01% 🔺) 3.8 s
./kipper/web/kipper-standalone.js 128.45 KB (0%) 2.6 s (0%) 1.1 s (+11.35% 🔺) 3.6 s

@Luna-Klatzer Luna-Klatzer merged commit a20f95b into dev-main Jul 22, 2023
@Luna-Klatzer Luna-Klatzer deleted the 435-other-standardise-error-output-of-the-kippercli branch July 22, 2023 17:43
Luna-Klatzer added a commit that referenced this pull request Jul 22, 2023
* Fixed bug according to #451

* Updated CHANGELOG.md

* Prettified code

* Standardised error output of the `@kipper/cli` (#489)

* Update README.md

Signed-off-by: Luna <luna.klatzer@gmail.com>

* Updated and simplified PULL_REQUEST_TEMPLATE.md

Signed-off-by: Luna <luna.klatzer@gmail.com>

* Update PULL_REQUEST_TEMPLATE.md

Signed-off-by: Luna <luna.klatzer@gmail.com>

* Update README.md

Signed-off-by: Luna <luna.klatzer@gmail.com>

* Added missing space in `kipper` README.md

Signed-off-by: Luna <luna.klatzer@gmail.com>

* Restructured CLI and implemented standardised prettified errors

* Removed suffix message from `KipperInternalError`

* Updated CHANGELOG.md

* Fixed accidentally renamed args property in `getFile`

* Fixed invalid use of `getTarget` in analyse.ts

* Renamed `getFile` to `getParseStream`

* Updated CHANGELOG.md

* Fixed `LogLevel` being too high in analyse.ts

* Fixed error being thrown in analyse.ts

The logger already handles the error, so the error must be caught and then ignored.

* Prettified code

* Updated analyse.test.ts to fit code changes

* Updated analyse.test.ts to fit code changes

* Updated CHANGELOG.md

---------

Signed-off-by: Luna <luna.klatzer@gmail.com>

---------

Signed-off-by: Luna <luna.klatzer@gmail.com>
@Luna-Klatzer Luna-Klatzer mentioned this pull request Feb 10, 2024
16 tasks
@Luna-Klatzer Luna-Klatzer mentioned this pull request Jul 10, 2024
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other Other development related change or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant