opal 1.6.0.rc1 → 1.6.0

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: 9bc96268e7c234e02e983299ec4e04de40283cd5dec33a944aca6567bddaf927
4
- data.tar.gz: 34a0a446e2c6a8564cb1ec9523a88acfaf667f2b35d77aebde437e5658eb8b95
3
+ metadata.gz: 849fd3ee9a34f471ea70ff0069aedfc41b66471e846b81c59e6fd17370e881a6
4
+ data.tar.gz: 71220b09662aef06681fadb4e0841eb110afa4a3e15b14e77de9a6e0666f0564
5
5
  SHA512:
6
- metadata.gz: 470926fc4eb90e7effc90cc193fdf80746f26ecffff79ddd602c7c275e2e17638206a230079370f3fd30923f00988bd497f1ec38914ae50fa49a90ff76ab14a6
7
- data.tar.gz: 83fa53a8d529538c321dad65ba704e4ec3fd4ab92e8de57a2865fb1da38a205008729eddd5444e1f7c15ef19cc11f228e0cad9d692e32c558cf346fac62c1c66
6
+ metadata.gz: 62c5c2f184630d3fc92ec3792e5022434668d33023b89c36a49e128991a7aeea26d61f7ed7559e57e9def93577a94d784f6308c65a78c3ac83726d50942e3435
7
+ data.tar.gz: b7ede6f69220d31c0b8dc0f8350b3699c428d50471ef8d9df47a1a6c9b197116994d1b682681ee37a83b2a0c8547b93e059295c555074a093403ebe9d6ccf84a
data/CHANGELOG.md CHANGED
@@ -10,11 +10,76 @@ Changes are grouped as follows:
10
10
  - **Removed** for deprecated features removed in this release.
11
11
  - **Fixed** for any bug fixes.
12
12
  - **Security** to invite users to upgrade in case of vulnerabilities.
13
+ - **Performance** changes related to speed and efficiency.
13
14
 
14
15
 
15
16
 
16
17
 
17
18
 
