Releases: opal/opal
v1.8.3.rc1
Changed
- Use of
JSconstant is now deprecated. The constant has been renamed toOpal::Raw. Throw a warning if such a constant is in use (#2525)
Fixed
String#chars: Fix iteration over out-of-BMP characters (#2620)- Fix
Array#include?to respect nil return value (#2661) - Fix
opal-buildcommand line utility for newer Ruby versions (#2675) - Depend on
base64gem for Ruby 3.4 compatibility (#2652)
Internal
v1.8.2
v1.8.1
v1.8.0
Highlights
Hash is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash data structures will need to be updated.
Interacting with Hash from JavaScript is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]Performance improvements
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
Changelog
Deprecated
- Deprecate using x-string to access JavaScript without an explicit magic-comment (#2543)
Compatibility
- Add a magic-comment that will disable x-string compilation to JavaScript (#2543)
- Pass value in
PromiseV2#alwaysjust likePromiseV1#alwaysdoes it (#2579) #hashnow returns integers (#2582)- Improve
Range#include?/member?/cover?/===(#2598) - Make
Module#define_methodmore compatible with CRuby (#2593) Hash#clonemust freeze clone if original is frozen, butHash#dupmust not (#2603)
Fixed
- Fix
Kernel#Floatwithexception:option (#2532) - Fix
Kernel#Integerwithexception:option (#2531) - Fix
String#splitwith limit and capturing regexp (#2544) - Fix
switchwith Object-wrapped values (#2542) - Fix non-direct subclasses of bridged classes not calling the original constructor (#2546)
- Regexp.escape: Cast to String or drop exception (#2552)
- Propagate removal of method from included/prepended modules (#2553)
- Restore
nodejs/yamlfunctionality (#2551) - Fix sine
Range#sizeedge cases (#2541) - Use a Map instead of a POJO for the jsid_cache (#2584)
- Fix
String#object_id,String#__id__,String#hashto match CRuby's behavior (#2576) - Lowercase response headers in
SimpleServerfor rack 3.0 compatibility (#2578) - Fix
Module#cloneandModule#dupto properly copy methods (#2572) - Chrome runner fix: support code that contains
</script>(#2581) - Do not skip
$truthywhen left hand side of a comparison isself(#2596) - Unexpected
return/breakshould raiseLocalJumpError(#2591)
Added
- SourceMap support for
Kernel#eval(#2534) - Add
CGI::Util#escapeURIComponentandCGI::Util#unescapeURIComponent(#2566) CGI::Utilimplement additional methods (#2601)
Changed
- Change compilation of Regexp nodes that may contain advanced features, so if invalid that they would raise at runtime, not parse-time (#2548)
Hashis now bridged to JavaScriptMapand support for non-symbol keys in keyword arguments (#2568)
Documentation
Performance
- Improve performance of
Array#intersect?and#intersection(#2533) Proc#call: Refactor for performance (#2541)- Opal.stub_for: optimize (#2541)
- Hash: Optimize
#to_a(#2541) - Array: Optimize
#collect/#map(#2541) - Optimize argument slicing in runtime for performance (#2555)
- Closure: Generate a JavaScript object, not an Error, gain up to 15% on Asciidoctor (#2556)
- Optimize
String#splitandString#start_with(#2560) - Compute
$@dynamically (#2592) - Optimize the
$prophelper (#2597) - Improve
Array.push()performance when pushing many items (#2565) - Optimize
Opal.instance_methods(#2600)
Internal
v1.8.0.beta1
Highlights
Hash is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash data structures will need to be updated.
Interacting with Hash from JavaScript is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]Performance improvements
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
Changelog
Deprecated
- Deprecate using x-string to access JavaScript without an explicit magic-comment (#2543)
Compatibility
- Add a magic-comment that will disable x-string compilation to JavaScript (#2543)
- Pass value in
PromiseV2#alwaysjust likePromiseV1#alwaysdoes it (#2579) #hashnow returns integers #2582)
Fixed
- Fix
Kernel#Floatwithexception:option (#2532) - Fix
Kernel#Integerwithexception:option (#2531) - Fix
String#splitwith limit and capturing regexp (#2544) - Fix
switchwith Object-wrapped values (#2542) - Fix non-direct subclasses of bridged classes not calling the original constructor (#2546)
- Regexp.escape: Cast to String or drop exception (#2552)
- Propagate removal of method from included/prepended modules (#2553)
- Restore
nodejs/yamlfunctionality (#2551) - Fix sine
Range#sizeedge cases (#2541) - Use a Map instead of a POJO for the jsid_cache (#2584)
- Fix
String#object_id,String#__id__,String#hashto match CRuby's behavior (#2576) - Lowercase response headers in
SimpleServerfor rack 3.0 compatibility (#2578) - Fix
Module#cloneandModule#dupto properly copy methods (#2572) - Chrome runner fix: support code that contains
</script>(#2581) - Do not skip
$truthywhen left hand side of a comparison isself(#2596) - Unexpected
return/breakshould raiseLocalJumpError(#2591)
Added
- SourceMap support for
Kernel#eval(#2534) - Add
CGI::Util#escapeURIComponentandCGI::Util#unescapeURIComponent(#2566)
Changed
- Change compilation of Regexp nodes that may contain advanced features, so if invalid that they would raise at runtime, not parse-time (#2548)
Hashis now bridged to JavaScriptMapand support for non-symbol keys in keyword arguments (#2568)
Documentation
Performance
- Improve performance of
Array#intersect?and#intersection(#2533) Proc#call: Refactor for performance (#2541)- Opal.stub_for: optimize (#2541)
- Hash: Optimize
#to_a(#2541) - Array: Optimize
#collect/#map(#2541) - Optimize argument slicing in runtime for performance (#2555)
- Closure: Generate a JavaScript object, not an Error, gain up to 15% on Asciidoctor (#2556)
- Optimize
String#splitandString#start_with(#2560) - Compute
$@dynamically (#2592) - Optimize the
$prophelper (#2597) - Improve
Array.push()performance when pushing many items (#2565)
Internal
v1.7.4
Fixed
v1.8.0.alpha1
Highlights
Hash is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash data structures will need to be updated.
Interacting with Hash from JavaScript is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]Performance improvements
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
Changelog
Deprecated
- Deprecate using x-string to access JavaScript without an explicit magic-comment (#2543)
Compatibility
- Add a magic-comment that will disable x-string compilation to JavaScript (#2543)
Fixed
- Fix
Kernel#Floatwithexception:option (#2532) - Fix
Kernel#Integerwithexception:option (#2531) - Fix
String#splitwith limit and capturing regexp (#2544) - Fix
switchwith Object-wrapped values (#2542) - Fix non-direct subclasses of bridged classes not calling the original constructor (#2546)
- Regexp.escape: Cast to String or drop exception (#2552)
- Propagate removal of method from included/prepended modules (#2553)
- Restore
nodejs/yamlfunctionality (#2551) - Fix sine
Range#sizeedge cases (#2541)
Added
- SourceMap support for
Kernel#eval(#2534) - Add
CGI::Util#escapeURIComponentandCGI::Util#unescapeURIComponent(#2566)
Changed
- Change compilation of Regexp nodes that may contain advanced features, so if invalid that they would raise at runtime, not parse-time (#2548)
Hashis now bridged to JavaScriptMapand support for non-symbol keys in keyword arguments (#2568)
Documentation
- Bridging documentation (#2541)
Performance
- Improve performance of
Array#intersect?and#intersection(#2533) Proc#call: Refactor for performance (#2541)- Opal.stub_for: optimize (#2541)
- Hash: Optimize
#to_a(#2541) - Array: Optimize
#collect/#map(#2541) - Optimize argument slicing in runtime for performance (#2555)
- Closure: Generate a JavaScript object, not an Error, gain up to 15% on Asciidoctor (#2556)
- Optimize
String#splitandString#start_with(#2560)
Internal
v1.7.3
v1.7.2
v1.7.1
Added
- Add safari runner (#2513)
Fixed
- Fix CLI file reading for macOS (#2510)
- Make Date/Time.parse on Firefox more compatible with Chrome and Ruby (#2506)
- Safari/WebKit can now parse code compiled with lookbehind regexps, failing at runtime instead (#2511)
- Fix
--watchignoring some directories (e.g.tmp) (#2509) - Fix rake dist not generating libraries correctly for the CDN (#2515)
- Prefork: output processed files in a correct, deterministic order (#2516)
- Fix the handling of ARGV for the opal executable (#2518)