Skip to content

Commit 1b232c9

Browse files
committed
just-spinner v0.1.0
1 parent 8278426 commit 1b232c9

2 files changed

Lines changed: 56 additions & 3 deletions

File tree

β€Žbuild.sbtβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ ThisBuild / scmInfo :=
1818
s"https://github.com/${props.GitHubUsername}/${props.RepoName}.git",
1919
).some
2020

21-
lazy val root = (project in file("."))
21+
lazy val justSpinner = (project in file("."))
22+
.enablePlugins(DevOopsGitHubReleasePlugin)
2223
.settings(
2324
name := props.ProjectName,
2425
crossScalaVersions := props.CrossScalaVersions,
@@ -124,8 +125,8 @@ lazy val props =
124125
lazy val libs =
125126
new {
126127

127-
lazy val catsCore = Def.setting("org.typelevel" %%% "cats-core" % props.CatsVersion)
128-
lazy val effectieCats = Def.setting("io.kevinlee" %%% "effectie-cats" % props.EffectieVersion)
128+
lazy val catsCore = Def.setting("org.typelevel" %%% "cats-core" % props.CatsVersion)
129+
lazy val effectieCats = Def.setting("io.kevinlee" %%% "effectie-cats" % props.EffectieVersion)
129130

130131
lazy val tests = new {
131132
lazy val hedgehog = Def.setting(

β€Žchangelogs/0.1.0.mdβ€Ž

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## [0.1.0](https://github.com/kevin-lee/just-spinner/issues?q=is%3Aissue+is%3Aclosed+-label%3Ainvalid+milestone%3Am1) ([RPs](https://github.com/kevin-lee/just-spinner/pulls?q=is%3Aissue+is%3Apr+is%3Aclosed+-label%3Ainvalid+milestone%3Am1)) - 2026-03-28
2+
3+
## Done
4+
5+
* Initial release of `just-spinner`
6+
7+
### πŸš€ Features
8+
9+
- **Cross-Platform Spinner Library**: Terminal spinner support for JVM, Scala.js, and Scala Native from a shared core implementation.
10+
- **Effect-Friendly API**: Main API centered on `SpinnerHandle[F]` so spinner operations can stay abstract over effects, with `cats.Id` support for direct side-effecting usage. For now, it has only the side-effect version, but it will support Cats Effect `IO` and possibly `Future`
11+
- **Runtime Spinner Controls**: Update text, prefix, suffix, color, spinner type, indentation, and enabled state while the spinner is running.
12+
- **Completion Helpers**: Built-in `succeed`, `fail`, `warn`, `info`, `stop`, and `stopAndPersist` operations for common command-line workflow outcomes.
13+
- **Rich Spinner Presets**: Includes multiple built-in animations such as `dots`, `moon`, `arrow`, `bouncingBar`, `clock`, `earth`, `star`, and `tableFlip`, with support for custom frame sets and intervals.
14+
15+
### πŸ—οΈ Architecture
16+
17+
- **Shared Core, Platform Adapters**: Common spinner logic lives in shared sources, while platform-specific timer, terminal output, and Unicode support are implemented separately for JVM, JS, and Native.
18+
- **Functional Design**: Immutable configuration and state models with effect-polymorphic interfaces and pure value types where possible.
19+
- **Terminal-Aware Rendering**: Handles interactive vs non-interactive terminals, ANSI cursor control, Unicode log symbols, and ANSI-safe string width calculation.
20+
21+
### πŸ“¦ Project Structure
22+
23+
```text
24+
modules/
25+
β”œβ”€β”€ core/ # Shared spinner logic plus JVM/JS/Native platform adapters
26+
β”œβ”€β”€ example-js/ # Scala.js demo application
27+
β”œβ”€β”€ example-native/ # Scala Native demo application
28+
β”œβ”€β”€ example-java/ # Scala JVM demo application
29+
```
30+
31+
### βž• Added
32+
33+
- Initial release of `just-spinner`, a cross-platform terminal spinner library for Scala with shared support for Scala `2.13.18` and Scala `3.3.7`.
34+
- Core spinner API built around `Spinner`, `SpinnerHandle[F]`, `SpinnerConfig`, `SpinnerType`, `PersistOptions`, and platform-aware `TerminalOutput` and `SpinnerTimer` abstractions.
35+
- Runtime controls for spinner text, prefix and suffix text, color, indentation, cursor visibility, silent mode, and explicit enablement for interactive and non-interactive terminals.
36+
- Built-in spinner presets including `dots`, `dots2`, `dots3`, `dots12`, `line`, `moon`, `arrow`, `bouncingBar`, `arc`, `toggle`, `clock`, `earth`, `star`, `aesthetic`, and `tableFlip`, plus support for custom spinner definitions.
37+
- Outcome helpers for `succeed`, `fail`, `warn`, `info`, `stop`, `stopAndPersist`, and cooperative `println` output while a spinner is running.
38+
- ANSI-aware rendering helpers, Unicode-aware log symbols, and string-width handling for better terminal output across JVM, Scala.js, and Scala Native.
39+
40+
### πŸ“Ί Examples
41+
42+
- Added runnable example applications for Scala.js and Scala Native showing different spinner styles, colors, text updates, and completion states.
43+
44+
### πŸ¦” Testing
45+
46+
- Added Hedgehog-based specs covering ANSI code generation, colors, log symbols, spinner configuration, spinner state transitions, spinner types, string width calculation, and spinner handle behavior.
47+
48+
### πŸ› οΈ Tooling
49+
50+
- Added sbt cross-project build setup, release metadata, and publishing support for JVM, Scala.js, and Scala Native modules.
51+
- Added repository automation with GitHub Actions for build, checks, coverage, release, PR labeling, and Dependabot updates.
52+
- Added formatting, linting, and quality tooling with Scalafmt, Scalafix, WartRemover, scoverage, and `sbt-ci-release`.

0 commit comments

Comments
Β (0)