opal 1.4.0 → 1.4.1

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: ec2d9bb3f02059898f9a494c018fbcb4f451c4c5130b3e9ff455bf3ce1561fc9
4
- data.tar.gz: a69e0554d43a0ef0ad6e7d439beb313536227615698487b8283321e879cf150d
3
+ metadata.gz: f199262b85612cb61bd3f3fa1d05ec8a7fb3fa6fabbd63a36baa03859e241c5c
4
+ data.tar.gz: e4af60acb540708612fbed3e4aa04fef968b750b0ff588774bda6d979586fc8f
5
5
  SHA512:
6
- metadata.gz: 5a96aade4e8183b8f00136eb4c5e64ea1f6b12b03aec98096476de4dd414b03b9ecfb90658a29bef403b366e36db43283b6e175cac5dcc3796453535f9ad7bd0
7
- data.tar.gz: 8ea23169b1492a34b5bf98750259f9d9da636bb5070b50fad624a56a2eea65f4c5975a6385af3dfbdfad2a41985f5d32ba3aa583feea39b79b59ccc3cac20c43
6
+ metadata.gz: a4ece0468468bc541c155cb53185550f35b4277c89e18f32990a7bb8abff6c20beaeb9f962f02f80b1afc251a75c0916d35dd8d2944fa8153aa4a6454a7ddf8a
7
+ data.tar.gz: 81539b2993e44bfa8217cda753badaa292c26117de8366d04e50922309b95654f5c09f983a02f329b36ea1405affc52c3831c7122f4215a90e7a78c9084b9b31
@@ -16,41 +16,44 @@ jobs:
16
16
  matrix:
17
17
  combo:
18
18
  - name: mspec-nodejs
19
- ruby: 3.0
19
+ ruby: '3.0'
20
20
  command: bin/rake mspec_nodejs
21
21
  - name: mspec-chrome
22
- ruby: 3.0
22
+ ruby: '3.0'
23
23
  command: bin/rake mspec_chrome
24
24
  - name: minitest
25
- ruby: 3.0
25
+ ruby: '3.0'
26
26
  command: bin/rake minitest
27
27
  - name: minitest-strict-mode
28
- ruby: 3.0
28
+ ruby: '3.0'
29
29
  command: bin/rake minitest
30
30
  strict: 'true'
31
+ - name: head-ruby
32
+ ruby: head
33
+ permissive: true
31
34
  - name: current-ruby
32
- ruby: 3.0
35
+ ruby: 3.1
33
36
  - name: previous-ruby
34
- ruby: 2.7
37
+ ruby: '3.0'
35
38
  - name: older-ruby
39
+ ruby: 2.7
40
+ - name: near-eol-ruby
36
41
  ruby: 2.6
37
- # - name: near-eol-ruby
38
- # ruby: 2.6
39
42
  - name: smoke-test
40
- ruby: 3.0
43
+ ruby: '3.0'
41
44
  command: bin/rake smoke_test
42
45
  - name: windows
43
46
  # These two fail because of broken stacktraces on windows: minitest_node_nodejs mspec_nodejs
44
47
  command: bundle exec rake rspec minitest_nodejs
45
- ruby: 3.0
48
+ ruby: '3.0'
46
49
  os: windows-latest
47
50
  - name: lint
48
51
  command: bin/rake lint
49
- ruby: 3.0
52
+ ruby: '3.0'
50
53
  - name: timezone
51
- ruby: 3.0
54
+ ruby: '3.0'
52
55
  - name: performance
53
- ruby: 3.0
56
+ ruby: '3.0'
54
57
  permissive: true
55
58
  fetchdepth: '0'
56
59
  command: bin/rake performance:compare
@@ -59,7 +62,6 @@ jobs:
59
62
  # Currently failing:
60
63
  # - ruby: truffleruby
61
64
  # - ruby: jruby
62
- # - ruby: ruby-head
63
65
 
64
66
  runs-on: ${{ matrix.combo.os || 'ubuntu-latest' }}
65
67
  continue-on-error: ${{ matrix.combo.permissive || false }}
@@ -77,11 +79,11 @@ jobs:
77
79
  - uses: actions/cache@v2
