isomorfeus-speednode 0.4.4 → 0.4.5

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: 1a2f7d96883b92de64ef9d3432854caba940a961a38bc4c22067c33eb8e6c9cd
4
- data.tar.gz: 82bdc61da0e3aa48348e59d600e6d39658b7e6fd04f17f00b89cbf0db4986e38
3
+ metadata.gz: 87a39ac56870791f30d5da2cd2421132b54360e732596b487a674fd77985bfb4
4
+ data.tar.gz: e9f56a2e8f8596e7757da194b70fe299ec63566472da5e81188a997b6fb54558
5
5
  SHA512:
6
- metadata.gz: 6944313b70b37a8fcea6598d4b83e437b644e86ce63a5989b7ce6d55d8f8786eafa33a629bfafbd2c5ee9be167967128e03ab82cb93f873f6f0bd70877bd9fd3
7
- data.tar.gz: e06a2a69e670619b5660c9da30d14d7b4f6a8a34d1688ebac88c597bc411c2ef78d8f949496829602f329afd58c7a3c1ccd4e7a3a306be5567b9dbd45e7668c2
6
+ metadata.gz: d5710791bcc21e6694223d430ef943d526819a7159442003285ab0e12c07cf168856394a2eaf825edd82aca5d96b3da609322694237d9cbb069e4a25d97ddf63
7
+ data.tar.gz: 1dac21aab4f330ba546ae5389facd15858120109ae7996b955108c39bbb004f72ca612c63c8fd78b485c4a723fd9c03ddc6bdeddaf87766f92b213090c51e37a
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # isomorfeus-speednode
1
+ <h1 align="center">
2
+ <img src="https://github.com/isomorfeus/isomorfeus-speednode/blob/master/Logo.png?raw=true" align="center" width="234" height="127"/><br/>
3
+ Isomorfeus Speednode<br/>
4
+ </h1>
2
5
 
3
6
  A fast runtime for execjs using node js. Works on Linux, BSDs, MacOS and Windows.
4
7
  Inspired by [execjs-fastnode](https://github.com/jhawthorn/execjs-fastnode).
5
8
 
6
9
  ### Community and Support
7
- At the [Isomorfeus Framework Project](http://isomorfeus.com)
8
-
9
- ### Tested
10
- [TravisCI](https://travis-ci.org): [![Build Status](https://travis-ci.org/isomorfeus/isomorfeus-speednode.svg?branch=master)](https://travis-ci.org/isomorfeus/isomorfeus-speednode)
10
+ At the [Isomorfeus Framework Project](http://isomorfeus.com)
11
11
 
12
12
  ### Installation
13
13
 
@@ -40,8 +40,8 @@ Example for a compatible context:
40
40
  compat_context = ExecJS.compile('Test = "test"')
41
41
  compat_context.eval('1+1')
42
42
  ```
43
- #### Permissive
44
- A permissive context can be created with `ExecJS.permissive_compile` or code can be executed within a permissive context by using
43
+ #### Permissive
44
+ A permissive context can be created with `ExecJS.permissive_compile` or code can be executed within a permissive context by using
45
45
  `ExecJS.permissive_eval` or `ExecJS.permissive_exec`.
46
46
  Example for a permissive context:
47
47
  ```ruby
@@ -63,7 +63,7 @@ context.eval <<~JAVASCRIPT
63
63
  return new Promise(function (resolve, reject) { resolve(val); });
64
64
  }
65
65
  JAVASCRIPT
66
-
66
+
67
67
  context.await("foo('test')") # => 'test'
68
68
  ```
69
69
 
@@ -125,7 +125,11 @@ module Isomorfeus
125
125
  @socket_dir = Dir.mktmpdir("isomorfeus-speednode-")
126
126
  @socket_path = File.join(@socket_dir, "socket")
127
127
  end
128
- @pid = Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:source_maps], @options[:runner_path])
128
+ @pid = if @options.key?(:source_maps)
129
+ Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:source_maps], @options[:runner_path])
130
+ else
131
+ Process.spawn({"SOCKET_PATH" => @socket_path}, @options[:binary], @options[:runner_path])
132
+ end
129
133
 
130
134
  retries = 100
131
135
 
@@ -22,11 +22,11 @@ module Isomorfeus
22
22
  @encoding = options[:encoding]
23
23
  @deprecated = !!options[:deprecated]
24
24
 
25
- @vm = VM.new(
26
- binary: @binary,
27
- source_maps: '--enable-source-maps',
28
- runner_path: @runner_path
29
- )
25
+ @vm = if Gem::Platform.local.cpu.start_with?('arm')
26
+ VM.new(binary: @binary, runner_path: @runner_path)
27
+ else
28
+ VM.new(binary: @binary, source_maps: '--enable-source-maps', runner_path: @runner_path)
29
+ end
30
30
 
31
31
  @popen_options = {}
32
32
  @popen_options[:external_encoding] = @encoding if @encoding
@@ -1,5 +1,5 @@
1
- module Isomorfeus
2
- module Speednode
3
- VERSION = '0.4.4'
4
- end
5
- end
1
+ module Isomorfeus
2
+ module Speednode
3
+ VERSION = '0.4.5'
4
+ end
5
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-speednode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-14 00:00:00.000000000 Z
11
+ date: 2021-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs