sasso-rails 0.1.5 → 0.1.7

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: c6608f26711bf73d29ec2d86536328dc0de6ada6dd634c10845a2ab5cc7ace4f
4
- data.tar.gz: 359caa6deb1675ddbd90d8f0174d9892adb5a5604c3460976f1e8a320245c321
3
+ metadata.gz: 0d07aa2a57f972bc400082d6d3a8f4d4be65d92613b285c3019cb616b762a03b
4
+ data.tar.gz: b485d844211e610c9c07a8bb59118bbcfd6ad545146a80578a9e9c234933cac4
5
5
  SHA512:
6
- metadata.gz: 1c9d539580067b05c211c08e4f84264141c98dbdf4a2ea13846fb7a10b6a0193d40c7674b605c1e6f31c680b41959a9944b4513350a3206b937d69eede7c4ee5
7
- data.tar.gz: e91613f7038d1348dbb8d2b0d49d49b6281fb073b7972049910bd747bf920f7ecdec10bcf925c75da23a7cf8566853ce2ca8b118395e322931d8ba3e2f2ab3d8
6
+ metadata.gz: 2f3fd5fe97774f9e63ea3edc68e8a52b69855f2005d3511f68ed0b4c69ff6e9bf05b665a0e039d67b4b2f427b04483e95e5971cdcbb2180d8401523d4d32a4fe
7
+ data.tar.gz: 5897d107c37bd529e5c0e7eae111b35292293134978cd3454e02a58672fa5a6a9b93970d35615e2b40d428de75114db2bfbf0e4b77c85f96c76c1d387bae7824
data/CHANGELOG.md CHANGED
@@ -8,6 +8,60 @@ the engine-gem version range it requires.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.1.7] - 2026-09-17
12
+
13
+ Requires the `sasso` gem **>= 0.14.0** (was `>= 0.2.7`), and **Ruby >= 3.2**.
14
+
15
+ ### Removed
16
+
17
+ - **Ruby 3.1 support** (`required_ruby_version` is now `>= 3.2.0`), following the
18
+ `sasso` engine gem, which dropped it in 0.14.0. CI had already stopped testing
19
+ 3.1 because the current Rails dep tree does not resolve there; now no dep set
20
+ does.
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 too: 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 built CSS will change, and so will its digest.** The compiler's output
29
+ moved with the core, so a Propshaft/Sprockets fingerprint computed over a
30
+ stylesheet's bytes changes on the next `assets:precompile` even when the
31
+ stylesheet did not — expect one cache-busting round of new asset URLs. The
32
+ engine gem's
33
+ [CHANGELOG](https://github.com/momiji-rs/sasso-ruby/blob/main/CHANGELOG.md)
34
+ lists every change; the ones most likely to show up in a Rails app:
35
+ - **Serialization only** — the CSS means the same thing, it is spelled
36
+ differently. A legacy color with a fractional channel writes its rgb triple
37
+ as percentages, and compressed `hsl`/`hwb` route through `rgb`, so
38
+ `darken(#336699, 10%)` compresses to `rgb(15%,30%,45%)` rather than
39
+ `hsl(210,50%,30%)`. Source-map `mappings` also change: a declaration whose
40
+ value is a bare `$name` now maps back to the variable's definition.
41
+ - **Not serialization only** — global `whiteness()` / `blackness()` are no
42
+ longer built-ins and now pass through as plain CSS, matching dart-sass. This
43
+ one changes what the browser does: `whiteness(#f00)` used to compile to `0%`,
44
+ and now emits an unknown CSS function, which makes the declaration invalid
45
+ and the browser drop it. It is also silent — no error, no warning — so it is
46
+ the one to grep for. Use `color.whiteness()` via `@use "sass:color"`.
47
+ - No change to this gem's own API, generators, or rake tasks. Verified green
48
+ against `sasso` 0.14.0 (23 runs, 70 assertions).
49
+
50
+ ## [0.1.6] - 2026-06-25
51
+
52
+ Requires the `sasso` gem **>= 0.2.7** (was `>= 0.2.6`).
53
+
54
+ ### Changed
55
+
56
+ - Bumped the `sasso` engine-gem floor to **>= 0.2.7**, whose library API now
57
+ omits the trailing newline (adopting core sasso 0.6.3, byte-for-byte dart-sass
58
+ parity). The compiler re-adds the conventional trailing newline when writing a
59
+ build artifact, matching dart-sass's CLI for **both** styles:
60
+ - **Expanded** builds are unchanged (`…}\n`), and source-mapped expanded
61
+ builds keep dart's blank line before the `sourceMappingURL` footer.
62
+ - **Compressed** builds now end with a single newline (`…}\n`) too — they
63
+ previously had none, a one-byte deviation from dart-sass's CLI.
64
+
11
65
  ## [0.1.5] - 2026-06-25
12
66
 
13
67
  Requires the `sasso` gem **>= 0.2.6** (was `>= 0.2.3`).
data/README.md CHANGED
@@ -19,7 +19,7 @@ Why this gem over the alternatives:
19
19
 
20
20
  ## Compatibility
21
21
 
22
- - **Ruby** ≥ 3.1.
22
+ - **Ruby** ≥ 3.2 (the `sasso` engine gem dropped 3.1 in 0.14.0).
23
23
  - **Rails** ≥ 7.0 (`railties >= 7.0`), on **either** asset pipeline. Verified
24
24
  end-to-end (`generate sasso:install` → `sasso:build` → production
25
25
  `assets:precompile` → served CSS) on:
@@ -155,9 +155,12 @@ $ bundle lock --add-platform x86_64-linux aarch64-linux \
155
155
 
156
156
  ## Versioning
157
157
 
158
- This gem versions independently of the `sasso` compiler gem and pins it with a
159
- range (`sasso >= 0.2.3, < 1`). An app may pin a specific compiler version in its
160
- own `Gemfile`.
158
+ This gem versions independently of the `sasso` compiler gem, which it depends on
159
+ by *range* rather than by exact version — so its own number does not name a
160
+ compiler. See the [gemspec](sasso-rails.gemspec) for the current range and the
161
+ [CHANGELOG](CHANGELOG.md) for which release moved it; `Sasso::CORE_VERSION`
162
+ reports the compiler your app actually has installed. An app may pin a specific
163
+ compiler version in its own `Gemfile`.
161
164
 
162
165
  ## License
163
166
 
@@ -60,7 +60,10 @@ module Sasso
60
60
  write_source_map(dest, result.source_map)
61
61
  File.write(dest, result.css + source_map_footer(File.basename(dest)))
62
62
  else
63
- File.write(dest, ::Sasso.compile(src, style: @style, load_paths: @load_paths))
63
+ # sasso >= 0.2.7's library API omits the trailing newline; a built CSS
64
+ # artifact conventionally ends with one (and dart-sass's CLI writes it),
65
+ # so append it here.
66
+ File.write(dest, "#{::Sasso.compile(src, style: @style, load_paths: @load_paths)}\n")
64
67
  end
65
68
  dest
66
69
  end
@@ -94,12 +97,13 @@ module Sasso
94
97
  File.write("#{dest}.map", JSON.generate(source_map))
95
98
  end
96
99
 
97
- # The `sourceMappingURL` footer for the built CSS. Matches dart-sass: the
98
- # expanded footer sits on its own line after the trailing newline; the
99
- # compressed footer is appended directly (no leading newline).
100
+ # The `sourceMappingURL` footer for the built CSS. Matches dart-sass: since
101
+ # sasso >= 0.2.7's `result.css` has no trailing newline, the expanded
102
+ # footer supplies the line terminator AND dart's blank separator line
103
+ # (`\n\n`); the compressed footer is appended directly (no leading newline).
100
104
  def source_map_footer(css_basename)
101
105
  comment = "/*# sourceMappingURL=#{css_basename}.map */"
102
- @style == :compressed ? "#{comment}\n" : "\n#{comment}\n"
106
+ @style == :compressed ? "#{comment}\n" : "\n\n#{comment}\n"
103
107
  end
104
108
 
105
109
  # A source URL made relative to the .map's directory (so a DevTools that
@@ -2,9 +2,12 @@
2
2
 
3
3
  module Sasso
4
4
  module Rails
5
- # Versioned INDEPENDENTLY of both the `sasso` gem and the `sasso` crate.
6
- # The gemspec pins the engine gem with a range (sasso >= 0.1.1, < 1), so a
7
- # compiler bump does not force a lockstep release of this integration gem.
8
- VERSION = "0.1.5"
5
+ # Versioned INDEPENDENTLY of both the `sasso` gem and the `sasso` crate: the
6
+ # gemspec depends on a RANGE of the engine gem, so a compiler bump does not
7
+ # force a lockstep release of this integration gem. The range itself lives in
8
+ # the gemspec and is deliberately not restated here — this comment claimed
9
+ # `>= 0.1.1` through two floor bumps. `Sasso::CORE_VERSION` reports the
10
+ # compiler actually installed.
11
+ VERSION = "0.1.7"
9
12
  end
10
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sasso-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
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-25 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: railties
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.6
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.6
43
+ version: 0.14.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1'
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 3.1.0
82
+ version: 3.2.0
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="