hanami-sasso 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4890dd8fff08afcb9f2384601f4b1e64fa5e1a96fbd95e14313ba2081dcf01d0
4
- data.tar.gz: ca31c01cec51ad7b9de361e630d890afb7732cf677a079a2efd8c6149adee0e9
3
+ metadata.gz: e25281db83f48d29cec9b21c6b2b862b6e55fd033388762d0ae9d0e8f2cde42a
4
+ data.tar.gz: a403ace2505140c486e4aea94b40006d6abe8e645cbce65fd9e268f07dac2fdb
5
5
  SHA512:
6
- metadata.gz: 233d1c6f08b211d7435e644784d5a09663700db7f91b106125ac83c829e1d946839d2722b752b7d12484d6d3e812359ab64b64d47f592db3673632983f4a7264
7
- data.tar.gz: 45e98bbf18700d74c239c1fe984b7b9827de89638d500f2873657aed52f857309bc3fc2c6ab245f49e7740f8e708d3e073d79298fe5188989561396c971c0bbb
6
+ metadata.gz: cf00ad7a2b98bbc056d629767f2a6ef49728ebf034e573314eff97008a4360bae84f80622650907c996109e71b3aac90c5070d0cbc61282be95019ee80762af2
7
+ data.tar.gz: 3e94d9952be9a94f76f3f398ce6407b5cf3717b304a1a86f9518b4233d55b6fa7065149c38088cf416da6c62a7504aac642c0e5054b44562aff837a76b2160bd
data/CHANGELOG.md CHANGED
@@ -3,8 +3,59 @@
3
3
  All notable changes to **hanami-sasso** are documented here.
4
4
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ This gem versions independently of the `sasso` compiler gem — it depends on a
7
+ *range* of it, so its own number could not honestly name a compiler version.
8
+ Each release notes the range it requires; `Sasso::CORE_VERSION` reports the
9
+ compiler actually installed.
10
+
6
11
  ## [Unreleased]
7
12
 
