Skip to content

Releases

Rhino 1.9.2

Choose a tag to compare

@gbrail gbrail released this 27 Oct 05:57

All objects in Rhino now prevent Java serialization, in line with other libraries.
Projects that depend on serializing Rhino objects must explicitly enable it,
either by setting the "rhino.serialization.enabled" property in "RhinoConfig",
or by enabling the "FEATURE_JAVA_SERIALIZATION" flag in the "ContextFactory".

Other changes include:

  • Add OSGi bundle metadata so that Rhino can be used as an OSGi bundle.
  • Fix inconsistencies in the "Math" object by backporting algorithms from V8, and fix a few
    out-of-range constants.
  • Fix "Object.fromEntries()" storing array index keys as named properties.
  • Fix Java object conversion in "ScriptEngine" bindings so that native "JavaObject" values
    are converted in the correct direction.
  • Fix a memory leak caused by the const optimization in compiled mode.
  • Fix "Generator.prototype.return()" to include the value when the generator is already
    complete.
  • Fix a register count bug in the bytecode compiler.
  • The build now works with Java 25. (Rhino still targets Java 11, so users of
    the published JARs do not need to change anything.)

Thanks to all who contributed!

Rhino 1.9.1

Choose a tag to compare

@gbrail gbrail released this 15 Feb 20:57

Rhino 1.9.1

February 15, 2026

This release fixes a few small regressions introduced in Rhino 1.9.0.

  • Ensure that the "global" object is present, necessary for core-js to run
  • Prevent compiled methods from introducing illegal characters in their names
  • Support reserved words like "class" as names of XML attributes
  • Fix a performance regression in the RegExp engine.

Thanks to all who contributed!

Full Changelog: Rhino1_9_0_Release...Rhino1_9_1_Release

Rhino 1.9.0

Choose a tag to compare

@gbrail gbrail released this 22 Dec 23:18

This release represents about a year of work on Rhino by a growing team of contributors.

Some of the improvements include:

  • Compatibility improvements in areas like destructuring and spread syntax.
  • Performance improvements from 10 to 30% in benchmarks like Delta Blue, Earley-Boyer, and Crypto in both interpreted and compiled mode
  • Better support for generics and other things when Java integration is used.

Some other improvements:

JavaScript Language Updates:

  • ES6+: Significant advancements in destructuring, spread syntax for
    arrays/objects, Symbol API, and improved let/const scoping.
    TypedArray.from/of and BigInt.asUintN/asIntN fixes.
  • RegExp: New features like named capture groups, lookbehind
    assertions, and Unicode mode support.
  • Future ES (ES2024/2025): Early implementation of proposals such as
    Promise.withResolvers, Promise.try, ArrayBuffer transfer methods, and
    new Set methods.

Core Engine Enhancements:

  • Major Refactoring: Extensive migration of built-in objects to a
    lambda-based architecture and a comprehensive overhaul of the
    interpreter bytecodes for better performance and maintainability.
  • Concurrency & Interop: Continued focus on thread safety improvements
    and enhanced Java interoperability, including better generics
    support.

Going forward -- we have lots of plans for Rhino, including some changes that may
affect compatibility for projects that embed Rhino into larger frameworks. We think
that these changes will be worth it because they will unlock better language
compatibility and performance.

As such, the next version going forward will be 2.0.0-SNAPSHOT.

16 different contributors gave their time and energy to Rhino 1.9.0.

Thanks to everyone who contributed!

New Contributors

Full Changelog: Rhino1_8_0_Release...Rhino1_9_0_Release

Rhino 1.8.1

Choose a tag to compare

@gbrail gbrail released this 03 Dec 04:12

This release fixes a problem with formatting of floating-point numbers to strings that may result in very bad performance in some cases.

We recommend that all users of Rhino upgrade to this release, and to Java 17 or 21, if possible.

Rhino 1.7.15.1

Choose a tag to compare

@gbrail gbrail released this 03 Dec 04:12

This release fixes a problem with formatting of floating-point numbers to strings that may result in very bad performance in some cases.

Projects that are unable to upgrade to Rhino 1.8.1, or unable to upgrade to at least Java 11, should use this release.

Rhino 1.7.14.1

Choose a tag to compare

@gbrail gbrail released this 03 Dec 04:13

This release fixes a problem with formatting of floating-point numbers to strings that may result in very bad performance in some cases.

Projects that are unable to upgrade to Rhino 1.8.1, or unable to upgrade to at least Java 11, should use this release.

Rhino 1.8.0

Choose a tag to compare

@gbrail gbrail released this 03 Jan 07:49

Highlights

Rhino 1.8.0 contains some significant changes, so we're incrementing the final version number for the first time in a very long time. Here are a few highlights:

  • Rhino now requires Java 11 minimum. We currently test against Java 11, 17, and 21.
  • Rhino has been broken down into individual Java modules that are properly encapsulated as Java Modules. See README.md for a breakdown of which modules are which -- short answer is that everyone will need the "rhino" module and many will need others.
  • Older code not able to adapt to using multiple JARS can still use the "rhino-all" module, which publishes an "all-in-one" JAR like the old "rhino.jar".
  • The default language level is "VERSION_ES6". That means that modern JavaScript features supported by Rhino will work by default.
  • There are big improvements in compatibility, including support for "super", reflect and proxy, and lots of other language features. See the compatibility table for the details.

JARs have been published to Maven Central and GitHub packages.

Thanks to all who contributed -- we had 24 contributors to this release, with some new contributors who added significant capabilities. Please keep the contributions and attention coming!

What's Changed

Read more

Rhino 1.7.15

Choose a tag to compare

@gbrail gbrail released this 04 May 00:46

May 3, 2024

Links

Highlights

  • Basic support for "rest parameters"
  • Improvements in Unicode support
  • "Symbol.species" implemented in many places
  • More correct property ordering in many places
  • And many more improvements and bug fixes

This release includes committs from 29 different committers. Thanks to you all for your help!

