sass-embedded 1.55.0-arm64-darwin → 1.56.2-arm64-darwin

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: ea7484ad34022da840e5dd29447e071b65d32d18d2db9e4c3fd1772eae6cbb06
4
- data.tar.gz: f3869ad6cc35d04626e6c8a96fe4c8f95db564e5cc0a1dc0b6d71746d2930def
3
+ metadata.gz: 7158fc5fe2c8c484c7029a21521af6fd50df92e5f54ad37b366deaf1dd18d01c
4
+ data.tar.gz: 2a345de66b0870553870a506f41980add9441142a7bd7a325141954519a21f9a
5
5
  SHA512:
6
- metadata.gz: ae9bb8791c4e90970fe197cab46323eb2237df04d3b414b86b7cce80ab10551ac25d1494c2c890d266d2b8d429cc36f35ab9e5f4e1726bbd9f9dbac5e4950879
7
- data.tar.gz: 9d89781acde9a50243c0b3cc2db27987b791d67ceac442fe60b5cd609f28cfe6e216f08d6aafa67c7666ae2927efa7f11b7c1f07c0ea6b2f74b0e37cf83a8220
6
+ metadata.gz: 11b1abd9027877c5d424015e58f7f868c0a635139a2e4d01925c00abf856d8d60a1df056ac80dbba6ad742190827cff3e09496f60d772e164115af16361c086d
7
+ data.tar.gz: 7d43e0ad653f30a51c4f5c459dbd469b35ef0ca15caa5511146759ba7e4e69a5e831832e91f98c866246f8da5816c947dc6a792e52423eada834ed13361f898f
@@ -1,4 +1,4 @@
1
- sass_embedded license:
1
+ Dart Sass Embedded license:
2
2
 
3
3
  Copyright (c) 2019, Google LLC
4
4
 
Binary file
@@ -15,26 +15,19 @@ module Sass
15
15
  private_constant :State
16
16
 
17
17
  def initialize
18
- @error = nil
19
18
  @result = nil
20
19
  @state = State::PENDING
21
20
 
22
21
  @condition_variable = ConditionVariable.new
23
22
  @mutex = Mutex.new
24
-
25
- begin
26
- yield if block_given?
27
- rescue StandardError => e
28
- reject e
29
- end
30
23
  end
31
24
 
32
25
  def resolve(value)
33
26
  @mutex.synchronize do
34
27
  return unless @state == State::PENDING
35
28
 
36
- @state = State::FULFILLED
37
29
  @result = value
30
+ @state = State::FULFILLED
38
31
  @condition_variable.broadcast
39
32
  end
40
33
  end
@@ -43,8 +36,8 @@ module Sass
43
36
  @mutex.synchronize do
44
37
  return unless @state == State::PENDING
45
38
 
39
+ @result = reason
46
40
  @state = State::REJECTED
47
- @error = reason
48
41
  @condition_variable.broadcast
49
42
  end
50
43
  end
@@ -53,7 +46,7 @@ module Sass
53
46
  @mutex.synchronize do
54
47
  @condition_variable.wait(@mutex) if @state == State::PENDING
55
48
 
56
- raise @error if @state == State::REJECTED
49
+ raise @result if @state == State::REJECTED
57
50
 
58
51
  @result
59
52
  end
@@ -48,8 +48,8 @@ module Sass
48
48
  @dispatcher.unsubscribe(id)
49
49
  end
50
50
 
51
- def send_message(message)
52
- @dispatcher.send_message(message)
51
+ def send_message(**kwargs)
52
+ @dispatcher.send_message(**kwargs)
53
53
  end
54
54
  end
55
55
 
@@ -16,7 +16,7 @@ module Sass
16
16
 
17
17
  Thread.new do
18
18
  loop do
19
- receive_message EmbeddedProtocol::OutboundMessage.decode @compiler.read
19
+ receive_message
20
20
  rescue IOError, Errno::EBADF => e
21
21
  @mutex.synchronize do
22
22
  @id = PROTOCOL_ERROR_ID
@@ -56,13 +56,14 @@ module Sass
56
56
  @compiler.closed?
57
57
  end
58
58
 
59
- def send_message(inbound_message)
60
- @compiler.write(inbound_message.to_proto)
59
+ def send_message(**kwargs)
60
+ @compiler.write(EmbeddedProtocol::InboundMessage.new(**kwargs).to_proto)
61
61
  end
