Skip to content

Releases: svengreb/nib

0.2.0

11 Nov 20:40
v0.2.0
Compare
Choose a tag to compare

Release Date: 2020-11-11 Project Board Milestone

Show all commits

Features

Extend nib API to allow reuse of underlying writer#21#22 (⊶ 2dac339)

↠ To allow to reuse the underlying io.Writer the new Writer() io.Writer method has been added to the nib.Nib interface.
Both implementations the pencil and inkpen package have been adapted to this change.

Update to tmpl-go template repository version 0.5.0#25#26 (⊶ 15285fb)

↠ Updated to tmpl-go version 0.5.0 (including version 0.4.0) that…

  1. introduces the initial project documentation.
  2. updates golangci-lint to the currently latest version 1.32.0 which introduces new linters like errorlint., tparallel. and wrapcheck.
  3. …updates to tmpl version 0.7.0 (#25 #34).
    This includes…

Improvement

Removed pencil.NewFrom(*pencil.Options) function#23#24 (⊶ 175478e)

↠ The pencil.NewFrom(*pencil.Options) function was not necessary because…

  1. …there is currently no way to get the actual options from a pencil instance.
  2. …new pencil instances with different options can be simply composed by using the variadic parameter of the pencil.New(pencil.Option...) function.

Therefore the pencil.NewFrom(*pencil.Options) has been removed to simply the package surface.

Updated to latest Go module dependency versions#28

↠ Bumped outdated Go module dependencies to their latest versions:


The full changelog is available here

0.1.0

28 Sep 12:54
v0.1.0
Compare
Choose a tag to compare

Release Date: 2020-09-28 Project Board Milestone

Show all commits

This is the initial release version of nib.
The basic project setup, structure and development workflow has been bootstrapped by the tmpl-go template repository.

Features

Bootstrap based on "tmpl-go" template repository#1 (⊶ 966454c)

↠ Bootstrapped the basic project setup, structure and development workflow from version 0.1.0 of the "tmpl-go" template repository.
Additionally specific assets like the repository hero image have been replaced and documentations like the README and GitHub issue/PR templates are adjusted.

nib API v0#2#5 (⊶ 4003909)

↠ Implemented the API v0 with the following interfaces and types:

  • Nib — a log-level based line printer for human-facing messages.
  • Verbosity — defines the verbosity level of the line printer.
nib.Nib implementation inkpen with color and icon prefix support#6#7 (⊶ f5cb354)

↠ Implemented a new package inkpen that implements the nib.Nib API v0 (designed in #5) with color support, custom prefixes and verbosity level icons for human-facing CLI messages.

The default IO output stream is configurable by accepting a io.Writer. The default writer is color.Output of the github.com/fatih/color which provides automatic TTY and terminal color support detection.

The following verbosity levels have been implemented with default icons:

  • ⦿ debug
  • error
  • fatal
  • info
  • success
  • ! warning
Repository and package documentations#8#9 (⊶ 191456e)

↠ Wrote the repository and package documentation which includes information and guides about provided features, the currently latest API v0, general usage instructions as well as detailed information about configurations like the verbosity, customizable icons and prefixes.

Splitted icon and prefix features into new pencil package#18#19 (⊶ 4f97c4c)

↠ Before the inkpen package provided a writer that was able to print verbosity level icons and prefixes with colors. To allow to use icons and prefixes without colors both features have been moved into a new pencil package with a new pencil.Pencil type. The inkpen.Inkpen type has been changed to compose this new type and additionally allows to color the output.

In order to make it easier to configure both types, new package specific options has been implemented that are available via variadic parameters to the constructor functions of these types. This reduces the required code to configure a writer and also provides a safer usage with Goroutines.

Improvements

Optimized OS and Go version matrix strategy for CI workflow#12#13 (⊶ 2fca9af)

↠ Before the CI workflow used a matrix strategy to run the lint-node, lint-go and test jobs, but this also included steps that were not necessary for this repository. This has been improved to make the workflow run faster by avoiding unnecessary steps:

  • The lint-node job has been changed to only run on the [currently latest stable Node version 14.x]
    nodejs/node-cl-v14 only on Linux because this repository is not focused on JavaScript but only runs Node based tools to lint other files within this repository.
  • The lint-go job has been changed to only run on the currently latest stable Go version 1.15.x only on Linux because golangci-lint doesn't care about the Go version and OS it runs on but only statically checks the source code.
  • The test job has been changed to only run on the currently latest stable Go version 1.15.x and only Linux and Windows while macOS is not necessary for this repository because there is no macOS specific code.

These changes also help to keep the required GitHub Action run minutes for the account of this repository as small as possible without wasting resources for unnecessary tasks.

Properly merge configured inkpen icon map#16#17 (⊶ 17c8d6d)

↠ Before the inkpen.SetIcons(map[nib.Verbosity]Icon) method has overridden a nib.Verbosity entry instead of merging the ColorFunc and Value fields causing unexpected behavior like uncolored output or missing icons. This has been changed to check for the zero value of the fields and merge them with the already configured struct.

Tasks

Adapted to "tmpl-go" repository template version 0.1.1#3#4 (⊶ 0998f7e)

↠ Adapted to "tmpl-go" version 0.1.1 which includes an important bug fix regarding the golangci-lint YAML configuration for the go-header linter that caused golangci-lint to fail.

Adapted to "tmpl-go" template repository version 0.2.0#10#11 (⊶ d9268f0)

↠ Adapted to "tmpl-go" version 0.2.0 which includes a basic setup for testing in the CI workflow using Go's official go test command with enabled coverage and race detector.

Adapted to "tmpl-go" template repository version 0.3.0#14#15 (⊶ 7ddcd61)

↠ Adapted to "tmpl-go" version 0.3.0 which includes a optimized run configuration for the CI workflow that helps to improve the performance through more fine grained configurations:

  • Only runs on pushes to the main branch.
  • Only runs on pushes for v* tags.
  • Always runs for pushes to PRs.

The full changelog is available here