13
+ ## [0.1.3] - 2026-09-17
14
+
15
+ Now requires the `sasso` gem **>= 0.14.0** (was `>= 0.2.7`), and **Ruby >= 3.2**.
16
+
17
+ ### Removed
18
+
19
+ - **Ruby 3.1 support** (`required_ruby_version` is now `>= 3.2.0`), following the
20
+ `sasso` engine gem, which dropped it in 0.14.0. It is off the CI matrix too.
21
+
22
+ ### Changed
23
+
24
+ - Bumped the `sasso` engine-gem floor to **>= 0.14.0**. From that release the
25
+ engine gem's version tracks the compiler crate it bundles, so the floor names
26
+ the compiler as well: core 0.14.0, at **dart-sass 1.104.1** parity, where 0.2.7
27
+ carried core 0.6.3 (1.101.0).
28
+ - **Your compiled CSS changes**, because the compiler's output moved with the
29
+ core. It remains byte-identical to dart-sass; it is not byte-identical to what
30
+ 0.2.7 wrote, so `assets:precompile` output — and anything digesting it — sees
31
+ one round of churn. The engine gem's
32
+ [CHANGELOG](https://github.com/momiji-rs/sasso-ruby/blob/main/CHANGELOG.md)
33
+ lists every change; the two most likely to appear in a Hanami app:
34
+ - **Serialization only** — the CSS means the same thing, spelled differently.
35
+ Compressed `hsl`/`hwb` route through `rgb`, and a legacy color with a
36
+ fractional channel writes percentages, so `darken(#336699, 10%)` compresses
37
+ to `rgb(15%,30%,45%)` rather than `hsl(210,50%,30%)`.
38
+ - **Not serialization only** — global `whiteness()` / `blackness()` are no
39
+ longer built-ins and now pass through as plain CSS, matching dart-sass. This
40
+ one changes what the browser does: `whiteness(#f00)` used to compile to `0%`,
41
+ and now emits an unknown CSS function, which makes the declaration invalid
42
+ and the browser drop it. It is also silent — no error, no warning — so it is
43
+ the one to grep for. Use `color.whiteness()` via `@use "sass:color"`.
44
+ - No change to this gem's own rake tasks or configuration. Verified green against
45
+ `sasso` 0.14.0 (9 runs, 30 assertions).
46
+
47
+ ## [0.1.2] - 2026-06-25
48
+
49
+ ### Changed
50
+
51
+ - Now requires the `sasso` gem **>= 0.2.7** (was `>= 0.2.3`), whose library API
52
+ omits the trailing newline (adopting core sasso 0.6.3, byte-for-byte dart-sass
53
+ parity). The compiler re-adds the conventional trailing newline when writing a
54
+ build artifact, matching dart-sass's CLI for both styles: expanded builds are
55
+ unchanged (and source-mapped expanded builds keep dart's blank line before the
56
+ `sourceMappingURL` footer), and compressed builds now end with a single
57
+ newline too (previously none).
58
+
8
59
  ## [0.1.1] - 2026-06-15
9
60
 
10
61
  ### Changed
data/hanami-sasso.gemspec CHANGED
@@ -26,13 +26,20 @@ Gem::Specification.new do |spec|
26
26
  end
27
27
  spec.require_paths = ["lib"]
28
28
 
29
- spec.required_ruby_version = ">= 3.1.0"
29
+ # Follows the `sasso` engine gem, which dropped Ruby 3.1 in 0.14.0 (3.1 left
30
+ # security maintenance in March 2025). A 3.1 install could not resolve the
31
+ # dependency below in any case.
32
+ spec.required_ruby_version = ">= 3.2.0"
30
33
 
31
34
  # The gem's runtime code requires only the compiler (+ Rake for the tasks); it
32
35
  # integrates with Hanami's `assets:precompile` when present but never loads the
33
36
  # framework itself. Targets Hanami 2.1+.
34
37
  spec.add_dependency "rake", ">= 13.0"
35
- spec.add_dependency "sasso", ">= 0.2.3", "< 1"
38
+ # From 0.14.0 the engine gem's version tracks the core compiler crate it
39
+ # bundles, so this floor names the compiler too: 0.14.0 carries core 0.14.0
40
+ # (dart-sass 1.104.1 parity), where 0.2.7 carried core 0.6.3 (1.101.0). `< 1`
41
+ # allows the rest of the 0.x line — the API surface used here is two methods.
42
+ spec.add_dependency "sasso", ">= 0.14.0", "< 1"
36
43
 
37
44
  spec.add_development_dependency "bundler"
38
45
  spec.add_development_dependency "minitest", "~> 5.0"
@@ -67,7 +67,9 @@ module HanamiSasso
67
67
  write_source_map(dest, result.source_map)
68
68
  File.write(dest, result.css + source_map_footer(File.basename(dest)))
69
69
  else
70
- File.write(dest, ::Sasso.compile(src, style: @style, load_paths: @load_paths))
70
+ # sasso >= 0.2.7's library API omits the trailing newline; a built CSS
71
+ # artifact conventionally ends with one (and dart-sass's CLI writes it).
72
+ File.write(dest, "#{::Sasso.compile(src, style: @style, load_paths: @load_paths)}\n")
71
73
  end
72
74
  dest
73
75
  end
@@ -100,7 +102,9 @@ module HanamiSasso
100
102
 
101
103
  def source_map_footer(css_basename)
102
104
  comment = "/*# sourceMappingURL=#{css_basename}.map */"
103
- @style == :compressed ? "#{comment}\n" : "\n#{comment}\n"
105
+ # sasso >= 0.2.7's `result.css` has no trailing newline, so the expanded
106
+ # footer supplies the line terminator AND dart's blank separator line.
107
+ @style == :compressed ? "#{comment}\n" : "\n\n#{comment}\n"
104
108
  end
105
109
 
106
110
  def relative_source(url, from_dir)
@@ -3,5 +3,5 @@
3
3
  module HanamiSasso
4
4
  # The plugin version floats independently of the `sasso` compiler gem; the
5
5
  # gemspec pins the compiler with a range.
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.3"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanami-sasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - momiji-rs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-15 00:00:00.000000000 Z
11
+ date: 2026-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.3
33
+ version: 0.14.0
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '1'
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.2.3
43
+ version: 0.14.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1'
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: 3.1.0
112
+ version: 3.2.0
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="