Skip to content

[pull] main from tc39:main#2

Open
pull[bot] wants to merge 389 commits into
Graysonbarton:mainfrom
tc39:main
Open

[pull] main from tc39:main#2
pull[bot] wants to merge 389 commits into
Graysonbarton:mainfrom
tc39:main

Conversation

@pull

@pull pull Bot commented Oct 16, 2024

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@sourcery-ai

sourcery-ai Bot commented Oct 16, 2024

Copy link
Copy Markdown

Reviewer's Guide by Sourcery

This pull request implements several changes to improve the build process, enhance the snapshot warning functionality, update dependencies, and introduce a new spellcheck feature. The changes span across multiple files, including scripts, workflows, and configuration files.

Sequence diagram for snapshot warning insertion

sequenceDiagram
    participant Script as insert_snapshot_warning.js
    participant JSDOM
    participant VirtualConsole
    participant FileSystem

    Script->>VirtualConsole: Create VirtualConsole instance
    VirtualConsole->>VirtualConsole: Suppress warnings
    loop for each HTML file
        Script->>JSDOM: Load HTML file with virtualConsole
        JSDOM->>Script: Return DOM
        Script->>JSDOM: Create style element
        Script->>JSDOM: Insert WARNING_HTML at body start
        Script->>FileSystem: Write updated HTML file
    end
    Script->>Console: Log 'Done!' on success
    Script->>Console: Log error on failure
Loading

Updated class diagram for spellcheck script

classDiagram
    class Spellcheck {
        +String BASE_REF
        +String[] ASPELL_OPTS
        +int MIN_WORD_SIZE
        +makeDict(words)
        +lines(text)
    }
    class ExecP {
        +execP(command)
    }
    class FileSystem {
        +writeFile(file, content)
    }
    Spellcheck --> ExecP : uses
    Spellcheck --> FileSystem : uses
    note for Spellcheck "New script for spellchecking HTML files"
Loading

File-Level Changes

Change Details Files
Enhanced snapshot warning functionality
  • Added VirtualConsole to suppress warnings from unsupported CSS features in JSDOM
  • Implemented support for multiple HTML files in the 'out' and 'out/multipage' directories
  • Added a script to automatically close the warning details if the user navigates between snapshot pages
scripts/insert_snapshot_warning.js
scripts/snapshot_warning.html
Updated build and deployment workflows
  • Added '--no-audit' flag to npm ci commands
  • Set NPM_CONFIG_AUDIT environment variable to false
.github/workflows/build.yml
.github/workflows/deploy.yml
.github/workflows/enforce-format.yml
.github/workflows/ipr.yml
.github/workflows/preview-build.yml
.github/workflows/preview.yml
.github/workflows/publish-biblio.yml
Introduced new spellcheck feature
  • Added a new spellcheck script to detect potential typos
  • Created a new workflow to run the spellcheck on pull requests
scripts/spellcheck.mjs
.github/workflows/spellcheck.yml
Updated dependencies and configurations
  • Updated esmeta version to v0.4.3
  • Added 'TypedArrayCreateFromConstructor' to esmeta-ignore.json
  • Modified the git rev-parse command to return full SHA instead of short SHA
.github/workflows/esmeta-typecheck.yml
esmeta-ignore.json
scripts/check-form.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, pull[bot]!). We assume it knows what it's doing!

