🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Feb 24, 2020

Summary

This PR aligns the 3.x-stable branch with master in two aspects:

  1. It migrates the nonce module to return an object instead of a primitive
    variable. This had to be changed on master as in ES modules you export
    live read-only bindings to variables, meaning you can't increment the nonce
    directly. Also, the way it was done so far was working differently in AMD & the
    single built file - in the built file one nonce variable was declared, accessed
    and incremented. In AMD mode separate instances were create for each module
    that depend on the nonce module, creating unintended nonce clashes.
  2. Whether the noGlobal parameter was set to true is now checked using the
    typeof operator to align with master.

+8 bytes

Checklist

This commit aligns the `3.x-stable` branch with `master` in two aspects:
1. It migrates the nonce module to return an object instead of a primitive
variable. This had to be changed on `master` as in ES modules you export
live read-only bindings to variables, meaning you can't increment the nonce
directly. Also, the way it was done so far was working differently in AMD & the
single built file - in the built file one nonce variable was declared, accessed
and incremented. In AMD mode separate instances were create for each module
that depend on the nonce module, creating unintended nonce clashes.
2. Whether the `noGlobal` parameter was set to `true` is now checked using the
typeof operator to align with `master`.

Ref jquerygh-4541
Ref d0ce00c
@mgol mgol removed the Needs review label Feb 24, 2020
@mgol mgol added this to the 3.5.0 milestone Feb 24, 2020
@mgol mgol merged commit 22bf701 into jquery:3.x-stable Feb 24, 2020
@mgol mgol deleted the 3.x-align-with-master branch February 24, 2020 18:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Development

Successfully merging this pull request may close these issues.

2 participants