From 0daf1e2345cbe2be8cc46b5016bfdcc90d1066c3 Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Mon, 24 Jan 2022 21:10:00 -0500 Subject: [PATCH 1/5] Add compat-table and babel steps. --- RELEASE-STEPS.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/RELEASE-STEPS.md b/RELEASE-STEPS.md index b1d6ab402d..97b9a45edf 100644 --- a/RELEASE-STEPS.md +++ b/RELEASE-STEPS.md @@ -15,7 +15,7 @@ that's there). Now might be a good time to run "./gradlew publishToMavenLocal" and use the published JARs as a sanity check. -## Update Compatibility Table +## Update Native Compatibility Table The offial Kangax "compat table" now supports Rhino, but it's convenient to have our own that shows progress across all releases. Here's how to @@ -33,8 +33,8 @@ Then, update the table: The resulting "index.html" can be copied into "docs/compat/engines.html" in this repo. -## Push the Release to GitHub +## Push the Release to GitHub At this point, the current contents of your directory correspond to the new release. Prepare a pull request containing the changes, submit it, and merge it -- the result will be that the head of the "master" branch @@ -69,6 +69,55 @@ The Homebrew team for Mac does not necessarily pick up Rhino releases automatically. It may be necessary to submit a PR to the "homebrew/homebrew" repo in GitHub for a change to the file "Library/Formula/rhino.rb". +## Update Kangax Compatibility Table + +Check out `kangax/compat-table` and prepare a pull request to describe +support in the new version of Rhino. First, add a new environment for the +version to `environments.json` like so: + +```json +"rhino1_7_14": { + "full": "Rhino 1.7.14", + "short": "Rhino 1.7.14", + "family": "Rhino", + "platformtype": "engine", + "release": "2022-01-06", + "obsolete": true +}, +``` + +Next, run `rhino.js`. This will produce a number of messages indicating that +failing tests now pass, or that new tests now have recorded results: + + **** data-es2016plus **** + + data-es2016plus -> Error.cause property -> AggregateError.prototype lacks cause: test result out of date, res: true, actual: false + +Manually update each indicated `data-*.js` file with updated test data as +indicated. For example, a test that failed in 1.7.13 and passed in 1.7.14 +would have a `res` section with the following diff: + +```javascript + res: { + babel6corejs2: false, + babel7corejs3: babel.corejs, + /* ... */ + rhino1_7_13: false, ++ rhino1_7_14: true, + } +``` + +## Update Babel + +Once the `compat-table` changes are merged, check out `babel/babel` and prepare +a pull request to enable support for `babel-preset-env` in the new release. + +* Update `COMPAT_TABLE_COMMIT` in `packages/babel-compat-data/scripts/download-compat-table.sh` +to correspond to the merge commit in `compat-table`. +* Run `npm run build`. + +Then submit the resulting patch as a pull request to Babel. + ## Prepare for Next Release Now it's time to move to the next "SNAPSHOT" release. Update gradle.properties, From c92f1925747d7a185067665476bb470f1fca0a00 Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Mon, 24 Jan 2022 22:24:17 -0500 Subject: [PATCH 2/5] Add core-js instructions. --- RELEASE-STEPS.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/RELEASE-STEPS.md b/RELEASE-STEPS.md index 97b9a45edf..67f961a193 100644 --- a/RELEASE-STEPS.md +++ b/RELEASE-STEPS.md @@ -86,8 +86,9 @@ version to `environments.json` like so: }, ``` -Next, run `rhino.js`. This will produce a number of messages indicating that -failing tests now pass, or that new tests now have recorded results: +Copy the most recent rhino JAR into the directory as `rhino.jar`. Next, run +`rhino.js`. This will produce a number of messages indicating that failing +tests now pass, or that new tests now have recorded results: **** data-es2016plus **** @@ -107,6 +108,9 @@ would have a `res` section with the following diff: } ``` +Rerun `rhino.js` and verify it produces no output. Then `npm run build` and +submit your pull request. + ## Update Babel Once the `compat-table` changes are merged, check out `babel/babel` and prepare @@ -118,6 +122,34 @@ to correspond to the merge commit in `compat-table`. Then submit the resulting patch as a pull request to Babel. +## Update core-js-compat + +Compatibility data for `core-js`, the `babel` polyfill engine, also needs to +be updated. + +* Check out `zloirock/core-js` and `npm install`. +* Copy the most recent rhino JAR into the directory as `rhino.jar`. +* Edit `tests/compat/tests.js` by replacing all instances of `GLOBAL` with +`global`. +* Edit `packages/core-js-compat/src/data.js` to be a CommonJS module rather +than a JSM. (Or find a better way to do this and edit this file.) +* Edit `tests/compat/node-runner.js` by replacing `console.log` with `print` +and by adding the following snippet to the bottom: + +```javascript +print("NOW SUPPORTED:"); +var data = require("../../packages/core-js-compat/src/data").data; +for (var key2 in data) { + if (data[key2].rhino === undefined && result[key2] === true) { + print(key2); + } +} +``` + +* Run `java -jar rhino.jar -version 200 -require tests/compat/node-runner.js`. +* Much like in `compat-table`, edit `data.mjs` to add a line `rhino: 1.7.[XX]` +for any newly-passing test labeled as "NOW SUPPORTED." + ## Prepare for Next Release Now it's time to move to the next "SNAPSHOT" release. Update gradle.properties, From a46e771c3c25552747165d343607b99e0a09b294 Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Mon, 24 Jan 2022 22:38:03 -0500 Subject: [PATCH 3/5] Add details. --- RELEASE-STEPS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-STEPS.md b/RELEASE-STEPS.md index 67f961a193..8dec5ef89e 100644 --- a/RELEASE-STEPS.md +++ b/RELEASE-STEPS.md @@ -131,7 +131,7 @@ be updated. * Copy the most recent rhino JAR into the directory as `rhino.jar`. * Edit `tests/compat/tests.js` by replacing all instances of `GLOBAL` with `global`. -* Edit `packages/core-js-compat/src/data.js` to be a CommonJS module rather +* Edit `packages/core-js-compat/src/data.mjs` to be a CommonJS module rather than a JSM. (Or find a better way to do this and edit this file.) * Edit `tests/compat/node-runner.js` by replacing `console.log` with `print` and by adding the following snippet to the bottom: @@ -149,6 +149,8 @@ for (var key2 in data) { * Run `java -jar rhino.jar -version 200 -require tests/compat/node-runner.js`. * Much like in `compat-table`, edit `data.mjs` to add a line `rhino: 1.7.[XX]` for any newly-passing test labeled as "NOW SUPPORTED." +* Undo your module changes to `data.mjs` and submit a pull request with the +`data.mjs` changes. ## Prepare for Next Release From 2fb92226fbd1ef1fb10819b14928067f0f6a367c Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Wed, 26 Jan 2022 21:29:54 -0500 Subject: [PATCH 4/5] Use data.json instead of .mjs. --- RELEASE-STEPS.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/RELEASE-STEPS.md b/RELEASE-STEPS.md index 8dec5ef89e..e32dd3f6b9 100644 --- a/RELEASE-STEPS.md +++ b/RELEASE-STEPS.md @@ -118,7 +118,7 @@ a pull request to enable support for `babel-preset-env` in the new release. * Update `COMPAT_TABLE_COMMIT` in `packages/babel-compat-data/scripts/download-compat-table.sh` to correspond to the merge commit in `compat-table`. -* Run `npm run build`. +* Run `make build-compat-data && make bootstrap && OVERWRITE=true yarn jest`. Then submit the resulting patch as a pull request to Babel. @@ -127,18 +127,16 @@ Then submit the resulting patch as a pull request to Babel. Compatibility data for `core-js`, the `babel` polyfill engine, also needs to be updated. -* Check out `zloirock/core-js` and `npm install`. +* Check out `zloirock/core-js` and `npm install && npm run build-compat`. * Copy the most recent rhino JAR into the directory as `rhino.jar`. * Edit `tests/compat/tests.js` by replacing all instances of `GLOBAL` with `global`. -* Edit `packages/core-js-compat/src/data.mjs` to be a CommonJS module rather -than a JSM. (Or find a better way to do this and edit this file.) * Edit `tests/compat/node-runner.js` by replacing `console.log` with `print` and by adding the following snippet to the bottom: ```javascript print("NOW SUPPORTED:"); -var data = require("../../packages/core-js-compat/src/data").data; +var data = require("../../packages/core-js-compat/data.json"); for (var key2 in data) { if (data[key2].rhino === undefined && result[key2] === true) { print(key2); @@ -149,8 +147,12 @@ for (var key2 in data) { * Run `java -jar rhino.jar -version 200 -require tests/compat/node-runner.js`. * Much like in `compat-table`, edit `data.mjs` to add a line `rhino: 1.7.[XX]` for any newly-passing test labeled as "NOW SUPPORTED." -* Undo your module changes to `data.mjs` and submit a pull request with the -`data.mjs` changes. +* Submit a pull request with the `data.mjs` changes. + +## Prepare for Next Release + +Now it's time to move to the next "SNAPSHOT" release. Update gradle.properties, +create a PR, and push the new PR. Now development can proceeed anew! ## Prepare for Next Release From 5546e712ea5747dc910a14c224ee799d558c4e93 Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Mon, 14 Feb 2022 21:00:16 -0500 Subject: [PATCH 5/5] Add notes as to future improvements. --- RELEASE-STEPS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-STEPS.md b/RELEASE-STEPS.md index e32dd3f6b9..a096e6d9fa 100644 --- a/RELEASE-STEPS.md +++ b/RELEASE-STEPS.md @@ -130,9 +130,11 @@ be updated. * Check out `zloirock/core-js` and `npm install && npm run build-compat`. * Copy the most recent rhino JAR into the directory as `rhino.jar`. * Edit `tests/compat/tests.js` by replacing all instances of `GLOBAL` with -`global`. +`global` (changes to make this step unnecessary could be contributed back to +`core-js`). * Edit `tests/compat/node-runner.js` by replacing `console.log` with `print` -and by adding the following snippet to the bottom: +and by adding the following snippet to the bottom (these changes could also be +contributed back to `core-js` as a new `rhino-runner.js` file): ```javascript print("NOW SUPPORTED:");