Skip to content

Releases: opal/opal

v1.7.0.rc1

22 Dec 17:37
v1.7.0.rc1
9ffdbbe
Compare
Choose a tag to compare
v1.7.0.rc1 Pre-release
Pre-release

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 added
    • Module#refinements has been added
    • Module#const_added has been added
    • Proc#parameters now accepts lambda keyword
    • Class#attached_object has been added, inverse of singleton_class
    • Hash#shift now returns nil instead of passing nil to the default_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

09 Dec 12:07
v1.6.1
064d092
Compare
Choose a tag to compare

Fixed

  • Fix builder.dup breaking Tilt support (#2479)

Changed

  • Build also opal variants for the CDN: opal/mini.js etc. (#2489)

v1.6.0

24 Nov 09:04
v1.6.0
e5f5bc1
Compare
Choose a tag to compare

Changed

  • No longer truncate stacktraces to 15 lines (#2440)
  • Mark async/await as non-experimental (#2477)

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 using opal/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 a case/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 in allocate_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

18 Nov 08:20
v1.6.0.rc1
8533e57
Compare
Choose a tag to compare
v1.6.0.rc1 Pre-release
Pre-release

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 using opal/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 a case/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 in allocate_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

11 Nov 09:09
v1.6.0.alpha1
b5caa29
Compare
Choose a tag to compare
v1.6.0.alpha1 Pre-release
Pre-release

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 using opal/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 a case/when (#2459)
  • Ensure UTF-8 encoding of .sourcesContent of source maps (#2451)
  • Benchmarks require string/unpack (#2453)

Internal

  • GitHub Workflows security hardening (#2432)
  • Retry if file cache write operation exits with Zlib::BufError (#2463)
  • Eliminate redundant var constructor in allocate_class (#2452)
  • Fix performance:compare asset size calculation (#2457)

v1.5.1

20 Jul 07:18
v1.5.1
77fd5aa
Compare
Choose a tag to compare

Fixed

  • Make Time.new not depend on Date.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

13 Apr 08:14
v1.5.0
534edd1
Compare
Choose a tag to compare

Added

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

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
  • Compile case statements as switch 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 and Hash#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 and method_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

Full Changelog: v1.4.1...v1.5.0

v1.4.1

12 Jan 08:31
v1.4.1
f46d229
Compare
Choose a tag to compare

Changed

  • PromiseV2 is now declared a stable interface! (#2380)

Fixed

  • Args named with JS reserved words weren't always renamed when zsuper was involved (#2385)

v1.4.0

24 Dec 09:37
v1.4.0
6e6af72
Compare
Choose a tag to compare

Added

  • Implement chomp: option for String#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 and String#lstrip to also remove NUL bytes
    • Integer.try_convert
    • public, private, protected, module_function now return their arguments
    • Class#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 and String#unpack1 to support an offset: kwarg
    • MatchData#match, MatchData#match_length
    • Enumerable modernization
      • Enumerable#tally to support an optional hash accumulator
      • Enumerable#each_{cons,slice} to return self
      • Enumerable#compact
    • Refinement becomes its own class now
    • Struct#keyword_init?
    • (pre-3.1) Large Enumerator rework
      • Introduce Enumerator::ArithmeticSequence
      • Introduce Enumerator::Chain
      • Introduce Enumerator#+ to create Enumerator::Chains
      • 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 and Numeric#step return an ArithmeticSequence when Numeric values are in play
      • Introduce Range#%
      • Enumerator::Yielder#to_proc
      • Fix #2367
    • (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 values
    • File.dirname supports a new level argument
  • Vendor in optparse and shellwords (#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 of false, not Object(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 for String and Number, but on other classes they can now return nil and it will be handled correctly
    • The calls to ! changed their semantics slightly: it's impossible to monkey patch this call for Boolean or NilClass.
  • 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

Removed

  • Removed nodejs/irb from stdlib as it's been broken for some time (#2374)
  • Removed Kernel#node_require from nodejs/kernel as it's been deprecated for a long time (#2374)

v1.4.0.alpha1

21 Dec 09:21
v1.4.0.alpha1
9602ec8
Compare
Choose a tag to compare
v1.4.0.alpha1 Pre-release
Pre-release

Please refer to UNRELEASED.md.