diff --git a/README.md b/README.md index 3c14de97c4..5d0e3f6bbd 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Rhino is licensed under the [MPL 2.0](./LICENSE.txt). Rhino 1.7.10April 9, 2018 Rhino 1.7.11May 30, 2019 Rhino 1.7.12January 13, 2020 +Rhino 1.7.13September 2, 2020 [Release Notes](./RELEASE-NOTES.md) for recent releases. diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 159a2db21a..ac523c76fc 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,123 @@ +# Rhino 1.7.13 +## September 2, 2020 + +### Script Engine support + +Now that Nashorn has been deprecated, a number of poeple have asked about using +Rhino with the standard Java "ScriptEngine" interface. This release supports that. + +However, in order to avoid breaking existing code, the script engine is +shipped in a separate JAR. Use the "rhino-engine" jar along with the +standard "rhino" jar to include this feature. + +### Generator Support + +This release supports generators based on the ES6-standard "function *" +syntaxt. + +### Other important changes + +This release also includes a number of quality and consistency fixes from five contributors. +As always, check out the [compatibility table](http://mozilla.github.io/rhino/compat/engines.html) +to see where Rhino stands today. + +Gregory Brail (18): +* Start on 1.7.13. +* Add a build config for CircleCi. +* Upgrade Gradle version to 6.5. +* Update max workers. +* Add support for ES6 generators. +* Make "GeneratorFunction" pattern work in interpreted mode. +* Complete implementation of GeneratorFunction. +* Diagnostics to discover test timeouts. +* Implement standard Java ScriptEngine +* Change MozillaSuiteBenchmark to not fork threads. +* Try to improve performance of MozillaSuiteTest +* Disable some very slow tests +* Start using JMH for benchmarks. +* Many small fixes suggested by FindBugs and other linters +* Turn off all the Mozilla tests that use the "BigO" function. +* Move "BodyCodegen" into a file with the appropriate name. +* Add feature flag for changes to Function.__proto__ +* Make __proto__ more closely match the spec + +Karl Tauber (2): +* Debugger fixes for FlatLaf (https://github.com/JFormDesigner/FlatLaf): - make renderer tree row height same as table row height - increase monospaced font size in script source and evaluation view if L&F uses larger font - remove renderer tree border if L&F sets one (built in L&F do not) +* Debugger: fix NPE in variables view when expanding "CallSite" + +Sylvain Jermini (7): +* improve java.util.{List,Map} interop +* travis: switch from trusty to xenial + set explicit -Xss in tests +* try to fix circle, increase Xss +* Fix failing string.trim.doctest in java11. +* NativeDate: DateFormat, use explicit pattern, has the default has changed from java8 to 9. See https://stackoverflow.com/q/53317365 +* add java11 to travis test matrix +* various fixes so the javadoc linter is happy + +hjx胡继续 (2): +* Add String.fromCodePoint() +* fromCharCode optimize + +ian4hu (5): +* Add String.prototype.trimStart String.prototype.strimEnd +* style: code style +* test: string test with hex code instead of literal +* remove unused StringBuilder +* fix tests in test262/built-ins/String/fromCodePoint/* + +leela52452 (1): +* fix OWASP Cheat Sheet markdown format + +RBRi (48): +* switch value and done +* make some method protected to support rhino-external implementations +* NativeArrayBuffer slice() length is 2 +* fix String.indexOf and String.includes when searching for an empty st… (#747) +* fix string.split with limit 0 +* fix for issue #665 (maybe we have to adjust the version switch to version 1_6) +* fix for the recursion detection when converting an array into a string +* fix #670 +* add testcase for issue #656 +* Symbol.length is 0 fixes #648 +* add testcase for issue #651 +* fix type o the expected value +* improve seal() and freeze() processing; fixes #174 +* An error should be thrown when defining a property for a read-only variable in strict mode fixes 573 +* code cleanup +* Do not save/share an instance of NativeArrayBuffer in a static variable. This introduces really strange side effects, because the instance is available (and changeable) from javascript code. These changes are 'persistent' in a way that starting a fresh rhino instance still uses this changed object. +* various fixes for array calls using this pattern Array.prototype.foo.call(null, ....); +* fix issue #648 +* fix Object.getOwnPropertyDescriptor for index properties on native strings +* Function.__proto__ ignores write access +* improved regexp parser based on commit 2164382abe078ea2024b9dff7fe416a78e3a668f from anba +* fix handling of undefined parameter value in String.normalize() +* it should not be possible to change the [[Prototype]] of a non-extensible object; some cleanup +* add version guard +* fix all this-value-not-obj-coercible.js tests for string +* checkstyle fixes +* fix test suite setup +* use the RangeError construction helper +* improved handling of negative ArrayBuffer size fixes #708 +* in ES6 TypedArray constructors are only callable via new +* avoid some auto boxing use Double.valueOf instead of new some cleanup try to optimize the code a bit to avoid unnecessary conversations and Double object creation make some methods static +* regular expressions are not functions in the context of string replace fixes #726 +* improved regex range handling +* do not inherit strict mode when parsing a function body +* code style fix +* fix wrong start object for getter in Object.assign +* use Undefined.isUndefined() +* String.prototype[Symbol.iterator].call(undefined) has to throw because undefined is not coercible +* enable more test cases +* reduce auto boxing to be able to better control this and avoid boxing if possible +* make a bunch of methods static +* code cleanup +* make the inner class static (this makes also SpotBugs happy) +* Object.setPrototypeOf() arg[0] has to be coercible +* fix one more case +* match +* search +* throw if the lastIndex prop of an regex is readonly + # Rhino 1.7.12 ## January 13, 2020 diff --git a/build.gradle b/build.gradle index 9fb0041301..002b52c52d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ plugins { id 'idea' id 'eclipse' id 'maven-publish' + id 'signing' id 'jacoco' id 'distribution' id 'checkstyle' @@ -363,6 +364,13 @@ publishing { } } +signing { + useGpgCmd() + sign publishing.publications.rhino + sign publishing.publications.rhinoengine + sign publishing.publications.rhinoruntime +} + spotbugs { effort = "less" reportLevel = "medium" diff --git a/gradle.properties b/gradle.properties index 1618190c4b..1409d091e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ rootProject.name=rhino group=org.mozilla -version=1.7.13-SNAPSHOT +version=1.7.13 buildDir=buildGradle mavenSnapshotRepo=https://oss.sonatype.org/content/repositories/snapshots -mavenReleaseRepo=https://oss.sonatype.org/service/local/staging/deploy/maven +mavenReleaseRepo=https://oss.sonatype.org/service/local/staging/deploy/maven2/ diff --git a/maven/maven-pom.xml b/maven/maven-pom.xml deleted file mode 100644 index 799cf94a53..0000000000 --- a/maven/maven-pom.xml +++ /dev/null @@ -1,41 +0,0 @@ - - 4.0.0 - - - org.sonatype.oss - oss-parent - 7 - - - org.mozilla - rhino - Mozilla Rhino - 1.7.12 - - jar - - Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically - embedded into Java applications to provide scripting to end users. - - https://developer.mozilla.org/en/Rhino - - - - Mozilla Public License, Version 2.0 - http://www.mozilla.org/MPL/2.0/index.txt - - - - - scm:git:git@github.com:mozilla/rhino.git - scm:git:git@github.com:mozilla/rhino.git - git@github.com:mozilla/rhino.git - - - - The Mozilla Foundation - http://www.mozilla.org - - diff --git a/maven/maven-snapshot-deploy.sh b/maven/maven-snapshot-deploy.sh deleted file mode 100755 index 7c6d459dc6..0000000000 --- a/maven/maven-snapshot-deploy.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -deployFile=`ls ../buildGradle/libs/rhino*.jar` - -if [ ! -f $deployFile ] -then - echo "File cannot be found in $deployFile" - exit 2 -fi - -mvn deploy:deploy-file \ - -Dfile=${deployFile} \ - -DpomFile=maven-pom.xml \ - -DrepositoryId=sonatype-nexus-snapshots \ - -Durl=https://oss.sonatype.org/content/repositories/snapshots/ diff --git a/maven/maven-staging-deploy.sh b/maven/maven-staging-deploy.sh deleted file mode 100755 index 0e82b7e547..0000000000 --- a/maven/maven-staging-deploy.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -function deploy { - if [ ! -f $1 ] - then - echo "Missing $1" - exit 1 - fi - - tf=/var/tmp/file.$$.jar - rm -f ${tf} - cp $1 ${tf} - - mvn gpg:sign-and-deploy-file \ - -Dfile=${tf} \ - -DpomFile=${2} \ - -DrepositoryId=sonatype-nexus-staging \ - -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ - -Dclassifier=${3} - - rm ${tf} -} - -vers=`egrep '^version=' ../gradle.properties | awk -F = '{print $2}'` -base=${HOME}/.m2/repository/org/mozilla - -echo "Deploying ${vers}" - -rb=${base}/rhino/${vers} -deploy ${rb}/rhino-${vers}.jar maven-pom.xml -deploy ${rb}/rhino-${vers}-sources.jar maven-pom.xml sources -deploy ${rb}/rhino-${vers}-javadoc.jar maven-pom.xml javadoc - -rb=${base}/rhino-runtime/${vers} -deploy ${rb}/rhino-runtime-${vers}.jar maven-runtime-pom.xml -deploy ${rb}/rhino-runtime-${vers}-sources.jar maven-runtime-pom.xml sources -deploy ${rb}/rhino-runtime-${vers}-javadoc.jar maven-runtime-pom.xml javadoc \ No newline at end of file diff --git a/release-steps.txt b/release-steps.txt index 2188c8ffab..95e7f53a6b 100644 --- a/release-steps.txt +++ b/release-steps.txt @@ -1,7 +1,6 @@ Update version in: src/manifest gradle.properties - maven/maven-pom.xml Paste release notes into RELEASE_NOTES.md: git shortlog LAST_TAG.. | sed 's/^ /*/' @@ -10,16 +9,17 @@ Paste release info into README.md Copy README into gh-pages Extract build/*/javadoc.zip to gh-pages/javadoc -Re-run compat-table "engine.js" +Re-run compat-table "rhinoall.sh" Copy HTML to gh-pages/compat -./gradlew publishToMavenLocal distZip -cd maven -./maven-staging-deploy.sh +./gradlew -Dgradle.user.home=$HOME publish Go to oss.sonatype.org Find "org.mozilla" staging repo, close, release, and drop. +./gradlew distZip + Publish that to the GitHub release page + git tag for new release Update release in GitHub @@ -28,7 +28,6 @@ Update release in GitHub Update to new snapshot version in: src/manifest gradle.properties - maven/maven-pom.xml Update the Homebrew formula. Submit a PR for: Homebrew/homebrew diff --git a/src/manifest b/src/manifest index 262df4f74e..18e60fa34b 100644 --- a/src/manifest +++ b/src/manifest @@ -1,6 +1,6 @@ Manifest-Version: 1.0 Main-Class: org.mozilla.javascript.tools.shell.Main -Implementation-Version: 1.7.13-SNAPSHOT -Implementation-Title: Mozilla Rhino 1.7.13-SNAPSHOT +Implementation-Version: 1.7.13 +Implementation-Title: Mozilla Rhino 1.7.13 Implementation-Vendor: Mozilla Foundation Implementation-URL: http://www.mozilla.org/rhino