Releases: ruby2js/ruby2js
Releases · ruby2js/ruby2js
v5.1.2
v5.1.0
- Many filters and other project features deprecated for future maintainability (see blog announcement).
- The Vite and Rollup JS packages are looking for a new maintainer. Please let us know in the community GitHub Discussions if you'd like to contribute.
- The Node version of Ruby2JS will require minimum version 14
- Create a preset option to set sane default behavior [#178]
- New configuration DSL and per-file magic comments [#182]
- esbuild: change to use Ruby platform for Ruby2JS compilation [#183]
- fix haml filter and update spec to include interpolation [#198]
v5.0.1
Fixed
- Revert back to Opal 1.1.1 for compilation
Any newer version of Opal results in compilation errors when emoji (and perhaps other unicode chars) are present in code - Ensure Nokogiri filter's
create_element
usestextContent
instead ofcontent
v5.0.0
Added
- Support for Ruby 3.1's shorthand hash syntax:
hash => {a:, b:}
=>let {a, b} = hash
- functions filter: chars
- functions filter:
"string" * length
=>"string".repeat(length)
for ES2015+
Changed
- Improvements to the monorepo to ensure both the Ruby and the Node compiler versions always match
and can get tested and released simultaneously. (Runbundle exec rake release_core
.) - Ruby 2.7 is now the minimum supported version of Ruby.
v4.2.1
Changes since 4.2.1:
- functions filter: index, rindex, and round
- functions filter: obj.to_json => JSON.stringify(obj)
- support numbered parameters (numblocks)
- Array.new(size, default) => new Array(size).fill(default)
v4.2.0
- Additional lit filter updates (PR #141)
- Allow snake case custom_element in addition to customElement
- Process the render function even when it contains multiple statements
- Fix a properties vs styles typo for <es2022
- Automatically add the html tagged literal return when necessary for any method, not just render
- Ensure any ivars prefixed with _ will not turn into reactive properties (if you truly need to maintain private internal state).
- ruby2js cli interface added
- esm autoimports & defs: fix Opal-based parser to handle hash generated by Ruby
- esm filter: convert top level requires into imports
- lit filter: updates from polymer LitElement to Lit v2.
added: customElements, es2022 syntax for properties,
query, queryAll, queryAsync
inherited methods: performUpdate, requestUpdate
inherited properties: hasUpdated, renderRoot, shadowRoot, updateComplete
v4.1.7
Changes since v4.1.6:
- take, drop, min, max, each_slice added to underscore filter
- import stimulus => import @hotwired/stimulus
- rails stimulus rake tasks and instructions were updated to match
the latest hotwired/stimulus-rails changes
v4.1.4
- Add camelCase support for keyword arguments (aka destructured object arg)
v4.1.3
Changes since 4.1.2:
- Add camelCase support for => assignment operator
- Fix bugs related to is_a? and instance_of?
v4.0.0
Changes since v3.6.1
- Support static method calls with blocks in es2015+
- Auto-bind instance methods referenced as properties within a class
- New defs option to add definitions for autoimported classes/methods
- Open classes/modules, inheritance, and module include of props/methods
- Handle begin, if, and case as expressions
- Handle modules with exactly one method
- Handle empty edge cases like
`#{}`
and()
- Live demo based on Opal (see here)
- Demo: Hidden AST syntax enables copy/paste of syntactically correct AST
- Anonymous classes via Class.new
- Autoexport :default option
- Support both default and named imports on same import statement
- requires for modules containing exports statements generate import statements
- require_recursive option