@pull pull Bot added the ⤵️ pull label Oct 16, 2024
@pull pull Bot added the merge-conflict Resolve conflicts manually label Mar 6, 2025
anba and others added 9 commits April 2, 2025 14:46
…or tests (#3402)

`Is{Accessor,Data,Generic}Descriptor` are never called with `undefined`.
Specifically, move the sections:
- Properties of RegExp String Iterator Instances
- Properties of Array Iterator Instances
up one level in the section-hierarchy.

Elsewhere in the spec, every "Properties of Foo Instances" section
is a sibling, not a child, of the "Properties of the Foo Prototype"
(or equivalent) section.
- "Internal Slots of RegExp String Iterator Instances"
- "Internal Slots of Array Iterator Instances"

In the first table, simplify some 'Description' text.

In the second table, correct the mis-statement that [[ArrayLikeIterationKind]] is a String value.
@snyk-io

snyk-io Bot commented Apr 23, 2025

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

jmdyck and others added 14 commits April 23, 2025 16:26
_module_.Evaluate() returns a Promise, not a Completion Record.
In each of
- NewPromiseResolveThenableJob
- Promise.all
- Promise.allSettled
- Promise.any
- Promise.race

there's a step of the form:
```
    1. Return ? _result_.
```

In each case, this commit changes the '?' to a '!',
because _result_ is guaranteed to be a normal completion,
because the preceding step is:
```
    1. If _result_ is an abrupt completion, then
```
and the body of that `If` always results in a return.

That's obvious in the case of NewPromiseResolveThenableJob,
but for the other four, you have to observe that:
- for IteratorClose: if its second arg is abrupt, its result is also abrupt.
- for IfAbruptRejectPromise: if its first arg is abrupt, it causes a return.
This PR removes the optional _waitable_ parameter in the
ValidateAtomicAccessOnIntegerTypedArray AO. Only Atomics.notify passes
true explicitly as an argument, and this inlines the steps in that
caller.

See #3475
OnlyWick and others added 30 commits June 2, 2026 00:00
…on-defined" (#3850)

...allowing discovery of implementation-defined behaviour by references to that term

Ref https://github.com/tc39/ecma262/pull/3829/changes#r3213198174
…3861)

