esbuild 0.1.1 → 0.1.2
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 +4 -4
- data/lib/esbuild/service.rb +11 -5
- data/lib/esbuild/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ca04633426ced1850b7fe4610a6838e5d2d1ed86b1b4a0ebaea744d071211bd
|
4
|
+
data.tar.gz: b95f70fe7d15b6148b199c7a17ac26ad4faef64eeece2f911abf5284c02e6e0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b7cd969ba9d97c71d8cdbec2cfa45eafd411f36520f55953ad4555731700622747895e7af5ed0d7b195e6e73cee3cbc810205c18995c3ba9e19c852bb57b82b
|
7
|
+
data.tar.gz: f8b230c37b8a5f23a5bd1e7d8ba6ef61e60f30b0e8ad5f79ebd554e77cf296d4781b55ad72cf398473360b105ea6c241f2a922149a71dcd907d30fb8ddc79a02
|
data/lib/esbuild/service.rb
CHANGED
@@ -265,15 +265,21 @@ module Esbuild
|
|
265
265
|
unless errors.empty?
|
266
266
|
limit = 5
|
267
267
|
details = errors.slice(0, limit + 1).each_with_index.map do |error, index|
|
268
|
-
|
269
|
-
location = error["location"]
|
270
|
-
break "\nerror: #{error["text"]}" unless location
|
271
|
-
"\n#{location["file"]}:#{location["line"]}:#{location["column"]}: error: #{error["text"]}"
|
268
|
+
transform_error(error, index, limit)
|
272
269
|
end.join
|
273
|
-
summary = "with #{errors.size} error#{errors.size > 1 ? "s" : ""}:#{details}"
|
270
|
+
summary = " with #{errors.size} error#{errors.size > 1 ? "s" : ""}:#{details}"
|
274
271
|
end
|
275
272
|
|
276
273
|
super "Build failed#{summary}"
|
277
274
|
end
|
275
|
+
|
276
|
+
private
|
277
|
+
|
278
|
+
def transform_error(error, index, limit)
|
279
|
+
return "\n..." if index == limit
|
280
|
+
location = error["location"]
|
281
|
+
return "\nerror: #{error["text"]}" unless location
|
282
|
+
"\n#{location["file"]}:#{location["line"]}:#{location["column"]}: error: #{error["text"]}"
|
283
|
+
end
|
278
284
|
end
|
279
285
|
end
|
data/lib/esbuild/version.rb
CHANGED