sass-embedded 1.53.0 → 1.54.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b677d2dbdddad7a72bcde823159f96d94fc527c66793a9aef5efe0c2cc14c2a
4
- data.tar.gz: 169b55fa13373844c3356980e25226f852631002b5bbd6af032c54da098c6832
3
+ metadata.gz: d984022cc2c8334d64a47b1cf8afda885be25e3447ef23c81cdfbb74eb4973b7
4
+ data.tar.gz: 8161280d9bbff68618a630b2351138eff2b1e2e906bcc0c468abdc8f06232c36
5
5
  SHA512:
6
- metadata.gz: 4afb03ec5714a80b41a2d24f5f558b799fe465cbe42274857aab4481bd7acf7e6484bdc4b88f533822db39dba965617f3018ca4d8a7864be5833f78179b3b908
7
- data.tar.gz: a78f530d8e86166b41e3855838a24ceea8862d9b6e3a9e38c7795c77fcd547759f9547a84348f3084f5489e443cfe79d3c33c3f7954e7ba80e7422f14c3b7f1b
6
+ metadata.gz: 15055373adc10efe437a8885ab0f43990cc3cc4e6a67bcacf1d6eca801111c50c5a6a266351ca422b7da186bb13347626891e5cc0136c8514a97d4b6de5f731b
7
+ data.tar.gz: 4c2f90021601ad964a7ca3058068a75c87c5827f0f4b72998d8ab35baae3af01474962c67f7116362697157abe401eb2094f9a2eafe1adca6ffa75858f603357
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass-embedded": "1.53.0"
3
+ "sass-embedded": "1.54.0"
4
4
  }
5
5
  }
@@ -34,7 +34,7 @@ module Sass
34
34
  return if @ids_by_function.key?(function)
35
35
 
36
36
  id = @id
37
- @id = @id.next
37
+ @id = id.next
38
38
 
39
39
  @ids_by_function[function] = id
40
40
  @functions_by_id[id] = function
@@ -33,18 +33,19 @@ module Sass
33
33
 
34
34
  raise ArgumentError, 'importer must be an Importer or a FileImporter' if is_importer == is_file_importer
35
35
 
36
- proto = if is_importer
37
- EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
38
- importer_id: @id
39
- )
40
- else
41
- EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
42
- file_importer_id: @id
43
- )
44
- end
45
- @importers_by_id[@id] = importer
46
- @id = @id.next
47
- proto
36
+ id = @id
37
+ @id = id.next
38
+
39
+ @importers_by_id[id] = importer
40
+ if is_importer
41
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
42
+ importer_id: id
43
+ )
44
+ else
45
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
46
+ file_importer_id: id
47
+ )
48
+ end
48
49
  end
49
50
 
50
51
  def canonicalize(canonicalize_request)
@@ -155,8 +155,8 @@ module Sass
155
155
  obj.contents.map do |element|
156
156
  from_proto(element)
157
157
  end,
158
- obj.keywords.entries.to_h do |entry|
159
- [entry.first, from_proto(entry.last)]
158
+ obj.keywords.entries.to_h.transform_values! do |value|
159
+ from_proto(value)
160
160
  end,
161
161
  ListSeparator.from_proto(obj.separator)
162
162
  ).instance_eval do
@@ -29,6 +29,7 @@ module Sass
29
29
  load_paths:,
30
30
  syntax:,
31
31
  url:,
32
+ charset:,
32
33
  source_map:,
33
34
  source_map_include_sources:,
34
35
  style:,
@@ -59,6 +60,7 @@ module Sass
59
60
  end,
60
61
  path: (File.absolute_path(path) unless path.nil?),
61
62
  style: Protofier.to_proto_output_style(style),
63
+ charset: charset,
62
64
  source_map: source_map,
63
65
  source_map_include_sources: source_map_include_sources,
64
66
  importers: @importer_registry.importers,
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.53.0'
5
+ VERSION = '1.54.0'
6
6
  end
7
7
  end
data/lib/sass/embedded.rb CHANGED
@@ -87,6 +87,9 @@ module Sass
87
87
  # @param path [String]
88
88
  # @param load_paths [Array<String>] Paths in which to look for stylesheets loaded by rules like
89
89
  # {@use}[https://sass-lang.com/documentation/at-rules/use] and {@import}[https://sass-lang.com/documentation/at-rules/import].
90
+ # @param charset [Boolean] By default, if the CSS document contains non-ASCII characters, Sass adds a +@charset+
91
+ # declaration (in expanded output mode) or a byte-order mark (in compressed mode) to indicate its encoding to
92
+ # browsers or other consumers. If +charset+ is +false+, these annotations are omitted.
90
93
  # @param source_map [Boolean] Whether or not Sass should generate a source map.
91
94
  # @param source_map_include_sources [Boolean] Whether Sass should include the sources in the generated source map.
92
95
  # @param style [String, Symbol] The OutputStyle of the compiled CSS.
@@ -111,6 +114,7 @@ module Sass
111
114
  def compile(path,
112
115
  load_paths: [],
113
116
 
117
+ charset: true,
114
118
  source_map: false,
115
119
  source_map_include_sources: false,
116
120
  style: :expanded,
@@ -133,6 +137,7 @@ module Sass
133
137
  load_paths: load_paths,
134
138
  syntax: nil,
135
139
  url: nil,
140
+ charset: charset,
136
141
  source_map: source_map,
137
142
  source_map_include_sources: source_map_include_sources,
138
143
  style: style,
@@ -155,6 +160,9 @@ module Sass
155
160
  # @param syntax [String, Symbol] The Syntax to use to parse the entrypoint stylesheet.
156
161
  # @param url [String] The canonical URL of the entrypoint stylesheet. If this is passed along with +importer+, it's
157
162
  # used to resolve relative loads in the entrypoint stylesheet.
163
+ # @param charset [Boolean] By default, if the CSS document contains non-ASCII characters, Sass adds a +@charset+
164
+ # declaration (in expanded output mode) or a byte-order mark (in compressed mode) to indicate its encoding to
165
+ # browsers or other consumers. If +charset+ is +false+, these annotations are omitted.
158
166
  # @param source_map [Boolean] Whether or not Sass should generate a source map.
159
167
  # @param source_map_include_sources [Boolean] Whether Sass should include the sources in the generated source map.
160
168
  # @param style [String, Symbol] The OutputStyle of the compiled CSS.
@@ -182,6 +190,7 @@ module Sass
182
190
  syntax: :scss,
183
191
  url: nil,
184
192
 
193
+ charset: true,
185
194
  source_map: false,
186
195
  source_map_include_sources: false,
187
196
  style: :expanded,
@@ -204,6 +213,7 @@ module Sass
204
213
  load_paths: load_paths,
205
214
  syntax: syntax,
206
215
  url: url,
216
+ charset: charset,
207
217
  source_map: source_map,
208
218
  source_map_include_sources: source_map_include_sources,
209
219
  style: style,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.53.0
4
+ version: 1.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2022-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.30.0
61
+ version: 1.32.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.30.0
68
+ version: 1.32.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-performance
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.11.1
103
+ version: 2.12.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.11.1
110
+ version: 2.12.1
111
111
  description: A Ruby library that will communicate with Embedded Dart Sass using the
112
112
  Embedded Sass protocol.
113
113
  email:
@@ -159,8 +159,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
159
159
  licenses:
160
160
  - MIT
161
161
  metadata:
162
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.53.0
163
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.53.0
162
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.54.0
163
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.54.0
164
164
  funding_uri: https://github.com/sponsors/ntkme
165
165
  post_install_message:
166
166
  rdoc_options: []