78
80
  with:
79
81
  path: ./vendor/bundle
80
- key: ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
82
+ key: ${{ runner.os }}-${{ matrix.combo.ruby }}-gem-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
81
83
  restore-keys: |
82
- ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}
83
- ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-master
84
- ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-
84
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gem-${{ github.ref }}
85
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gem-master
86
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gem-
85
87
  - uses: actions/cache@v2
86
88
  with:
87
89
  path: ./node_modules
data/CHANGELOG.md CHANGED
@@ -15,6 +15,27 @@ Changes are grouped as follows:
15
15
 
16
16
 
17
17
 
18
+ ## [1.4.1](https://github.com/opal/opal/compare/v1.4.0...v1.4.1) - 2022-01-12
19
+
20
+
21
+ ### Changed
22
+
23
+ - PromiseV2 is now declared a stable interface!
24
+
25
+ ### Fixed
26
+
27
+ - Args named with JS reserved words weren't always renamed when _zsuper_ was involved ([#2385](https://github.com/opal/opal/pull/2385))
28
+
29
+ <!--
30
+ ### Added
31
+ ### Removed
32
+ ### Deprecated
33
+ ### Internal
34
+ -->
35
+
36
+
37
+
38
+
18
39
  ## [1.4.0](https://github.com/opal/opal/compare/v1.3.2...v1.4.0) - 2021-12-24
19
40
 
20
41
 
data/UNRELEASED.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <!--
2
- ### Added
3
2
  ### Fixed
4
3
  ### Changed
4
+ ### Added
5
5
  ### Removed
6
6
  ### Deprecated
7
7
  ### Internal
@@ -179,28 +179,28 @@ module Opal
179
179
  same_arg_counter = Hash.new(0)
180
180
 
181
181
  def_scope.original_args.children.each do |sexp|
182
- arg_name = sexp.meta[:arg_name]
182
+ lvar_name = sexp.children[0]
183
183
 
184
184
  case sexp.type
185
185
  when :arg, :optarg
186
- arg_node = s(:lvar, arg_name)
186
+ arg_node = s(:lvar, lvar_name)
187
187
  # def m(_, _)
188
188
  # is compiled to
189
189
  # function $$m(_, __$2)
190
190
  # See Opal::Node::ArgsNode
191
- if arg_name[0] == '_'
192
- same_arg_counter[arg_name] += 1
193
- arg_node = s(:js_tmp, "#{arg_name}_$#{same_arg_counter[arg_name]}") if same_arg_counter[arg_name] > 1
191
+ if lvar_name[0] == '_'
192
+ same_arg_counter[lvar_name] += 1
193
+ arg_node = s(:js_tmp, "#{lvar_name}_$#{same_arg_counter[lvar_name]}") if same_arg_counter[lvar_name] > 1
194
194
  end
195
-
196
195
  args << arg_node
197
196
  when :restarg
198
- arg_node = arg_name ? s(:lvar, arg_name) : s(:js_tmp, '$rest_arg')
197
+ arg_node = lvar_name ? s(:lvar, lvar_name) : s(:js_tmp, '$rest_arg')
199
198
  args << s(:splat, arg_node)
200
199
  when :kwarg, :kwoptarg
201
- kwargs << s(:pair, s(:sym, arg_name), s(:lvar, arg_name))
200
+ key_name = sexp.meta[:arg_name]
201
+ kwargs << s(:pair, s(:sym, key_name), s(:lvar, lvar_name))
202
202
  when :kwrestarg
203
- arg_node = arg_name ? s(:lvar, arg_name) : s(:js_tmp, '$kw_rest_arg')
203
+ arg_node = lvar_name ? s(:lvar, lvar_name) : s(:js_tmp, '$kw_rest_arg')
204
204
  kwargs << s(:kwsplat, arg_node)
205
205
  end
206
206
  end
data/lib/opal/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  module Opal
4
4
  # WHEN RELEASING:
5
5
  # Remember to update RUBY_ENGINE_VERSION in opal/corelib/constants.rb too!
6
- VERSION = '1.4.0'
6
+ VERSION = '1.4.1'
7
7
  end
