From 1c4ba244e28e7424d83f5f107a6ee6cde1f1cd13 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 15 Oct 2024 17:31:11 -0700 Subject: [PATCH 1/2] Meta: update actions; install sbt; pin to ubuntu 22 - https://github.com/actions/runner-images/issues/10788 --- .github/workflows/build.yml | 6 +++--- .github/workflows/deploy.yml | 6 +++--- .github/workflows/enforce-format.yml | 6 +++--- .github/workflows/esmeta-typecheck.yml | 6 ++++-- .github/workflows/ipr.yml | 6 +++--- .github/workflows/preview-build.yml | 6 +++--- .github/workflows/preview.yml | 6 +++--- .github/workflows/publish-biblio.yml | 6 +++--- .github/workflows/require-allow-edits.yml | 2 +- .github/workflows/spellcheck.yml | 6 +++--- 10 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eda5ecd5b2..d6d4fc5843 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,11 +5,11 @@ on: [pull_request, push] jobs: build: name: 'build & lint ecmarkup' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a567db1f65..6a251d600f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,12 +8,12 @@ on: jobs: deploy: name: 'deploy github pages' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ github.repository == 'tc39/ecma262' }} steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/enforce-format.yml b/.github/workflows/enforce-format.yml index d40c94ff9b..3ddce21e6a 100644 --- a/.github/workflows/enforce-format.yml +++ b/.github/workflows/enforce-format.yml @@ -5,11 +5,11 @@ on: [pull_request] jobs: build: name: 'enforce format' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/esmeta-typecheck.yml b/.github/workflows/esmeta-typecheck.yml index ff8f328da3..c42c2a7060 100644 --- a/.github/workflows/esmeta-typecheck.yml +++ b/.github/workflows/esmeta-typecheck.yml @@ -5,19 +5,21 @@ on: [pull_request] jobs: esmeta-typecheck: name: 'esmeta typecheck' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: ESMETA_HOME: vendor/esmeta steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup JDK uses: actions/setup-java@v3 with: distribution: temurin java-version: 17 + - name: Setup SBT + uses: sbt/setup-sbt@v1 - name: download esmeta run: | mkdir -p "${ESMETA_HOME}" diff --git a/.github/workflows/ipr.yml b/.github/workflows/ipr.yml index cc313dfb42..4844b2ddd8 100644 --- a/.github/workflows/ipr.yml +++ b/.github/workflows/ipr.yml @@ -11,11 +11,11 @@ on: jobs: build: name: 'check IPR form' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 55a4474dc2..6af134a8b5 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -5,11 +5,11 @@ on: [pull_request] jobs: build: name: 'build PR preview' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 1f1e69a4b6..893d91cf29 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -9,7 +9,7 @@ on: jobs: upload: name: 'upload PR preview' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: > ${{ github.event.workflow_run.event == 'pull_request' && @@ -18,8 +18,8 @@ jobs: }} steps: - - uses: actions/checkout@v3 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: actions/checkout@v4 + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false diff --git a/.github/workflows/publish-biblio.yml b/.github/workflows/publish-biblio.yml index bca1c1919f..fd8c22da11 100644 --- a/.github/workflows/publish-biblio.yml +++ b/.github/workflows/publish-biblio.yml @@ -8,17 +8,17 @@ on: jobs: publish: name: 'publish ecma262-biblio' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: ${{ github.repository == 'tc39/ecma262' }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/require-allow-edits.yml b/.github/workflows/require-allow-edits.yml index 9021ca22ef..d38d96743b 100644 --- a/.github/workflows/require-allow-edits.yml +++ b/.github/workflows/require-allow-edits.yml @@ -6,7 +6,7 @@ jobs: _: name: "Require “Allow Edits”" - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: ljharb/require-allow-edits@main diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 6a02292048..98ad93d03c 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -5,16 +5,16 @@ on: [pull_request] jobs: spellcheck: name: 'check for newly-introduced spelling errors' - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - run: sudo apt-get install aspell - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # Number of commits to fetch. 0 indicates all history for all branches and tags. # Default: 1 fetch-depth: 0 - - uses: ljharb/actions/node/install@d9f477827ed71a259056764107f74afc29febcae + - uses: ljharb/actions/node/install@6bc39109c48f74895ad72ec03ca0bb4e4da2fa3f name: 'nvm install lts/* && npm ci --no-audit' env: NPM_CONFIG_AUDIT: false From d72630f1ad8d4af5834dfb5f18e9d134a17ba5a3 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 15 Oct 2024 17:31:15 -0700 Subject: [PATCH 2/2] Normative: add `Promise.try` (#3327) See https://github.com/tc39/proposal-promise-try/issues/15 --- spec.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec.html b/spec.html index 2871f040e5..b94634f9ee 100644 --- a/spec.html +++ b/spec.html @@ -47588,6 +47588,25 @@

+ +

Promise.try ( _callback_, ..._args_ )

+

When the `try` method is called with argument _callback_, the following steps are taken:

+ + 1. Let _C_ be the *this* value. + 1. If _C_ is not an Object, throw a *TypeError* exception. + 1. Let _promiseCapability_ be ? NewPromiseCapability(_C_). + 1. Let _status_ be Completion(Call(_callback_, *undefined*, _args_)). + 1. If _status_ is an abrupt completion, then + 1. Perform ? Call(_promiseCapability_.[[Reject]], *undefined*, « _status_.[[Value]] »). + 1. Else, + 1. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _status_.[[Value]] »). + 1. Return _promiseCapability_.[[Promise]]. + + +

This function expects its *this* value to be a constructor function that supports the parameter conventions of the Promise constructor.

+
+
+

Promise.withResolvers ( )

This function returns an object with three properties: a new promise together with the `resolve` and `reject` functions associated with it.