esbuild 0.1.1 → 0.1.2

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: ff848d085934056a5983935b5aed9a877b264f74ca0f38b1412cafe49ee5eda2
4
- data.tar.gz: 03c1246d911a9ce016aca7bb842303f58bc36082cd7ed53802531fbee307d7ac
3
+ metadata.gz: 6ca04633426ced1850b7fe4610a6838e5d2d1ed86b1b4a0ebaea744d071211bd
4
+ data.tar.gz: b95f70fe7d15b6148b199c7a17ac26ad4faef64eeece2f911abf5284c02e6e0e
5
5
  SHA512:
6
- metadata.gz: 90d303fbea5bd5b67b3452b573bd3b9b6eed1770a01cd24ef203dd93d7ba532eab160595c09e41b485e291d331bb0a3993da06d05f9d98b285e9c6c356b35a84
7
- data.tar.gz: 703a04218a31173f5800dffc3327eda2f3a84bacfd3c5c9f55e49d6c3a49d6e6bab3f98ccf8e9638e8bf8acd0c501724a6c8ebd10279f3dd2823a08667ab8004
6
+ metadata.gz: 4b7cd969ba9d97c71d8cdbec2cfa45eafd411f36520f55953ad4555731700622747895e7af5ed0d7b195e6e73cee3cbc810205c18995c3ba9e19c852bb57b82b
7
+ data.tar.gz: f8b230c37b8a5f23a5bd1e7d8ba6ef61e60f30b0e8ad5f79ebd554e77cf296d4781b55ad72cf398473360b105ea6c241f2a922149a71dcd907d30fb8ddc79a02
@@ -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
- break "\n..." if index == limit
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esbuild
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  ESBUILD_VERSION = "0.11.9"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bouke van der Bijl