@@ -1,8 +1,8 @@
1
1
  ::RUBY_PLATFORM = 'opal'
2
2
  ::RUBY_ENGINE = 'opal'
3
3
  ::RUBY_VERSION = '3.1.0'
4
- ::RUBY_ENGINE_VERSION = '1.4.0'
5
- ::RUBY_RELEASE_DATE = '2021-12-24'
4
+ ::RUBY_ENGINE_VERSION = '1.4.1'
5
+ ::RUBY_RELEASE_DATE = '2022-01-12'
6
6
  ::RUBY_PATCHLEVEL = 0
7
7
  ::RUBY_REVISION = '0'
8
8
  ::RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2021 Adam Beynon and the Opal contributors'
@@ -0,0 +1,21 @@
1
+ describe 'super without explicit argument' do
2
+ it 'passes arguments named with js reserved word' do
3
+ parent = Class.new do
4
+ def test_args(*args) = args
5
+ def test_rest_args(*args) = args
6
+ def test_kwargs(**args) = args
7
+ def test_rest_kwargs(**args) = args
8
+ end
9
+ klass = Class.new(parent) do
10
+ def test_args(native) = super
11
+ def test_rest_args(*native) = super
12
+ def test_kwargs(native:) = super
13
+ def test_rest_kwargs(**native) = super
14
+ end
15
+
16
+ klass.new.test_args(1).should == [1]
17
+ klass.new.test_rest_args(2).should == [2]
18
+ klass.new.test_kwargs(native: 3).should == {native: 3}
19
+ klass.new.test_rest_kwargs(native: 4).should == {native: 4}
20
+ end
21
+ end
data/stdlib/promise/v2.rb CHANGED
@@ -98,13 +98,6 @@
98
98
  # end
99
99
  #
100
100
 
101
- if `Opal.config.experimental_features_severity == 'warning'`
102
- warn 'PromiseV2 is a technology preview, which means it may change its behavior ' \
103
- 'in the future until this warning is removed. If you are interested in this part, ' \
104
- 'please make sure you track the async/await/promises tag on Opal issues: ' \
105
- 'https://github.com/opal/opal/issues?q=label%3Aasync%2Fawait%2Fpromises'
106
- end
107
-
108
101
  class PromiseV2 < `Promise`
109
102
  class << self
110
103
  def allocate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-12-24 00:00:00.000000000 Z
13
+ date: 2022-01-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ast
@@ -860,6 +860,7 @@ files:
860
860
  - spec/opal/core/language/numblocks_spec.rb
861
861
  - spec/opal/core/language/pattern_matching_spec.rb
862
862
  - spec/opal/core/language/safe_navigator_spec.rb
863
+ - spec/opal/core/language/super_spec.rb
863
864
  - spec/opal/core/language/while_spec.rb
864
865
  - spec/opal/core/language/xstring_spec.rb
865
866
  - spec/opal/core/language_spec.rb
@@ -1151,10 +1152,10 @@ licenses:
1151
1152
  metadata:
1152
1153
  homepage_uri: https://opalrb.com/
1153
1154
  bug_tracker_uri: https://github.com/opal/opal/issues
1154
- changelog_uri: https://github.com/opal/opal/blob/v1.4.0/CHANGELOG.md
1155
- readme_uri: https://github.com/opal/opal/blob/v1.4.0/README.md
1156
- api_documentation_uri: http://opalrb.com/docs/api/v1.4.0/index.html
1157
- guides_uri: http://opalrb.com/docs/guides/v1.4.0/index.html
1155
+ changelog_uri: https://github.com/opal/opal/blob/v1.4.1/CHANGELOG.md
1156
+ readme_uri: https://github.com/opal/opal/blob/v1.4.1/README.md
1157
+ api_documentation_uri: http://opalrb.com/docs/api/v1.4.1/index.html
1158
+ guides_uri: http://opalrb.com/docs/guides/v1.4.1/index.html
1158
1159
  chat_uri: https://gitter.im/opal/opal
1159
1160
  source_code_uri: https://github.com/opal/opal
1160
1161
  post_install_message: