Releases: opal/opal
Releases · opal/opal
v1.7.0.rc1
Added
- Update benchmarking and CLI runners, added support for Deno and Firefox (#2490, #2492, #2494, #2495, #2497, #2491, #2496)
- Ruby 3.2 support branch (#2500)
Set
now part of the corelib- Anonymous rest keyword and block arguments can be passed to calls:
call(**, &)
Refinement#refined_class
has been addedModule#refinements
has been addedModule#const_added
has been addedProc#parameters
now accepts lambda keywordClass#attached_object
has been added, inverse ofsingleton_class
Hash#shift
now returnsnil
instead of passingnil
to thedefault_proc
- Added
--watch
and--output
options to the CLI for live compilation (#2485)
Performance
- Replace all occurences of
'$'+name
with a cached helper, saving about 2% in performance (#2481) - Optimize argument passing and arity checks (#2499)
- Targeted patches for Opal-Parser, saves up to 12% during compilation (#2482)
Internal
- MSpec & Ruby Spec update (#2486)
Fixed
- Remove throws from runtime (#2484)
v1.6.1
v1.6.0
Changed
Performance
- Improve method block performance for runtime (#2449)
- Uninline non-typical argument handling (#2419)
- Logic optimization of runtime.js (#2415)
- Windows support for
performance:compare
CI check (#2450) - Improve block performance for even more cases (#2465)
Added
- Added support for
#freeze
and#frozen?
(#2444, #2468) - Add CLI support for ESM, at least for Chrome, NodeJS, QuickJS and GJS (#2435)
- Support exit in Chrome CLI Runner, both sync and async (#2439)
- Make sure the Server CLI Runner can pick up changes in sources (#2436)
- Delegate and ruby2_keywords (#2446)
- Source code can now be embedded in the compiled file to improve development/debugging, e.g. RSpec reports,
Proc#source_location
(#2440) - Added
Kernel#caller_locations
(#2440) Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)- Add
Opal::BuilderProcessors::RubyERBProcessor
(#2470)
Fixed
- Closure tracking support fixes a whole array of bugs handling
break
/next
/retry
/ … (#2357) - Fix an edge case of if in the most complex form not returning (#2433)
String#length
is now available when usingopal/mini
(#2438)- Auto-await produced invalid code (#2440)
- Fix
Enumerable#collect_concat
and#flat_map
implementation (#2440) - Improved await support for PromiseV1 (#2440)
- Compilation error occurs while compiling
being/end
returning acase/when
(#2459) - Ensure UTF-8 encoding of
.sourcesContent
of source maps (#2451) - Benchmarks require string/unpack (#2453)
- Fix compilation of a call:
gets&.chomp
(#2473) - Fix specs on Windows (#2460)
- Make opal CLI tool work again with pipes (#2474)
Internal
- GitHub Workflows security hardening (#2432)
- Retry if file cache write operation exits with Zlib::BufError (#2463)
- Eliminate redundant
var constructor
inallocate_class
(#2452) - Fix
performance:compare
asset size calculation (#2457) - Fix a few specs after the Opal RSpec 1.0 (alpha) release (#2471, #2472)
v1.6.0.rc1
Changed
- No longer truncate stacktraces to 15 lines (#2440)
Performance
- Improve method block performance for runtime (#2449)
- Uninline non-typical argument handling (#2419)
- Logic optimization of runtime.js (#2415)
- Windows support for
performance:compare
CI check (#2450) - Improve block performance for even more cases (#2465)
Added
- Added support for
#freeze
and#frozen?
(#2444, #2468) - Add CLI support for ESM, at least for Chrome, NodeJS, QuickJS and GJS (#2435)
- Support exit in Chrome CLI Runner, both sync and async (#2439)
- Make sure the Server CLI Runner can pick up changes in sources (#2436)
- Delegate and ruby2_keywords (#2446)
- Source code can now be embedded in the compiled file to improve development/debugging, e.g. RSpec reports,
Proc#source_location
(#2440) - Added
Kernel#caller_locations
(#2440) Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)- Add
Opal::BuilderProcessors::RubyERBProcessor
(#2470)
Fixed
- Closure tracking support fixes a whole array of bugs handling
break
/next
/retry
/ … (#2357) - Fix an edge case of if in the most complex form not returning (#2433)
String#length
is now available when usingopal/mini
(#2438)- Auto-await produced invalid code (#2440)
- Fix
Enumerable#collect_concat
and#flat_map
implementation (#2440) - Improved await support for PromiseV1 (#2440)
- Compilation error occurs while compiling
being/end
returning acase/when
(#2459) - Ensure UTF-8 encoding of
.sourcesContent
of source maps (#2451) - Benchmarks require string/unpack (#2453)
- Fix compilation of a call:
gets&.chomp
(#2473) - Fix specs on Windows (#2460)
- Make opal CLI tool work again with pipes (#2474)
Internal
- GitHub Workflows security hardening (#2432)
- Retry if file cache write operation exits with Zlib::BufError (#2463)
- Eliminate redundant
var constructor
inallocate_class
(#2452) - Fix
performance:compare
asset size calculation (#2457) - Fix a few specs after the Opal RSpec 1.0 (alpha) release (#2471, #2472)
v1.6.0.alpha1
Changed
- No longer truncate stacktraces to 15 lines (#2440)
Performance
- Improve method block performance for runtime (#2449)
- Uninline non-typical argument handling (#2419)
- Logic optimization of runtime.js (#2415)
- Windows support for
performance:compare
CI check (#2450) - Improve block performance for even more cases (#2465)
Added
- Added support for
#freeze
and#frozen?
(#2444, #2468) - Add CLI support for ESM, at least for Chrome, NodeJS, QuickJS and GJS (#2435)
- Support exit in Chrome CLI Runner, both sync and async (#2439)
- Make sure the Server CLI Runner can pick up changes in sources (#2436)
- Delegate and ruby2_keywords (#2446)
- Source code can now be embedded in the compiled file to improve development/debugging, e.g. RSpec reports,
Proc#source_location
(#2440) - Added
Kernel#caller_locations
(#2440) Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454)
Fixed
- Closure tracking support fixes a whole array of bugs handling
break
/next
/retry
/ … (#2357) - Fix an edge case of if in the most complex form not returning (#2433)
String#length
is now available when usingopal/mini
(#2438)- Auto-await produced invalid code (#2440)
- Fix
Enumerable#collect_concat
and#flat_map
implementation (#2440) - Improved await support for PromiseV1 (#2440)
- Compilation error occurs while compiling
being/end
returning acase/when
(#2459) - Ensure UTF-8 encoding of
.sourcesContent
of source maps (#2451) - Benchmarks require string/unpack (#2453)
Internal
v1.5.1
Fixed
- Make
Time.new
not depend onDate.prototype.getTimezoneOffset()
(#2426) - Fix exception during
Hash#each_value
if keys get deleted during loop (#2427) - Fix scan_until and check_until implementation of StringScanner (#2420)
New Contributors
Full Changelog: v1.5.0...v1.5.1
v1.5.0
Added
- Introduce timezone support for Time by @hmdne in #2394
- DateTime and Date refactor by @hmdne in #2398
- Implement
Number#prev_float
/#next_float
by @takaram in #2404 - Support
binding.irb
anywhere in the code, for both browsers and node by @hmdne in #2392 and #2408 - Added
URI.decode_www_form
by @HoneyryderChuck in #2387
Changed
- Move
Math
IE11-supporting polyfills to a separate file by @hmdne in #2395 String
methods always return Strings even when overloaded by @hmdne in #2413- Misc changes extracted from DCE work by @elia in #2414
alias
calls will not add the "old name" method to the list of stubs for method missing
- Optimize writer/setter methods (up to 4% performance gain!) by @hmdne in #2402
- Also fixed few edge cases of conditional calls combined with setters, e.g.
foo&.bar = 123
- Also fixed few edge cases of conditional calls combined with setters, e.g.
Performance
- Runtime optimization by @hmdne in #2383
- Improve performance of argument coertion, fast-track
Integer
,String
, and calling the designed coertion method - Optimize
Array#[]=
by moving the implementation to JavaScript and inlining type checks - Optimize internal runtime passing of block-options
- Improve performance of argument coertion, fast-track
- Compile
case
statements asswitch
whenever possible by @hmdne in #2411 - Improve performance with optimized common method/iter implementation shortcuts by @hmdne in #2401
Fixed
- Fix
Regexp.new
, replace\A
to^
and\z
to$
by @ysakasin in #2079 - Fix exception during
Hash#each
andHash#each_key
if keys get deleted during the loop by @janbiedermann in #2403 - Fix defining multiple methods with the same block by @elia in #2397
- Correct
String#to_proc
andmethod_missing
compatibility by @hmdne in #2418 - Exit REPL respecting the exit status number by @janbiedermann in #2396
Internal
- Rewriters refactor, fix interaction between cache and inverted runner by @hmdne in #2400
- releasing.md: add a step to prepare for next release by @hmdne in #2407
New Contributors
- @HoneyryderChuck made their first contribution in #2387
Full Changelog: v1.4.1...v1.5.0
v1.4.1
v1.4.0
Added
- Implement
chomp:
option forString#each_line
and#lines
(#2355) - Ruby 3.1 support and some older Ruby features we missed (#2347)
- Use parser in 3.1 mode to support new language-level features like hashes/kwargs value omission, the pin operator for pattern matching
Array#intersect?
String#strip
andString#lstrip
to also remove NUL bytesInteger.try_convert
public
,private
,protected
,module_function
now return their argumentsClass#descendants
,Class#subclasses
- (<=1.8)
Kernel#local_variables
- (<=2.3) Set local variables for regexp named captures (
/(?<b>a)/ =~ 'a'
=>b = 'a'
) - Remove deprecated
NIL
,TRUE
,FALSE
constants String#unpack
andString#unpack1
to support anoffset:
kwargMatchData#match
,MatchData#match_length
- Enumerable modernization
Enumerable#tally
to support an optional hash accumulatorEnumerable#each_{cons,slice}
to return selfEnumerable#compact
Refinement
becomes its own class nowStruct#keyword_init?
- (pre-3.1) Large Enumerator rework
- Introduce
Enumerator::ArithmeticSequence
- Introduce
Enumerator::Chain
- Introduce
Enumerator#+
to createEnumerator::Chain
s Enumerator#{rewind,peek,peek_values,next,next_values}
- Improve corelib support for beginless/endless ranges and
ArithmeticSequences
String#[]
,Array#[]
,Array#[]=
,Array#fill
,Array#values_at
Range#step
andNumeric#step
return anArithmeticSequence
whenNumeric
values are in play- Introduce
Range#%
Enumerator::Yielder#to_proc
- Fix #2367
- Introduce
- (2.7)
UnboundMethod#bind_call
- (Opal)
{Kernel,BasicObject}#{inspect,p,pp,method_missing}
may work with JS native values now, also they now correctly report cycles Enumerable#sum
uses Kahan's summation algorithm to reduce error with floating point valuesFile.dirname
supports a newlevel
argument
- Vendor in
optparse
andshellwords
(#2326) - Preliminary support for compiling the whole
bin/opal
with Opal (#2326)
Fixed
- Fix coertion for
Array#drop
(#2371) - Fix coertion for
File.absolute_path
(#2372) - Fix some
IO#puts
edge cases (no args, empty array, nested array, …) (#2372) - Preserve UNC path prefix on File.join (#2366)
- Methods on
Kernel
,BasicObject
,Boolean
will never return boxed values anymore (#2293)false.tap{}
will now correctly return a JS value offalse
, notObject(false)
- opal-parser doesn't break on
<<~END
strings anymore (#2364) - Fix error reporting at the early stage of loading (#2326)
Changed
- Various outputted code size optimizations - 19% improvement for minified unmangled AsciiDoctor bundle - see: https://opalrb.com/blog/2021/11/24/optimizing-opal-output-for-size/ (#2356)
- Second round of code size optimizations - 3% improvement for AsciiDoctor bundle on top of the first round - 23% total - see: https://github.com/opal/opal/pull/2365/commits (#2365)
- The calls to
==
,!=
and===
changed their semantics slightly: it's impossible to monkey patch those calls forString
andNumber
, but on other classes they can now returnnil
and it will be handled correctly - The calls to
!
changed their semantics slightly: it's impossible to monkey patch this call forBoolean
orNilClass
.
- The calls to
- Refactored the structure of the internal
stdlib/nodejs
folder (#2374)- Added
nodejs/base
with just I/O, exit, and ARGV management - Moved
Process::Status
to corelib - Fixed requires to be more robust
- Added
Removed
v1.4.0.alpha1
Please refer to UNRELEASED.md.