All Versions
75
Latest Version
Avg Release Cycle
70 days
Latest Release
977 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v1.5.1 Changes
July 20, 2022 -
v1.5.0 Changes
April 13, 2022โ Added
- ๐ Introduce timezone support for Time by @hmdne in https://github.com/opal/opal/pull/2394
- ๐จ DateTime and Date refactor by @hmdne in https://github.com/opal/opal/pull/2398
- Implement
Number#prev_float
/#next_float
by @takaram in https://github.com/opal/opal/pull/2404 - ๐ Support
binding.irb
anywhere in the code, for both browsers and node by @hmdne in https://github.com/opal/opal/pull/2392 and https://github.com/opal/opal/pull/2408 - Added
URI.decode_www_form
by @HoneyryderChuck in https://github.com/opal/opal/pull/2387
๐ Changed
- ๐ Move
Math
IE11-supporting polyfills to a separate file by @hmdne in https://github.com/opal/opal/pull/2395 String
methods always return Strings even when overloaded by @hmdne in https://github.com/opal/opal/pull/2413- Misc changes extracted from DCE work by @elia in https://github.com/opal/opal/pull/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 https://github.com/opal/opal/pull/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 https://github.com/opal/opal/pull/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 https://github.com/opal/opal/pull/2411 - ๐ Improve performance with optimized common method/iter implementation shortcuts by @hmdne in https://github.com/opal/opal/pull/2401
๐ Fixed
- ๐ Fix
Regexp.new
, replace\A
to^
and\z
to$
by @ysakasin in https://github.com/opal/opal/pull/2079 - ๐ Fix exception during
Hash#each
andHash#each_key
if keys get deleted during the loop by @janbiedermann in https://github.com/opal/opal/pull/2403 - ๐ Fix defining multiple methods with the same block by @elia in https://github.com/opal/opal/pull/2397
- Correct
String#to_proc
andmethod_missing
compatibility by @hmdne in https://github.com/opal/opal/pull/2418 - Exit REPL respecting the exit status number by @janbiedermann in https://github.com/opal/opal/pull/2396
Internal
- ๐จ Rewriters refactor, fix interaction between cache and inverted runner by @hmdne in https://github.com/opal/opal/pull/2400
- ๐ releasing.md: add a step to prepare for next release by @hmdne in https://github.com/opal/opal/pull/2407
-
v1.4.1 Changes
January 12, 2022๐ Changed
- PromiseV2 is now declared a stable interface!
๐ Fixed
- Args named with JS reserved words weren't always renamed when zsuper was involved (#2385)
<!--
โ Added
โ Removed
๐ Deprecated
Internal
-->
-
v1.4.0 Changes
December 24, 2021โ 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
- (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
- โ Removed
nodejs/irb
from stdlib as it's been broken for some time (#2374) - โ Removed
Kernel#node_require
fromnodejs/kernel
as it's been deprecated for a long time (#2374)
<!--
๐ Deprecated
Internal
-->
- Implement
-
v1.3.2 Changes
November 10, 2021๐ Fixed
- ๐ Update documentation (#2350)
- ๐ Fix
IO#gets
getting an extra char under some circumstances (#2349) - Raise a
TypeError
instead ofUndefinedMethod
if not a string is passed to__send__
(#2346) - Do not modify
$~
when callingString#scan
from internal methods (#2353) - Stop interpreting falsey values as a missing constant in
Module#const_get
(#2354)
-
v1.3.1 Changes
November 03, 2021๐ Fixed
- ๐ Fix REPL if bundler environment isn't set (#2338)
- ๐ Fix Chrome runner if bundler environment isn't set and make it work on other Unixes (#2339)
Proc#binding
to return a binding ifBinding
is defined (#2341, #2340)Array#zip
to correctlyyield
(#2342, #1611)String#scan
to correctlyyield
(#2342, #1660)
-
v1.3.0 Changes
October 27, 2021โ Added
- โ Add support for
retry
(#2264) - Modernize Exceptions (#2264)
- Add
#cause
,#backtrace_locations
,#full_message
toException
- Normalize backtraces across platforms
- Add
Thread::Backtrace::Location
- Output Exception#full_message on uncaught exceptions (#2269)
- Add
- ๐ TracePoint
:class
support (#2049) - Implement the Flip-Flop operators (#2261)
- โ Add
JS[]
to access properties on the global object (#2259) - โ Add
ENV.fetch
to the Nodejs implementation ofENV
(#2259) - 0๏ธโฃ Opal::Cache, an optional compiler cache (enabled by default) (#2242, #2278, #2329)
- Alias for gvars, alias on main (#2270)
- ๐ Support for GJS (GNOME's JavaScript runtime) runner (#2280)
- ๐ Scope variables support for
eval()
(#2256) - โ Add support for
Kernel#binding
(#2256) - ๐ A (mostly) correct support for refinements (#2256)
- โ Add support for ECMAScript modules with an
--esm
CLI option (#2286) - ๐ Implement
Regexp#names
and add named captures support (#2272) - REPL improvements: (#2285)
- Colored output & history support
ls
to show available constants and variable
- โ Add
Method#===
as an alias toMethod#call
, works the same asProc#===
(#2305) - โ Add
IO#gets
andIO#read_proc
along with other supporting methods (#2309)- Support
#gets
on most platforms, including browsers (viaprompt
) - Move the REPL to a
--repl
CLI option of the main executable - Completely refactor IO, now supporting methods like
#each_line
throughout the entire IO chain - Add a runner for MiniRacer (as
miniracer
) - Support Windows on the Chrome runner
- Support Windows on the REPL
- Platforms an IO implementations should either set
IO#read_proc
or overwriteIO#sysread
- Support
- ๐ [experimental] Add support for JavaScript async/await (#2221)
- Enable the feature by adding a magic comment:
# await: true
- The magic comment can be also used to mark specific method patterns to be awaited
(e.g.
# await: *_await, sleep
will make any method ending in_await
or namedsleep
to be awaited) - Add
Kernel#__await__
as a bridge to theawait
keyword (inspired by CoffeeScript await support) - Require
opal/await
to get additional support - Read more on the newly added documentation page
- Enable the feature by adding a magic comment:
- ๐ Better interoperability between legacy Promise (v1) and native Promise (v2) (#2221)
- Add
PromiseV1
as an alias to the original (legacy) Promise class - Add
#to_v1
and#to_v2
to both classes Promise#to_n
will convert it to a native Promise (v2)
- Add
- โ Add
Opal::Config.esm
to enable/disable ES modules (#2316)- If Config.esm is enabled, SimpleServer does type="module"
- Add new rack-esm example
- โ Add a QuickJS (https://bellard.org/quickjs/) runner (#2331)
- โ Add
IO#fileno
,Method#curry
,Buffer#to_s
,Pathname.pwd
(#2332) - Add NodeJS support for
ARGF
,ENV.{inspect,to_h,to_hash,merge}
,File.{delete,unlink}
,Kernel#system
, Kernel#`,Process::Status
(#2332) - Introduce
__dir__
support (#2323) - ๐ Full autoload support (#2323)
- Now compatible with
opal-zeitwerk
andisomorfeus
- Allow toplevel autoloads
- Allow dynamic autoloads (e.g. can be hooked to fetch a URL upon autoload with a custom loader)
- Allow overwriting
require
(e.g. like rubygems does) - Allow autoloading trees with
require_tree "./foo", autoload: true
- Add Module#autoload?
- Now compatible with
- Autoload parts of the corelib (#2323)
๐ Fixed
- ๐ Fixed multiple line
Regexp
literal to not generate invalid syntax as JavaScript (#1616) - ๐ Fix
Kernel#{throw,catch}
along withUncaughtThrowError
(#2264) - โก๏ธ Update source-map-support to fix an off-by-one error (#2264)
- Source map: lines should start from 1, not 0 (#2273)
- ๐ Allow for multiple underscored args with the same name in strict mode (#2292)
- ๐ Show instance variables in
Kernel#inspect
(#2285) 0.digits
was returning an empty array in strict mode (#2301)- Non Integer numbers were responding to
#digits
(#2301) - Correctly delete hash members when dealing with boxed strings (#2306)
- Escape string components in interpolated strings (
dstrs
) correctly (#2308) - Don't try to return the JS
debugger
statement, just returnnil
(#2307) - Retain the
-
while stringifying-0.0
(#2304) - ๐ Fix super support for rest args and re-assignments with implicit arguments (#2315)
- ๐ Fix calling
Regexp#last_match
when$~
is nil (#2328) - ๐ Windows support for chrome runner (#2324)
- Use correct node separator for NODE_PATH on Windows
- Pass dir and emulate exec a bit on Windows
- Use Gem.win_platform?, match supported platform to ruby, simplify run
- NodeJS: Drop the first
--
argument inARGV
(#2332) - ๐ Fix
Object#require
not pointing toKernel#require
(#2323)
๐ Changed
- Fast-track bad constant names passed to
Struct.new
(#2259) - ๐ Renamed internal
super
related helpers,find_super_dispatcher
is nowfind_super
,find_iter_super_dispatcher
is nowfind_block_super
(#2090) - The
opal-repl
CLI now requires files to be passed with--require
(or-r
) instead of the bare filename (#2309) Process
is now a Module, not a Class - just like in MRI (#2332)s = StringIO.new("a"); s << "b"; s.string
now returns "b", like MRI, but Opal used to return "ab" (#2309)
Internal
- โ Add support for
-
v1.2.0 Changes
July 28, 2021โ Added
- ๐ Support for multiple arguments in Hash#{merge, merge!, update} (#2187)
- ๐ Support for Ruby 3.0 forward arguments:
def a(...) puts(...) end
(#2153) - ๐ Support for beginless and endless ranges:
(1..)
,(..1)
(#2150) - ๐ Preliminary support for
**nil
argument - see #2240 to note limitations (#2152) - Support for
Random::Formatters
which add methods#{hex,base64,urlsafe_base64,uuid,random_float,random_number,alphanumeric}
toRandom
andSecureRandom
(#2218) - ๐ Basic support for ObjectSpace finalizers and ObjectSpace::WeakMap (#2247)
- ๐ A more robust support for encodings (especially binary strings) (#2235)
- ๐ Support for
"\x80"
syntax in String literals (#2235) - โ Added
String#+@
,String#-@
(#2235) - ๐ Support for
begin <CODE> end while <CONDITION>
(#2255) - โ Added Hash#except and
Hash#except!
(#2243) - ๐ Parser 3.0: Implement pattern matching (as part of this
{Array,Hash,Struct}#{deconstruct,deconstruct_keys} methods were added)
(#2243) - [experimental] Reimplement Promise to make it bridged with JS native Promise, this new implementation can be used by requiring
promise/v2
(#2220)
๐ Fixed
- Encoding lookup was working only with uppercase names, not giving any errors for wrong ones (#2181, #2183, #2190)
- ๐ Fix
Number#to_i
with huge number (#2191) - โ Add regexp support to
String#start_with
(#2198) String#bytes
now works in strict mode (#2194)- ๐ Fix nested module inclusion (#2053)
- SecureRandom is now cryptographically secure on most platforms (#2218, #2170)
- ๐ Fix performance regression for
Array#unshift
on v8 > 7.1 (#2116) - String subclasses now call
#initialize
with multiple arguments correctly (with a limitation caused by the String immutability issue, that a source string must be the first argument and#initialize
can't change its value) (#2238, #2185) - ๐ Number#step is moved to Numeric (#2100)
- ๐ Fix class Class < superclass for invalid superclasses (#2123)
- ๐ Fix
String#unpack("U*")
on binary strings with latin1 high characters, fix performance regression on that call (#2235, #2189, #2129, #2099, #2094, #2000, #2128) - ๐ Fix
String#to_json
output on some edge cases (#2235) - ๐ Rework class variables to support inheritance correctly (#2251)
- ISO-8859-1 and US-ASCII encodings are now separated as in MRI (#2235)
String#b
no longer modifies object strings in-place (#2235)- Parser::Builder::Default.check_lvar_name patch (#2195)
๐ Changed
String#unpack
,Array#pack
,String#chars
,String#length
,Number#chr
, and (only partially)String#+
are now encoding aware (#2235)String#inspect
now uses\x
for binary stirngs (#2235)- ๐
if RUBY_ENGINE == "opal"
and friends are now outputing less JS code (#2159, #1965) Array
:to_a
,slice
/[]
,uniq
,*
,difference
/-
,intersection
/&
,union
/|
, flatten now return Array, not a subclass, as Ruby 3.0 does (#2237)Array
:difference
,intersection
,union
now accept multiple arguments (#2237)
๐ Deprecated
- โ Stopped testing Opal on Ruby 2.5 since it reached EOL.
โ Removed
- โ Removed support for the outdated
c_lexer
, it was optional and didn't work for the last few releases of parser (#2235)
-
v1.1.1 Changes
February 23, 2021๐ Fixed
- 0๏ธโฃ The default runner (nodejs) wasn't starting to a bad require in the improved stack-traces (#2182)
-
v1.1.0 Changes
February 19, 2021โ Added
- ๐ Basic support for
uplevel:
keyword argument inKernel#warn
(#2006) - Added a
#respond_to_missing?
implementation forBasicObject
,Delegator
,OpenStruct
, that's meant for future support in the Opal runtime, which currently ignores it (#2007) Opal::Compiler#magic_comments
that allows to access magic-comments format and converts it to a hash (#2038)- ๐ Use magic-comments to declare helpers required by the file (#2038)
Opal.$$
is now a shortcut forOpal.const_get_relative
(#2038)Opal.$$$
is now a shortcut forOpal.const_get_qualified
(#2038)- โ Added support for
globalThis
as the generic global object accessor (#2047) Opal::Compiler#magic_comments
that allows to access magic-comments format and converts it to a hash- ๐ Use magic-comments to declare helpers required by the file
Opal.$$
is now a shortcut forOpal.const_get_relative
Opal.$$$
is now a shortcut forOpal.const_get_qualified
- 0๏ธโฃ Source-map support for Node.js in the default runner (#2045)
- SecureRandom#hex(n) (#2050)
- โ Added a generic implementation of Kernel#caller and #warn(uplevel:) that works with sourcemaps in Node.js and Chrome (#2065)
- Added support for numblocks
-> { _1 + _2 }.call(3, 4) # => 7
(#2149) - ๐ Support
<internal:โฆ>
and<js:โฆ>
in stacktraces, like MRI we now distinguish internal lines from lib/app lines (#2154) Array#difference
,Array#intersection
,Array#union
as aliases respectively toArray#{-,&,|}
(#2151)- Aliases
filter{,!}
toselect{,!}
throughout the corelib classes (#2151) Enumerable#filter_map
,Enumerable#tally
(#2151)- Alias
Kernel#then
forKernel#yield_self
(#2151) - Method chaining:
{Proc,Method}#{<<,>>}
(#2151) - โ Added Integer#to_d (#2006)
- Added a compiler option
use_strict
which can also be set by theuse_strict
magic comment (#1959) - โ Add
--rbrequire (-q)
option toopal
command line executable (#2120)
๐ Fixed
- Array#delete_if (#2069)
- Array#keep_if (#2069)
- Array#reject! (#2069)
- Array#select! (#2069)
- Struct#dup (#1995)
- Integer#gcdlcm (#1972)
- Enumerable#to_h (#1979)
- Enumerator#size (#1980)
- Enumerable#min (#1982)
- Enumerable#min_by (#1985)
- Enumerable#max_by (#1985)
- Set#intersect? (#1988)
- Set#disjoint? (#1988)
- Set#keep_if (#1987)
- Set#select! (#1987)
- Set#reject! (#1987)
- String#unicode_normalize (#2175)
- Module#alias_method (#1983)
- Enumerable#minmax_by (#1981)
- Enumerator#each_with_index (#1990)
- Range#== (#1992)
- Range#each (#1991)
- Enumerable#zip (#1986)
- String#getbyte (#2141)
- Struct#dup not copying
$$data
(#1995) - ๐ Fixed usage of semicolon in single-line backticks (#2004)
- Module#attr with multiple arguments (#2003)
PathReader
used to try to read missing files instead of respecting themissing_require_severity
configuration value (#2044)- โ Removed some unused variables from the runtime (#2052)
- ๐ Fixed a typo in the runtime (#2054)
- ๐ Fix Regexp interpolation, previously interpolating with other regexps was broken (#2062)
- Set match on StringScanner#skip and StringScanner#scan_until (#2061)
- ๐ Fix ruby 2.7 warnings (#2071)
- ๐ Improve the --help descriptions (#2146)
- โ Remove BasicObject#class (#2166)
- Time#strftime %j leading zeros (#2161)
- ๐ Fix
call { true or next }
producing invalid code (#2160) define_method
can now be called on the main object (#2029)- ๐ Fix nested for-loops (#2033)
- ๐ Fix Number#round for Integers (#2030)
- ๐ Fix parsing Unicode characters from Opal (#2073)
- Integer#===: improve Integer recognition (#2089)
- Regexp: ensure ignoreCase is never undefined (#2098)
- Hash#delete: ensure String keys are converted to values (#2106)
- ๐ Array#shift: improve performance on v8 >7.1 (#2115)
- ๐ Array#pop(1): improve performance (#2130)
- Object#pretty_inspect (#2139)
- ๐ Fix conversion from UTF-8 to bytes (#2138)
- โช Restore compatibility with Chrome 38, used by Cordova and many mobile browsers (#2109)
๐ Changed
- โก๏ธ Updated outdated parser version (#2013)
- ๐ Nashorn has been deprecated but GraalVM still supports it (#1997)
- "opal/mini" now includes "opal/io" (#2002)
- Regexps assigned to constants are now frozen (#2007)
Opal.$$
changed from being the constant cache of Object to being a shortcut forOpal.const_get_relative
(#2038)- ๐ Moved REPL implementation from bin/ to its own lib/ file as
opal/repl.rb
(#2048) Encoding.default_external
is now initialized with__ENCODING__
(#2072)- Keep the MersenneTwister implementation private (#2108)
- ๐ Change parser to 3.0 (#2148)
- ๐ Fix forwarding a rescued error to a global var:
rescue => $gvar
(#2154) - ๐ Now using Parser v3.0 and targeting Ruby 3.0 (#2156)
- ๐
Comparable#clamp
to support a Range argument (#2151) - ๐
#to_h
method to support a block (shortform for.map(&block).to_h
) (#2151) - BigDecimal is now a subclass of Numeric (#2006)
- ๐ PP to be rebased on upstream Ruby version (#2083)
- 0๏ธโฃ String to report UTF-8 encoding by default, as MRI does (#2117)
- โ Don't output "Failed to load WithCLexer, using pure Ruby lexer" warning unless in $DEBUG mode (#2174)
๐ Deprecated
- ๐ Requiring nodejs/stacktrace has been deprecated, source-maps are already supported by the default Node.js runner or by requiring https://github.com/evanw/node-source-map-support before loading code compiled by Opal (#2045)
โ Removed
- ๐ Basic support for