When _referencing_ `?` and `!` (as opposed to _using_ them), enclose
them in typographic quotes rather than backticks. Using quotes aligns
with editorial conventions (albeit inconsistently applied), while using
backticks makes them render as if they were
[grammar terminal symbols](https://tc39.es/ecma262/multipage/notational-conventions.html#sec-terminal-symbols).
`FromBase64` only appends bytes via `DecodeFullLengthBase64Chunk`
(always 3 bytes at a time)
inside step 10.l, and step 10.i preempts further reading when continuing to the next full chunk would exceed `maxLength`.
Together these guarantee that, at the top of each iteration of the Repeat loop, the number of elements in `bytes` is a multiple of 3;
partial outputs (1 or 2 bytes) only ever occur at end-of-stream via `DecodeFinalBase64Chunk` (step 10.b.i and step 10.e).

This invariant is currently implicit;
making it an explicit Assert clarifies the algorithm's structure for both readers and implementers
(e.g., it justifies why step 10.i's two conditions are exhaustive)
Link to the associated PR, and move its collapsed box to top right
(where it won't obscure the References pane)
…r, DisposableStack, and AsyncDisposableStack (#3000)

* Spec text for proposal-explicit-resource-management
* Fix lint errors
* Run formatter
* Fix signature for DisposeResources
* Fixes for some esmeta warnings
* Fixes for some esmeta warnings
* Add missing ReturnIfAbrupt in DisposableStack.prototype.use
* More ecmarkup signature fixes
* Change DisposeResources signature to return completion record
* Order sections by property name
* Syntax of types
* id of AO clause doesn't need to include param names
* Avoid the use of `Type()`
* Use preamble conventions from PR #2592
* Interface names are put in `<i>` rather than `<em>`
* A 'Slots' table should have a 'Type' column
* Add 'UsingDeclaration' to Annex A
* misc minor fixes
* add description suggestion from @jmdyck
* Add DisposeCapabilityRecord from tc39/proposal-explicit-resource-management#144
* Wrap UpdateEmpty calls in calls to Completion
* Run formatter
* Run formatter again
* Fix formatting and capitalization
* Clean up DisposeResources signature, replace UpdateEmpty with assertions
* Add 'either' in front of 'null or undefined'
* Use CreateBuiltinFunction
* Address additional editor feedback (from async PR)
* Move BindingPattern restriction for 'using' to an early error
* Fix typo in using declaration early errors
* Fix typos
* run formatter
* Remove InstallErrorCause from SuppressedError, per 2023-jan consensus
* Spec text for proposal-async-explicit-resource-management
* Run formatter
* Add 'either' in front of 'null or undefined'
* Address editor feedback
* Address additional editor feedback
* Switch back to a production parameter, update ASI note
* Remove 'await' restriction per March 2023 consensus. See tc39/proposal-explicit-resource-management#153
* Adopt consensus changes from tc39/proposal-explicit-resource-management#178
* Adopt consensus changes from tc39/proposal-explicit-resource-management#180
* Adopt typo fix from tc39/proposal-explicit-resource-management#217
* Fix typos and add temporary PR note
* Remove temporary PR note
* Remaining consensus updates from proposal repo
* Add missing undefined check in GetDisposeMethod
* Fix DisposeCapability leak
* fix formatting
* Switch to empty list
* Update text of NOTE
* Add PromiseCapability wrapper around sync dispose in an `await using`
* Fix missing lookahead restriction
* Remove superfluous ClassBody restriction
* Add entries to esmeta-ignore
* Reduce unnecessary Awaits for nullish values in blocks containing `await using`
* Add missing 'constructor' definitions
* Disallow using/await using in a switch case/default clause
* Fix formatting
* PR feedback
* minor fixes
* Switch from @@ to % in a few more places
* Update esmeta-ignore.json
* Update asyncDispose to be an async method
* avoid threading kind through all the InitializeBinding machinery
* rename _kind_ to _declarationKind_ in ForIn/OfBodyEvaluation

  since there's already _iterationKind_ and _lhsKind_
* move _declarationKind_ into the branch where that makes sense

  otherwise we're calling IsUsingDeclaration/IsAwaitUsingDeclaration on potentially an assignment target or var declaration, which they aren't defined over.

* move it back
* PR Feedback
* Some missing changes pulled from rbuckton#11
* Fix some remaining suggestions from rbuckton#7
* Switch to `<em>` where appropriate
* PR feedback
* Don't overwrite completion parameter in DisposeResources
* The spec usually uses lower-case for ids.
* Drop 'variants' attribute
* Changes to Annex A to make it parallel to main-body grammar
* Add subclauses to "Constructor Properties of The Global Object"
* Need to define ForDeclarationBindingInitialization for ForDeclaration
* Remove unreachable SDO rules
* Remove more unreachable SDO rules
* Remove unnecessary steps in CreateDisposableResource
* Add explicit return to algorithm
* EvaluateClassStaticBlockBody: add an Assert
* Remove 'kind' description from InitializeBinding
* CaseBlock can't have resources, so just assert
* Restore missing NOTE and fix indentation
* ContainsUsing and HasUnterminatedUsingDeclaration are identical
* Rename V to value and O to obj
* Use list shorthand for NewDisposeCapability
* Rely on NOTE rather than overwriting [[DisposableResourceStack]]
* Add type to clauses and use 'this method'
* Merge branch 'main' into explicit-resource-management
* Revert changes to esmeta-ignore.json
* PR fix type and function/method usage
* Additional editorial feedback
* Refactor out DisposeCapability
* Fix internal slot typo
* Remove unused Dispose AO
* Editorial feedback
* Remove excess argument to 'return' method
* Restore 'then' in assertion
* Restore old ids
* SuppressedError.prototype description
* Revert 'this function'->'this method'
* 'property'->'properties' in (Async)Disposable interface desc
* Other editorial feedback
* no list for mutually exclusive states
* Align aliases with #3873
* PR feedback
* Symbol description wording
* Merge pull request #17 from rbuckton/excess-iter-return-argument

  Remove excess argument to 'return' method

* Revert function->method changes
That is, if Parse Node _P_ must cover an _N_,
no early error rules are applied to _P_ or any of its descendants.

Also, in the Early Errors section for ObjectLiterals etc:

- Delete the paragraph about the non-application of some rules in some cases,
  as it's now redundant.

- Move up the early error rule for ObjectLiteral.

- Bring together & clarify all the prose about ObjectLiteral being
  a cover for ObjectAssignmentPattern.

- Add an example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.