sasso 0.1.0 → 0.1.1

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: 9ad1048363c58e688e15ac79835c23bcd0c6f3d31ae2a8c1722009b7fcaf529e
4
- data.tar.gz: 0a951cb32c09f7e62e443c2e624472a843f20aab146d0e8acd8a9b2df1a1e3ae
3
+ metadata.gz: 1031787e86651b62bcaa111f8229ed0aefa94b7f7c2fdee7eca2018a3e607463
4
+ data.tar.gz: 475ca38a81a0f5c310c48b544c05cc9012d2643ec06de3ebb6ab2af456028cf9
5
5
  SHA512:
6
- metadata.gz: b43fc719879f4ed4697c13b41ee7731869eea1d6f843b8b4729410e6bd855636ad52f5147a91ffe86e857f73f39f45112aa31eee5903df4daf71da1911497f24
7
- data.tar.gz: 844e2b12ab23ee520a37d11d87a6b8ef834333ed8a40353a9c9589b037d2cbe65352d3810bfe2cabdc9ef13bcf478ca3dfe52757b04c0a8fd080f584a928ecf8
6
+ metadata.gz: ae57336478bb4b1bd6b11043d1ef12cbde4e377552352077d43b3e27dddc7efd156a8ab2f823ca12bb484c4b8ce5596278e5d9f40e34a6d8e7b6ed50467ae0d0
7
+ data.tar.gz: 1f062ba9aebd45b188bc650e8b8c6ed4508c0ed164e45e4736ea41ce6b454241f4227c0012796f99b99bcaf5d7cbe57ac3a8d51af717af8dfa2f207d52c9cdd0
data/CHANGELOG.md CHANGED
@@ -8,6 +8,18 @@ notes the exact core crate version it pins.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.1.1] - 2026-06-13
12
+
13
+ Pins the same core crate **v0.3.0**.
14
+
15
+ ### Fixed
16
+
17
+ - `Sasso.compile(path)` now searches the entry file's own directory FIRST for
18
+ relative `@use`/`@forward`/`@import` (the `sass` CLI convention), so a file on
19
+ disk can import its sibling partials without the caller spelling out
20
+ `load_paths:`. An explicit `load_paths:` is still honored, after the
21
+ implicit entry-file directory.
22
+
11
23
  ## [0.1.0] - 2026-06-13
12
24
 
13
25
  Initial release. In-process SCSS/Sass → CSS via a Rust native extension
data/lib/sasso/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  module Sasso
4
4
  # The gem version floats INDEPENDENTLY of the core `sasso` crate version; the
5
5
  # native extension pins the crate exactly (ext/sasso/Cargo.toml: sasso = "=…").
6
- VERSION = "0.1.0"
6
+ VERSION = "0.1.1"
7
7
  end
data/lib/sasso.rb CHANGED
@@ -52,6 +52,10 @@ module Sasso
52
52
 
53
53
  # Compile the file at `path`. Syntax is inferred from the extension unless
54
54
  # overridden; `url:` defaults to `path` so diagnostics get the dart-exact block.
55
+ #
56
+ # The entry file's own directory is searched FIRST for relative @use/@forward/
57
+ # @import (the `sass` CLI convention — a file on disk can always import its
58
+ # siblings), ahead of any caller-supplied `load_paths:`.
55
59
  def compile(path, **opts)
56
60
  src = File.read(path)
57
61
  inferred =
@@ -60,7 +64,9 @@ module Sasso
60
64
  when ".css" then :css
61
65
  else :scss
62
66
  end
63
- compile_string(src, syntax: inferred, url: path.to_s, **opts)
67
+ given = Array(opts.delete(:load_paths)).map(&:to_s)
68
+ load_paths = [File.dirname(path.to_s), *given]
69
+ compile_string(src, syntax: inferred, url: path.to_s, load_paths: load_paths, **opts)
64
70
  end
65
71
 
66
72
  def validate!(value, allowed, name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sasso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - momiji-rs