62
62
 
63
63
  private
64
64
 
65
- def receive_message(outbound_message)
65
+ def receive_message
66
+ outbound_message = EmbeddedProtocol::OutboundMessage.decode(@compiler.read)
66
67
  oneof = outbound_message.message
67
68
  message = outbound_message.public_send(oneof)
68
69
  case oneof
@@ -14,12 +14,11 @@ module Sass
14
14
 
15
15
  @global_functions = functions.keys
16
16
  @functions_by_name = functions.transform_keys do |signature|
17
- signature = signature.chomp
18
17
  index = signature.index('(')
19
18
  if index
20
- signature.slice(0, index)
19
+ signature.slice(0, index).chomp
21
20
  else
22
- signature
21
+ signature.chomp
23
22
  end
24
23
  end
25
24
 
@@ -86,10 +86,6 @@ module Sass
86
86
  importer = @importers_by_id[file_import_request.importer_id]
87
87
  file_url = importer.find_file_url(file_import_request.url, from_import: file_import_request.from_import)&.to_s
88
88
 
89
- if !file_url.nil? && !file_url.start_with?('file:')
90
- raise "file_url must be a file: URL, was #{file_url.inspect}"
91
- end
92
-
93
89
  EmbeddedProtocol::InboundMessage::FileImportResponse.new(
94
90
  id: file_import_request.id,
95
91
  file_url: file_url
@@ -180,7 +180,7 @@ module Sass
180
180
  when :compiler_function
181
181
  Sass::Value::Function.new(obj.id)
182
182
  when :host_function
183
- raise ProtocolError, 'The compiler may not send Value.host_function to host'
183
+ raise Sass::ScriptError, 'The compiler may not send Value.host_function to host'
184
184
  when :singleton
185
185
  case obj
186
186
  when :TRUE
@@ -15,14 +15,6 @@ module Sass
15
15
  @channel = channel
16
16
  end
17
17
 
18
- def id
19
- @connection.id
20
- end
21
-
22
- def send_message(message)
23
- @connection.send_message(message)
24
- end
25
-
26
18
  def compile_request(path:,
27
19
  source:,
28
20
  importer:,
@@ -47,40 +39,36 @@ module Sass
47
39
  @importer_registry = ImporterRegistry.new(importers, load_paths, alert_color: alert_color)
48
40
  @logger_registry = LoggerRegistry.new(logger)
49
41
 
50
- send_message EmbeddedProtocol::InboundMessage.new(
51
- compile_request: EmbeddedProtocol::InboundMessage::CompileRequest.new(
52
- id: id,
53
- string: unless source.nil?
54
- EmbeddedProtocol::InboundMessage::CompileRequest::StringInput.new(
55
- source: source,
56
- url: url&.to_s,
57
- syntax: Protofier.to_proto_syntax(syntax),
58
- importer: (@importer_registry.register(importer) unless importer.nil?)
59
- )
60
- end,
61
- path: (File.absolute_path(path) unless path.nil?),
62
- style: Protofier.to_proto_output_style(style),
63
- charset: charset,
64
- source_map: source_map,
65
- source_map_include_sources: source_map_include_sources,
66
- importers: @importer_registry.importers,
67
- global_functions: @function_registry.global_functions,
68
- alert_ascii: alert_ascii,
69
- alert_color: alert_color,
70
- quiet_deps: quiet_deps,
71
- verbose: verbose
72
- )
73
- )
42
+ send_message(compile_request: EmbeddedProtocol::InboundMessage::CompileRequest.new(
43
+ id: id,
44
+ string: unless source.nil?
45
+ EmbeddedProtocol::InboundMessage::CompileRequest::StringInput.new(
46
+ source: source,
47
+ url: url&.to_s,
48
+ syntax: Protofier.to_proto_syntax(syntax),
49
+ importer: (@importer_registry.register(importer) unless importer.nil?)
50
+ )
51
+ end,
52
+ path: (File.absolute_path(path) unless path.nil?),
53
+ style: Protofier.to_proto_output_style(style),
54
+ charset: charset,
55
+ source_map: source_map,
56
+ source_map_include_sources: source_map_include_sources,
57
+ importers: @importer_registry.importers,
58
+ global_functions: @function_registry.global_functions,
59
+ alert_ascii: alert_ascii,
60
+ alert_color: alert_color,
61
+ quiet_deps: quiet_deps,
62
+ verbose: verbose
63
+ ))
74
64
  end
75
65
  end
76
66
 
77
67
  def version_request
78
68
  await do
79
- send_message EmbeddedProtocol::InboundMessage.new(
80
- version_request: EmbeddedProtocol::InboundMessage::VersionRequest.new(
81
- id: id
82
- )
83
- )
69
+ send_message(version_request: EmbeddedProtocol::InboundMessage::VersionRequest.new(
70
+ id: id
71
+ ))
84
72
  end
85
73
  end
86
74
 
@@ -89,39 +77,31 @@ module Sass
89
77
  end
90
78
 
91
79
  def compile_response(message)
92
- @async.resolve(message)
80
+ resolve(message)
93
81
  end
94
82
 
95
83
  def version_response(message)
96
- @async.resolve(message)
84
+ resolve(message)
97
85
  end
98
86
 
99
87
  def canonicalize_request(message)
100
- send_message EmbeddedProtocol::InboundMessage.new(
101
- canonicalize_response: @importer_registry.canonicalize(message)
102
- )
88
+ send_message(canonicalize_response: @importer_registry.canonicalize(message))
103
89
  end
104
90
 
105
91
  def import_request(message)
106
- send_message EmbeddedProtocol::InboundMessage.new(
107
- import_response: @importer_registry.import(message)
108
- )
92
+ send_message(import_response: @importer_registry.import(message))
109
93
  end
110
94
 
111
95
  def file_import_request(message)
112
- send_message EmbeddedProtocol::InboundMessage.new(
113
- file_import_response: @importer_registry.file_import(message)
114
- )
96
+ send_message(file_import_response: @importer_registry.file_import(message))
115
97
  end
116
98
 
117
99
  def function_call_request(message)
118
- send_message EmbeddedProtocol::InboundMessage.new(
119
- function_call_response: @function_registry.function_call(message)
120
- )
100
+ send_message(function_call_response: @function_registry.function_call(message))
121
101
  end
122
102
 
123
103
  def error(message)
124
- @async.reject(CompileError.new(message.message, nil, nil, nil))
104
+ reject(CompileError.new(message.message, nil, nil, nil))
125
105
  end
126
106
 
127
107
  private
@@ -134,6 +114,22 @@ module Sass
134
114
  ensure
135
115
  @connection&.disconnect
136
116
  end
117
+
118
+ def resolve(value)
119
+ @async.resolve(value)
120
+ end
121
+
122
+ def reject(reason)
123
+ @async.reject(reason)
124
+ end
125
+
126
+ def id
127
+ @connection.id
128
+ end
129
+
130
+ def send_message(**kwargs)
131
+ @connection.send_message(**kwargs)
132
+ end
137
133
  end
138
134
 
139
135
  private_constant :Host
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sass
4
4
  class Embedded
5
- VERSION = '1.55.0'
5
+ VERSION = '1.56.2'
6
6
  end
7
7
  end
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.55.0
4
+ version: 1.56.2
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2022-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.19'
19
+ version: '3.21'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.19'
26
+ version: '3.21'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.11.0
47
+ version: 3.12.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.11.0
54
+ version: 3.12.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.36.0
61
+ version: 1.40.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.36.0
68
+ version: 1.40.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.13.1
103
+ version: 2.15.0
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.13.1
110
+ version: 2.15.0
111
111
  description: A Ruby library that will communicate with Embedded Dart Sass using the
112
112
  Embedded Sass protocol.
113
113
  email:
@@ -161,8 +161,8 @@ homepage: https://github.com/ntkme/sass-embedded-host-ruby
161
161
  licenses:
162
162
  - MIT
163
163
  metadata:
164
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.55.0
165
- source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.55.0
164
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.56.2
165
+ source_code_uri: https://github.com/ntkme/sass-embedded-host-ruby/tree/v1.56.2
166
166
  funding_uri: https://github.com/sponsors/ntkme
167
167
  post_install_message:
168
168
  rdoc_options: []
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  requirements: []
182
- rubygems_version: 3.3.22
182
+ rubygems_version: 3.3.26
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Use dart-sass with Ruby!