What's Changed

  • Prepare for 1.7.15 by @gbrail in #1148
  • Implements Promise.allSettled() by @grob in #1090
  • Fix issue #1041. Handles {0} quantifier with max of zero correctly. by @MaxisTekfield in #1098
  • Add proper import package instructions in the OSGi manifest by @makusuko in #1163
  • add Object.hasOwn (#1052) in #1157
  • Apply spotlessApply to all code by @tuchida in #1159
  • Remove spotless "ratchet" by @gbrail in #1170
  • unify and improve the error msg about unsupported regex flags by @rbri in #1180
  • implement regex sticky support by @rbri in #1181
  • Fix GitHub Languages for repo by @p-bakker in #1185
  • fix #780 fix Object.assign when undefined value and inextensible by @tuchida in #1186
  • fix #934 Implement ES2017 Object.getOwnPropertyDescriptors by @tuchida in #1193
  • code cleanup by @rbri in #1196
  • take the offset of the buffer into account when construction a subarray from a buffer (fixes #1204) by @rbri in #1205
  • Various fixed for NativeConsole by @rbri in #1207
  • more console fixes and tests by @rbri in #1208
  • two json stringify fixes by @rbri in #1209
  • fix for toLocaleLowercase parameter handling by @rbri in #1131
  • improve log output of Callable's by @rbri in #1213
  • Simplify release steps by @zloirock in #1214
  • Some cleanup and minor optimizations by @rbri in #1212
  • Fix typeof for native classes with shared global scope #1173 by @Schmidor in #1211
  • Make the $262 object available within the test262 tests by @p-bakker in #1229
  • Fix ClassCastException when using StringBuilder/Buffer #496 by @shelches in #1210
  • fix missing scope definition at some places by @rbri in #1227
  • fix: parent relationship in TaggedTemplateLiteral (#1238) by @kuzjka in #1239
  • Make getCharacterEncoding in UrlModuleSourceProvider protected by @midgleyc in #1233
  • fix(#1237): polyfill android Map.putIfAbsent by @naijun0403 in #1252
  • Add PGP_KEYS.txt by @gbrail in #1263
  • fix the error message in case the quantifier maximum (second value) is smaller than the minimum (first value) by @rbri in #1260
  • Fix hasOwnProperty on NativeJavaObject by @Schmidor in #1255
  • Update README.md by @wimjongman in #1266
  • Function prototype properties length and name are configurable (in ES6) by @rbri in #1284
  • cleanup as follow up of pr 1284 by @rbri in #1285
  • make sure the placeholder replacements is also done for ConsStrings by @rbri in #1293
  • Code Cleanup by @rbri in #1295
  • Fix the condition for isResourceChanged by @szegedi in #1301
  • fix name property for bound functions (see issue #1297) by @rbri in #1298
  • next try to fix issue #780 by @rbri in #1294
  • fix ScriptException when bound functions are called inside Promise.then() by @rbri in #1287
  • Preserving cause on rethrown exceptions by @rPraml in #1286
  • BUG: for X of javaList does not work properly in strict mode by @rPraml in #1304
  • use try-with-resource by @rbri in #1306
  • setter function (from property descriptor) has to convert the args by @rbri in #1305
  • Treat String, ConsString, Boolean, and Double as value types by @szegedi in #1302
  • ci: set minimal permissions on GitHub Workflows by @diogoteles08 in #1311
  • Test optimization levels by @rbri in #1317
  • more test method cleanup by @rbri in #1320
  • fix some warnings in the test code by @rbri in #1325
  • fix some warnings in the test code by @rbri in #1326
  • remove default parameter from compareArray.js by @rbri in #1329
  • Support ES2019 Array.prototype.flat by @midgleyc in #1313
  • some code cleanup for the array_flat pr by @rbri in #1330
  • Es2022 at method by @JohnBain in #1289
  • some code cleanup for array at support by @rbri in #1331
  • PropertyDescriptor fixes by @rbri in #1324
  • Remove CircleCI configuration by @gbrail in #1335
  • take care of eof when parsing templates (fixes #1337) by @rbri in #1338
  • Create Security Policy by @diogoteles08 in #1328
  • docs(readme): remove broken MDN link by @caugner in #1340
  • Fix some deprecation warnings by @gbrail in #1343
  • This PR fixes the issue of flush() by @nmondal in #1358
  • Symbol fixes by @rbri in #1357
  • special handling for NativeError instances when generating the console output by @rbri in #1366
  • Fix regressions introduced to debugger by @gbrail in #1369
  • Add some micro-benchmarks for property access by @gbrail in #1370
  • fix a missing array limit check by @rbri in #1371
  • fix some typos in Messages.properties by @rbri in #1373
  • Update SunSpider benchmarks by @gbrail in #1375
  • take care of SymbolKey before casting by @rbri in #1377
  • Support ES2019 Array.prototype.flatMap by @midgleyc in #1372
  • feat: update github action versions to 3 by @midgleyc in #1379
  • Stop IRFactory from inheriting Parser by @tuchida in #1380
  • Array.of has to use defineOwnProperty instead of set by @rbri in #1381
  • Support unicode codepoint escape by @tuchida in #1383
  • convert NativeMath and NativeJSON into a Lambda based ScriptableObject by @rbri in #1384
  • Use a different method to determine if we are on Java 11 by @gbrail in #1385
  • javascript 'Set' cannot handle wrapped java objects properly by @rPraml in #1387
  • Modified DoctestsTest to include optimization level by @andreabergia in #1401
  • Allow updating of name of a function, as required by the standard by @andreabergia in #1398
  • [StepSecurity] ci: Harden GitHub Actions by @step-security-bot in #1405
  • Create dependabot.yml by @diogoteles08 in #1407
  • Make handling of object indices more in line with the spec by @gbrail in #1392
  • Support hashbang by @p-bakker in #1417
  • Add Scorecard Action by @diogoteles08 in #1400
  • Adds support for trailing commas in function parameters by @p-bakker in #1416
  • Handle Array prototype properties in standard operations by @gbrail in #1426
  • limit the length of the string to be used for indentation by @rbri in #1428
  • BigIntLiteral.toSource includes suffix by @JohnCokerC3 in #1432
  • Fixes for Symbol.iterator handling in NativeArray by @rbri in #1435
  • fix clz32 rounding errors by @rbri in #1430
  • Various fixes and implementations to NativeRegExp by @rbri in https://...
Read more

Rhino 1.7.14

Choose a tag to compare

@gbrail gbrail released this 06 Jan 22:02

January 6, 2022

Links

Highlights

Features

ECMAScript features

Non-ECMAScript features

  • #153 stack property on Error Constructor (@gbrail)
  • #888 support for Mozilla-styled Stack formatting (@rbri)

All features

(Potential) Breaking Changes

  • #820 Introduced Context.FEATURE_ENABLE_JAVA_MAP_ACCESS, defaulting to false.
    This, by default, disables direct property access on Java maps from JavaScript, which got introduced in #713 and was released with Rhino 1.7.13:
    var h = new java.util.HashMap();
    h.put('a', 123);
    h.a;  // 123.0`)
    
    The rationale for this change can be seen in #820 and the JavaDoc on the aforementioned feature flag.

Bugs

All bug fixes

Performance

All performance enhancements

Java Interop

  • #839 JavaScript for-of loop support for Java Iterables (@tuchida)
  • #860 / #857 JSON.stringify support on Java Objects (@tonygermano / @rPraml)
  • #1031 delete operator and .length setting support in JavaScript on Java Lists (@rPraml)
  • #901 java.util.subList() support on JavaScript Arrays in Java (@rPraml)
  • #889 Automatically increase size of Java List instances on .put(...) if required (@rPraml)

All Java Interop related cases

Embedding Rhino

  • #864 Context now implements Closable (@gbrail)
  • #865 Introduction of LambdaFunction and LambdaConstructor, to be used to represent Java lambda functions as native JavaScript functions and also can be used to construct an entire class out of lambdas (@gbrail)
  • #911 Throw InternalError instead of wrapped JavaException if thrown Java Exception class is not visible due to class shutter (@youngj)
  • #1004 Support to define how unhandled Promise exceptions are handled (a NOP by default)

All Rhino embedding related cases

Test262 suite

  • Running against a much newer version of Test262 suite
  • Improved documentation for running the Test262 suite + more options to make running the tests easier & faster
  • #930 Support added for automatically regenerating the test262.properties file based on actual passage of tests
  • #930 Improved feedback about reason of test failures

Distribution

  • #873 Automatic module names

Internals

  • #878 Removed idSwitch
  • #896 SlotMap and Slot refactoring
  • #922 Started extracting logic related to Abstract Operations as defined by the ECMAScript specification

Misc.

  • #661 Rhino now listed in the kangax ES6 Compatibility table (must select the Show obsolete platforms in the upperleft corner)
  • #661 Rhino now available as a compilation target in Babel through @babel/preset-env:
{
  "targets": {
    "rhino": "1.7.13"
  }
}
  • Introduced Java Code Formatting through spotless
  • Moved to CircleCI (instead of Travis)
  • Enabled Gitlab CI, running tests on multiple Java versions'

Thanks!

This release contains more than 350 commits from 23 contributors. Thanks to everyone who helped!

Rhino 1.7.14 RC1

Rhino 1.7.14 RC1 Pre-release
Pre-release

Choose a tag to compare

@gbrail gbrail released this 18 Nov 22:13

November 18, 2021

Links

Highlights

Features

ECMAScript features

Non-ECMAScript features

  • #153 stack property on Error Constructor (@gbrail)
  • #888 support for Mozilla-styled Stack formatting (@rbri)

All features

Bugs

All bug fixes

Performance

All performance enhancements

Java Interop

  • #839 JavaScript for-of loop support for Java Iterables (@tuchida)
  • #860 / #857 JSON.stringify support on Java Objects (@tonygermano / @rPraml)
  • #1031 delete operator and .length setting support in JavaScript on Java Lists (@rPraml)
  • #901 java.util.subList() support on JavaScript Arrays in Java (@rPraml)
  • #889 Automatically increase size of Java List instances on .put(...) if required (@rPraml)

All Java Interop related cases

Embedding Rhino

  • #864 Context now implements Closable (@gbrail)
  • #865 Introduction of LambdaFunction and LambdaConstructor, to be used to represent Java lambda functions as native JavaScript functions and also can be used to construct an entire class out of lambdas (@gbrail)
  • #911 Throw InternalError instead of wrapped JavaException if thrown Java Exception class is not visible due to class shutter (@youngj)

All Rhino embedding related cases

Test262 suite

  • Running against a much newer version of Test262 suite
  • Improved documentation for running the Test262 suite + more options to make running the tests easier & faster
  • #930 Support added for automatically regenerating the test262.properties file based on actual passage of tests
  • #930 Improved feedback about reason of test failures

Distribution

Internals

  • #878 Removed idSwitch
  • #896 SlotMap and Slot refactoring
  • #922 Started extracting logic related to Abstract Operations as defined by the ECMAScript specification

Misc.

  • #661 Rhino now listed in the kangax ES6 Compatibility table (must select the Show obsolete platforms in the upperleft corner)
  • #661 Rhino now available as a compilation target in Babel through @babel/preset-env:
{
  "targets": {
    "rhino": "1.7.13"
  }
}
  • Introduced Java Code Formatting through spotless
  • Moved to CircleCI (instead of Travis)
  • Enabled Gitlab CI, running tests on multiple Java versions
  • Improved release notes (@p-bakker)

Thanks!

This release contains more than 300 commits from 21 contributors. Thanks to everyone who helped!