19
+ ## [1.6.0](https://github.com/opal/opal/compare/v1.5.1...v1.6.0) - 2022-11-24
20
+
21
+
22
+ <!--
23
+ ### Internal
24
+ ### Changed
25
+ ### Added
26
+ ### Removed
27
+ ### Deprecated
28
+ ### Performance
29
+ ### Fixed
30
+ -->
31
+
32
+ ### Changed
33
+
34
+ - No longer truncate stacktraces to 15 lines ([#2440](https://github.com/opal/opal/pull/2440))
35
+ - Mark async/await as non-experimental ([#2477](https://github.com/opal/opal/pull/2477))
36
+
37
+ ### Performance
38
+
39
+ - Improve method block performance for runtime ([#2449](https://github.com/opal/opal/pull/2449))
40
+ - Uninline non-typical argument handling ([#2419](https://github.com/opal/opal/pull/2419))
41
+ - Logic optimization of runtime.js ([#2415](https://github.com/opal/opal/pull/2415))
42
+ - Windows support for `performance:compare` CI check ([#2450](https://github.com/opal/opal/pull/2450))
43
+ - Improve block performance for even more cases ([#2465](https://github.com/opal/opal/pull/2465))
44
+
45
+ ### Added
46
+
47
+ - Added support for `#freeze` and `#frozen?` (#2444, #2468)
48
+ - Add CLI support for ESM, at least for Chrome, NodeJS, QuickJS and GJS ([#2435](https://github.com/opal/opal/pull/2435))
49
+ - Support exit in Chrome CLI Runner, both sync and async ([#2439](https://github.com/opal/opal/pull/2439))
50
+ - Make sure the Server CLI Runner can pick up changes in sources ([#2436](https://github.com/opal/opal/pull/2436))
51
+ - Delegate and ruby2_keywords ([#2446](https://github.com/opal/opal/pull/2446))
52
+ - Source code can now be embedded in the compiled file to improve development/debugging, e.g. RSpec reports, `Proc#source_location` ([#2440](https://github.com/opal/opal/pull/2440))
53
+ - Added `Kernel#caller_locations` ([#2440](https://github.com/opal/opal/pull/2440))
54
+ - `Opal::Builder::Prefork` for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)
55
+ - Add `Opal::BuilderProcessors::RubyERBProcessor` ([#2470](https://github.com/opal/opal/pull/2470))
56
+
57
+ ### Fixed
58
+
59
+ - Closure tracking support fixes a whole array of bugs handling `break` / `next` / `retry` / … ([#2357](https://github.com/opal/opal/pull/2357))
60
+ - Fix an edge case of if in the most complex form not returning ([#2433](https://github.com/opal/opal/pull/2433))
61
+ - `String#length` is now available when using `opal/mini` ([#2438](https://github.com/opal/opal/pull/2438))
62
+ - Auto-await produced invalid code ([#2440](https://github.com/opal/opal/pull/2440))
63
+ - Fix `Enumerable#collect_concat` and `#flat_map` implementation ([#2440](https://github.com/opal/opal/pull/2440))
64
+ - Improved await support for PromiseV1 ([#2440](https://github.com/opal/opal/pull/2440))
65
+ - Compilation error occurs while compiling `being/end` returning a `case/when` ([#2459](https://github.com/opal/opal/pull/2459))
66
+ - Ensure UTF-8 encoding of `.sourcesContent` of source maps ([#2451](https://github.com/opal/opal/pull/2451))
67
+ - Benchmarks require string/unpack ([#2453](https://github.com/opal/opal/pull/2453))
68
+ - Fix compilation of a call: `gets&.chomp` ([#2473](https://github.com/opal/opal/pull/2473))
69
+ - Fix specs on Windows ([#2460](https://github.com/opal/opal/pull/2460))
70
+ - Make opal CLI tool work again with pipes ([#2474](https://github.com/opal/opal/pull/2474))
71
+
72
+ ### Internal
73
+
74
+ - GitHub Workflows security hardening ([#2432](https://github.com/opal/opal/pull/2432))
75
+ - Retry if file cache write operation exits with Zlib::BufError ([#2463](https://github.com/opal/opal/pull/2463))
76
+ - Eliminate redundant `var constructor` in `allocate_class` ([#2452](https://github.com/opal/opal/pull/2452))
77
+ - Fix `performance:compare` asset size calculation ([#2457](https://github.com/opal/opal/pull/2457))
78
+ - Fix a few specs after the Opal RSpec 1.0 (alpha) release (#2471, #2472)
79
+
80
+
81
+
82
+
18
83
  ## [1.5.1](https://github.com/opal/opal/compare/v1.5.0...v1.5.1) - 2022-07-20
19
84
 
20
85
 
@@ -24,6 +89,11 @@ Changes are grouped as follows:
24
89
  - Fix exception during `Hash#each_value` if keys get deleted during loop ([#2427](https://github.com/opal/opal/pull/2427))
25
90
  - Fix scan_until and check_until implementation of StringScanner ([#2420](https://github.com/opal/opal/pull/2420))
26
91
 
92
+ ## New Contributors
93
+ * @Leon0402 made their first contribution in https://github.com/opal/opal/pull/2420
94
+
95
+ **Full Changelog**: https://github.com/opal/opal/compare/v1.5.0...v1.5.1
96
+
27
97
 
28
98
 
29
99
 
data/UNRELEASED.md CHANGED
@@ -8,49 +8,3 @@
8
8
  ### Fixed
9
9
  -->
10
10
 
11
- ### Changed
12
-
13
- - No longer truncate stacktraces to 15 lines (#2440)
14
-
15
- ### Performance
16
-
17
- - Improve method block performance for runtime (#2449)
18
- - Uninline non-typical argument handling (#2419)
19
- - Logic optimization of runtime.js (#2415)
20
- - Windows support for `performance:compare` CI check (#2450)
21
- - Improve block performance for even more cases (#2465)
22
-
23
- ### Added
24
-
25
- - Added support for `#freeze` and `#frozen?` (#2444, #2468)
26
- - Add CLI support for ESM, at least for Chrome, NodeJS, QuickJS and GJS (#2435)
27
- - Support exit in Chrome CLI Runner, both sync and async (#2439)
28
- - Make sure the Server CLI Runner can pick up changes in sources (#2436)
29
- - Delegate and ruby2_keywords (#2446)
30
- - Source code can now be embedded in the compiled file to improve development/debugging, e.g. RSpec reports, `Proc#source_location` (#2440)
31
- - Added `Kernel#caller_locations` (#2440)
32
- - `Opal::Builder::Prefork` for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)
33
- - Add `Opal::BuilderProcessors::RubyERBProcessor` (#2470)
34
-
35
- ### Fixed
36
-
37
- - Closure tracking support fixes a whole array of bugs handling `break` / `next` / `retry` / … (#2357)
38
- - Fix an edge case of if in the most complex form not returning (#2433)
39
- - `String#length` is now available when using `opal/mini` (#2438)
40
- - Auto-await produced invalid code (#2440)
41
- - Fix `Enumerable#collect_concat` and `#flat_map` implementation (#2440)
42
- - Improved await support for PromiseV1 (#2440)
43
- - Compilation error occurs while compiling `being/end` returning a `case/when` (#2459)
44
- - Ensure UTF-8 encoding of `.sourcesContent` of source maps (#2451)
45
- - Benchmarks require string/unpack (#2453)
46
- - Fix compilation of a call: `gets&.chomp` (#2473)
47
- - Fix specs on Windows (#2460)
48
- - Make opal CLI tool work again with pipes (#2474)
49
-
50
- ### Internal
51
-
52
- - GitHub Workflows security hardening (#2432)
53
- - Retry if file cache write operation exits with Zlib::BufError (#2463)
54
- - Eliminate redundant `var constructor` in `allocate_class` (#2452)
55
- - Fix `performance:compare` asset size calculation (#2457)
56
- - Fix a few specs after the Opal RSpec 1.0 (alpha) release (#2471, #2472)
data/docs/async.md CHANGED
@@ -1,16 +1,5 @@
1
1
  # Asynchronous code (PromiseV2 / async / await)
2
2
 
3
- Please be aware that this functionality is marked as experimental and may change
4
- in the future.
5
-
6
- In order to disable the warnings that will be shown if you use those experimental
7
- features, add the following line before requiring `promise/v2` or `await` and after
8
- requiring `opal`.
9
-
10
- ```ruby
11
- `Opal.config.experimental_features_severity = 'ignore'`
12
- ```
13
-
14
3
  ## PromiseV2
15
4
 
16
5
  In Opal 1.2 we introduced PromiseV2 which is to replace the default Promise in Opal 2.0
@@ -52,7 +41,7 @@ require "await"
52
41
 
53
42
  def wait_5_seconds
54
43
  puts "Let's wait 5 seconds..."
55
- sleep(5).await
44
+ sleep(5).__await__
56
45
  puts "Done!"
57
46
  end
58
47
 
@@ -60,14 +49,11 @@ wait_5_seconds.__await__
60
49
  ```
61
50
 
62
51
  It's important to understand what happens under the hood: every scope in which `#__await__` is
63
- encountered will become async, which means that it will return a Promise that will resolve
52
+ encountered will become async, which means that it will return a PromiseV2 that will resolve
64
53
  to a value. This includes methods, blocks and the top scope. This means, that `#__await__` is
65
54
  infectious and you need to remember to `#__await__` everything along the way, otherwise
66
55
  a program will finish too early and the values may be incorrect.
67
56
 
68
- [You can take a look at how we ported Minitest to support asynchronous tests.](https://github.com/opal/opal/pull/2221/commits/8383c7b45a94fe4628778f429508b9c08c8948b0) Take note, that
69
- it was ported to use `#await` while the finally accepted version uses `#__await__`.
70
-
71
57
  It is certainly correct to `#__await__` any value, including non-Promises, for instance
72
58
  `5.__await__` will correctly resolve to `5` (except that it will make the scope an async
73
59
  function, with all the limitations described above).
@@ -76,6 +62,8 @@ The `await` stdlib module includes a few useful functions, like async-aware `eac
76
62
  function and `sleep` that doesn't block the thread. It also includes a method `#await`
77
63
  which is an alias of `#itself` - it makes sense to auto-await that method.
78
64
 
65
+ [You can take a look at how we ported Minitest to support asynchronous tests.](https://github.com/opal/opal/pull/2221/files#diff-bdc8868ad4476bff7b25475f1b19059ac684d64c6531a645b3ba0aef0c466d0f).
66
+
79
67
  This approach is certainly incompatible with what Ruby does, but due to a dynamic nature
80
68
  of Ruby and a different model of JavaScript this was the least invasive way to catch up
81
69
  with the latest JavaScript trends and support `Promise` heavy APIs and asynchronous code.
@@ -106,4 +94,4 @@ require "await"
106
94
  p i
107
95
  sleep i
108
96
  end
109
- ```
97
+ ```
data/docs/releasing.md CHANGED
@@ -18,14 +18,14 @@ _This guide is a work-in-progress._
18
18
  - Commit the updated changelog along with the version bump using this commit message:
19
19
  "Release v1.2.3"
20
20
  - Push the commit and run `bin/rake release` to release the new version to Rubygems
21
- - Go to GitHub releases and create a new release from the latest tag pasting the contents from CHANGELOG.md
21
+ - Go to GitHub releases and create a new release from the latest tag pasting the contents from CHANGELOG.md (or UNRELEASED.md for pre-releases)
22
22
 
23
23
  ## Opal docs
24
24
 
25
25
  - Open `opal-docs` and run `bin/build v1.2.3`
26
26
  - Then run `bin/deploy`
27
27
 
28
- ## Opal site
28
+ ## [skip for pre-releases] Opal site
29
29
 
30
30
  - Open `opal.github.io` and update the opal version in the `Gemfile`
31
31
  - run `bin/build`
@@ -35,9 +35,8 @@ _This guide is a work-in-progress._
35
35
 
36
36
  - Run `bin/release v1.2.3`
37
37
 
38
- ## Prepare for the next release
38
+ ## [skip for minor-releases] Prepare for the next release
39
39
 
40
- - Skip this step if releasing a stable release
41
40
  - Create a new pull request that:
42
41
  - Updates a version to `v1.x.0.dev` in both `lib/opal/version.rb` and `opal/corelib/constants.rb`
43
42
  - Remember to merge that PR before merging anything else next once we decide to not release any more point releases from `master`.
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.6.0.rc1'
6
+ VERSION = '1.6.0'
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.6.0.rc1'
5
- ::RUBY_RELEASE_DATE = '2022-11-18'
4
+ ::RUBY_ENGINE_VERSION = '1.6.0'
5
+ ::RUBY_RELEASE_DATE = '2022-11-24'
6
6
  ::RUBY_PATCHLEVEL = 0
7
7
  ::RUBY_REVISION = '0'
8
8
  ::RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2022 Adam Beynon and the Opal contributors'
data/stdlib/await.rb CHANGED
@@ -1,13 +1,6 @@
1
1
  # helpers: coerce_to
2
2
  # await: await
3
3
 
4
- if `Opal.config.experimental_features_severity == 'warning'`
5
- warn 'Await functionality is a technology preview, which means it may change its behavior ' \
6
- 'in the future unless this warning is removed. If you are interested in this part, ' \
7
- 'please make sure you track the async/await/promises tag on Opal issues: ' \
8
- 'https://github.com/opal/opal/issues?q=label%3Aasync%2Fawait%2Fpromises'
9
- end
10
-
11
4
  %x{
12
5
  var AsyncFunction = Object.getPrototypeOf(async function() {}).constructor;
13
6
  }
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.6.0.rc1
4
+ version: 1.6.0
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: 2022-11-18 00:00:00.000000000 Z
13
+ date: 2022-11-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ast
@@ -1169,10 +1169,10 @@ licenses:
1169
1169
  metadata:
1170
1170
  homepage_uri: https://opalrb.com/
1171
1171
  bug_tracker_uri: https://github.com/opal/opal/issues
1172
- changelog_uri: https://github.com/opal/opal/blob/v1.6.0.rc1/CHANGELOG.md
1173
- readme_uri: https://github.com/opal/opal/blob/v1.6.0.rc1/README.md
1174
- api_documentation_uri: http://opalrb.com/docs/api/v1.6.0.rc1/index.html
1175
- guides_uri: http://opalrb.com/docs/guides/v1.6.0.rc1/index.html
1172
+ changelog_uri: https://github.com/opal/opal/blob/v1.6.0/CHANGELOG.md
1173
+ readme_uri: https://github.com/opal/opal/blob/v1.6.0/README.md
1174
+ api_documentation_uri: http://opalrb.com/docs/api/v1.6.0/index.html
1175
+ guides_uri: http://opalrb.com/docs/guides/v1.6.0/index.html
1176
1176
  chat_uri: https://gitter.im/opal/opal
1177
1177
  source_code_uri: https://github.com/opal/opal
1178
1178
  post_install_message:
@@ -1186,9 +1186,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1186
1186
  version: '2.3'
1187
1187
  required_rubygems_version: !ruby/object:Gem::Requirement
1188
1188
  requirements:
1189
- - - ">"
1189
+ - - ">="
1190
1190
  - !ruby/object:Gem::Version
1191
- version: 1.3.1
1191
+ version: '0'
1192
1192
  requirements: []
1193
1193
  rubygems_version: 3.3.22
1194
1194
  signing_key: