esbuild 0.2.0 → 0.2.1

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: 2e9c31ca911178faee51719df2be97586bfd1c4c2a4503e67fe95426efd2d205
4
- data.tar.gz: 335ddbd7796cc967fcbf5ae22f0af0c1e339514474c6a1ea6bd60bf4fa78a2e1
3
+ metadata.gz: 74bfb670d772c9e5c9f595470e2f2c243057d5f4c2dcc4644e28d8c9e668f43d
4
+ data.tar.gz: 18c21c7834dc6d1d665b0de5931b2961efc0a71427611004c68ca233461cc790
5
5
  SHA512:
6
- metadata.gz: 4d38fb43578a99193341827169cf4355ebbf83fb03597958faa155b4e220e1e2e36ebc48453edf4d081404cabb3d78db2835cdacc55204a347b4280a90bb3a1a
7
- data.tar.gz: 451169a47ccac6c07afed20c69b8de217fc9f8a95a8e7a02d72fdf4bc80072cd030329cf26eaff6d2c20f11fb975fa7e79fc5422c4e083b1d5ba3f559837ba30
6
+ metadata.gz: c1a477b1a57e7c0b073bf3d123c159274739fce3b58aeb5e248034d323153e4c804c13db837c23bd0bd98813d582bc6336bc524c16dc4cdb0696bcdca3fa4672
7
+ data.tar.gz: a712ba20891c4cf0099acdd035ac4eb398057e342f9e39b2660e98e0bb83b2d95d7109180bf12d4da1f52481e1f08ffbd5e1bf0308bbdac6c5355f1f4dec378c
@@ -21,8 +21,9 @@ module Esbuild
21
21
  @serve_callbacks = Concurrent::Map.new
22
22
  @buffer = String.new(encoding: Encoding::BINARY)
23
23
 
24
- child_read, child_stdout = IO.pipe
25
- child_stdin, @child_write = IO.pipe
24
+ child_read, child_stdout = create_pipes
25
+ child_stdin, @child_write = create_pipes
26
+
26
27
  bin = binary_path
27
28
  pid = spawn(bin, "--service=#{ESBUILD_VERSION}", "--ping", out: child_stdout, err: :err, in: child_stdin)
28
29
  child_stdin.close
@@ -36,7 +37,6 @@ module Esbuild
36
37
  @build_key += 1
37
38
  opts = Flags.flags_for_build_options(options)
38
39
  on_rebuild = opts[:watch]&.fetch(:on_rebuild, nil)
39
-
40
40
  request = {
41
41
  "command" => "build",
42
42
  "key" => key,
@@ -252,6 +252,13 @@ module Esbuild
252
252
  def binary_path
253
253
  ENV["ESBUILD_BINARY_PATH"] || File.expand_path("../../bin/esbuild", __dir__)
254
254
  end
255
+
256
+ def create_pipes
257
+ r, w = IO.pipe(Encoding::BINARY, Encoding::BINARY, binmode: true)
258
+ r.set_encoding(Encoding::BINARY)
259
+ w.set_encoding(Encoding::BINARY)
260
+ [r, w]
261
+ end
255
262
  end
256
263
 
257
264
  class BuildFailureError < StandardError
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esbuild
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  ESBUILD_VERSION = "0.12.8"
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bouke van der Bijl