Commit Graph

6731 Commits

Author SHA1 Message Date
dependabot[bot]
3ebe89f6be
Build: Bump the github-actions group with 3 updates
Some checks failed
Browserstack / ${{ matrix.BROWSER }} (Chrome_latest) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Chrome_latest-1) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Edge_latest) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Edge_latest-1) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Firefox_latest) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Firefox_latest-1) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (IE_11) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Opera_latest) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Safari_latest) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (Safari_latest-1) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (__iOS_15) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (__iOS_16) (push) Has been cancelled
Browserstack / ${{ matrix.BROWSER }} (__iOS_17) (push) Has been cancelled
Code scanning - action / CodeQL-Build (push) Has been cancelled
Filestash / Update Filestash (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Chrome, 20.x, test:esm) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Chrome, 20.x, test:no-deprecated) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Chrome, 20.x, test:selector-native) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Chrome, 20.x, test:slim) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Chrome/Firefox, 20.x, test:browser) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Firefox ESR (new), 20.x, test:firefox) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Firefox ESR (old), 20.x, test:firefox) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Node, 18.x, test:browserless) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Node, 20.x, lint) (push) Has been cancelled
Node / ${{ matrix.NPM_SCRIPT }} - ${{ matrix.NAME }} (${{ matrix.NODE_VERSION }}) (Node, 20.x, test:browserless) (push) Has been cancelled
Node / test:ie - IE (push) Has been cancelled
Node / test:safari - Safari (push) Has been cancelled
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-node](https://github.com/actions/setup-node) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.7 to 4.2.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](692973e3d9...d632683dd7)

Updates `actions/setup-node` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1e60f620b9...0a44ba7841)

Updates `github/codeql-action` from 3.26.6 to 3.26.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4dd16135b6...e2b3eafc8d)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Closes gh-5562
2024-09-30 20:23:58 -04:00
Michał Gołębiowski-Owczarek
559bc5ac58
Tests: Switch to an updated fork of promises-aplus-tests
The upstream package has been unmaintained for years, with dependencies
with long-reported security issues. Switching to a fork allows to resolve
all the security reports against the jQuery development environment.

The fork is maintained by @mgol and has the following changes:
1. The `underscore` dependency has been removed.
2. `sinon` has been updated from v1 to v19.
3. `mocha` has been updated from v2 to v10.

Changes to the source are minimal; it will be easy to rebase the fixes
if the upstream package is ever updated.

In addition to the above, the `q` dependency has been removed.
It's been added in gh-1996 but never really used.

Closes gh-5559
2024-09-30 18:48:46 +02:00
dependabot[bot]
147964e162
Build: Bump rollup from 4.19.0 to 4.22.4
Bumps [rollup](https://github.com/rollup/rollup) from 4.19.0 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.19.0...v4.22.4)

Closes gh-5558

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-25 01:03:42 +02:00
ac-mmi
3cad5c435a
Manipulation: Make jQuery.cleanData not skip elements during cleanup
When passing a result of `getElementByTagsName` to `jQuery.cleanData`, convert
it to an array first. Otherwise, a live NodeList is passed and if any of the
event cleanups remove the element itself, a collection is modified during the
iteration, making `jQuery.cleanData` skip cleanup for some elements.

Fixes gh-5214
Closes gh-5523

Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2024-09-11 00:18:53 +02:00
Michał Gołębiowski-Owczarek
6d78c0768d
Tests: Run tests in Edge in IE mode in GitHub Actions
While Edge in IE mode is not guaranteed to match IE 11 in every aspect,
in practice it generally does. Testing in this mode in GitHub Actions
will allow us to catch most IE-breaking issues at the PR level.

This change also adds missing npm scripts: `test:chrome`, `test:edge`
& `test:ie`.

Closes gh-5540
2024-09-09 18:24:28 +02:00
Michał Gołębiowski-Owczarek
4b7ecbad24
Tests: Run tests on both real Firefox ESRs
1. At the same time, there may be two supported versions of Firefox ESR. Run
   tests on both, installed locally.
2. Don't run tests on Firefox 115 on BrowserStack - it was added as there's
   an ESR version of Firefox 115, but ESR versions may be different, e.g. for
   some time ServiceWorker was disabled on ESR versions:
   https://bugzilla.mozilla.org/show_bug.cgi?id=1547023

Closes gh-5547
2024-09-06 14:35:55 +02:00
dependabot[bot]
3658caf129
Build: Bump webpack from 5.93.0 to 5.94.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.93.0 to 5.94.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.93.0...v5.94.0)

Closes gh-5544

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 23:25:45 +02:00
dependabot[bot]
a6feeaa740
Build: Bump github/codeql-action from 3.25.15 to 3.26.6 in the github-actions group
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.25.15 to 3.26.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](afb54ba388...4dd16135b6)

Closes gh-5545

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 23:24:03 +02:00
Timmy Willison
d5ae14f6fe
Tests: align mock.php spacing with 3.x-stable branch
Closes gh-5538
2024-08-25 09:19:37 -04:00
Timmy Willison
dbc9dac7ae
Tests: replace dead links in qunit fixture
Close gh-5532
2024-08-12 14:01:19 -04:00
Timmy Willison
c85454a843
Tests: replace express with basic Node server
Close gh-5527
2024-08-08 22:10:29 -04:00
Timmy Willison
7e6cee72e2
Build: align eslint config with 3.x branch as much as possible
Close gh-5524
2024-08-08 21:39:11 -04:00
dependabot[bot]
55bc35bcd4
Build: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/setup-node](https://github.com/actions/setup-node) and [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5528

Updates `actions/setup-node` from 4.0.2 to 4.0.3
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.0.2...1e60f620b9541d16bece96c5465dc8ee9832be0b)

Updates `github/codeql-action` from 3.25.11 to 3.25.15
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...afb54ba388)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 11:04:29 +02:00
Timmy Willison
a7d3383e66 Build: upgrade dependencies, including requirejs to 2.3.7 2024-07-29 12:34:41 -04:00
Timmy Willison
57ef12e0d1 Build: use --input-type=module in npm scripts
Ref gh-5521
2024-07-29 12:34:41 -04:00
Timmy Willison
53ad94f319 Release: correct build date in verification; other improvements
- the date is actually the date of the commit *prior*
  to the tag commit, as the files are built and then committed.
- also, the CDN should still be checked for non-stable releases,
  and should use different filenames (including in the map files).
- certain files should be skipped when checking the CDN.
- removed file diffing because it ended up being far too noisy,
  making it difficult to find the info I needed.
- because the build script required an addition, release
  verification will not work until the next release.
- print all files in failure case and whether each matched
- avoid npm script log in GH release notes changelog
- exclude changelog.md from release:clean command
- separate the post-release script from release-it for now, so we
  can keep manual verification before each push. The exact command is
  printed at the ened for convenience.

Closes gh-5521
2024-07-29 12:34:41 -04:00
Timmy Willison
be048a027d
Release: remove dist files from main branch 2024-07-17 10:00:13 -04:00
Timmy Willison
51fffe9f73
Release: 4.0.0-beta.2 2024-07-17 09:43:43 -04:00
Timmy Willison
3e612aeeb3
Release: ensure builds have the proper version
- order hooks in execution order
- update workflow actions

Closes gh-5519
2024-07-17 09:32:02 -04:00
Timmy Willison
1fa8df5dbd
Release: set preReleaseBase in config file
https://github.com/release-it/release-it/issues/1128#issuecomment-2224692805

Closes gh-5518
2024-07-12 15:43:41 -04:00
Timmy Willison
5518b2da18
Release: fix running pre/post release scripts in windows
- also fix tagging the release in the dist repo

Closes gh-5517
2024-07-11 12:23:10 -04:00
Timmy Willison
862e7a1882 Release: update AUTHORS.txt 2024-07-11 10:00:56 -04:00
Timmy Willison
2646a8b07f Release: migrate release process to release-it
*Authors*
- Checking and updating authors has been migrated
  to a custom script in the repo

*Changelog*
- changelogplease is no longer maintained
- generate changelog in markdown for GitHub releases
- generate changelog in HTML for blog posts
- generate contributors list in HTML for blog posts

*dist*
- clone dist repo, copy files, and commit/push
- commit tag with dist files on main branch;
  remove dist files from main branch after release

*cdn*
- clone cdn repo, copy files, and commit/push
- create versioned and unversioned copies in cdn/
- generate md5 sums and archives for Google and MSFT

*build*
- implement reproducible builds and verify release builds
  * uses the last modified date for the latest commit
  * See https://reproducible-builds.org/
- the verify workflow also ensures all files were
  properly published to the CDN and npm

*docs*
- the new release workflow is documented at build/release/README.md

*misc*
- now that we don't need the jquery-release script and
  now that we no longer need to build on Node 10, we can
  use ESM in all files in the build folder
- move dist wrappers to "wrappers" folders for easy removal
  of all built files
- limit certain workflows to the main repo (not forks)
- version in package.json has been set to beta.1 so that
  the next release will be beta.2
- release-it added the `preReleaseBase` option and we
  now always set it to `1` in the npm script. This is
  a noop for stable releases.

Fixes jquery/jquery-release#114
Closes gh-5512
2024-07-11 10:00:56 -04:00
dependabot[bot]
3a98ef91df
Build: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).

Updates `actions/checkout` from 4.1.6 to 4.1.7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

Updates `github/codeql-action` from 3.25.8 to 3.25.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2e230e8fe0...b611370bb5)

Closes gh-5515

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-05 18:45:08 +02:00
Timmy Willison
cb8ab6ccdb
Build: upgrade dependencies; fix bundler tests on windows
- account for newly unused parameters in the slim builds

Closes gh-5509
2024-06-15 09:11:34 -04:00
Timmy Willison
ea31e4d57c
Tests: remove unnecessary scroll feature test
- it wasn't working properly anyway

Closes gh-5507
2024-06-10 14:51:02 -04:00
Timmy Willison
74970524e5
Build: improve specificity of eslint config; add ecma versions
Closes gh-5501
2024-06-06 09:56:44 -04:00
dependabot[bot]
46b9e4803e
Build: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `actions/checkout` from 4.1.2 to 4.1.6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9bb56186c3...a5ac7e51b4)

Updates `github/codeql-action` from 3.24.9 to 3.25.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b1aada464...2e230e8fe0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Closes gh-5505
2024-06-06 00:05:28 +02:00
Michał Gołębiowski-Owczarek
3cac1465b4
Build: Group dependabot PRs updating GitHub Actions
We have monthly automatic dependabot PRs for GitHub Actions. Unfortunately,
as of now we get a separate PR for every dependency which is a bit spammy
compared to regular commits updating source.

Thankfully, there's now a way to tell dependabot to submit a single PR per
a defined group. This change defines a single group to have a single dependabot
PR for all action updates.

Closes gh-5503
2024-06-06 00:00:32 +02:00
Michał Gołębiowski-Owczarek
071f6dba6b
CSS:Tests: Fix tests & support tests under CSS Zoom
Firefox 126+ implements CSS zoom in a way it affects width computed style
very slightly (`100.008px` instead of `100px`); accept that difference.

Add a test for support tests resolving the same under CSS zoom & without one.
That test uncovered Chrome failing the `reliableTrDimensions` support test
under zoom; the test has been fixed.

Fixes gh-5489
Closes gh-5495
Ref gh-5496
2024-06-03 18:15:23 +02:00
Michał Gołębiowski-Owczarek
f2d9fde5f3
Tests: Align :has selector tests with 3.x-stable
Consistently use `assert.selectInFixture` instead of prepending the selector
with `#qunit-fixture ` manually.

Closes gh-5498
Ref gh-5497
2024-05-29 18:32:59 +02:00
Timmy Willison
fa73e2f1b2
Tests: revert concurrency group change
- It's common for us to merge to main and cherry pick to 3.x-stable,
  so it's best if concurrency is shared between branches, which
  is effectively what we had already as it matches on workflow name
  and browser. Ideally, it could also match on the corresponding commit,
  but it seems the commit message is not available in the github context.

Close gh-5492
2024-05-29 11:06:23 -04:00
Michał Gołębiowski-Owczarek
527fb3dcf0
Event: Increase robustness of an inner native event in leverageNative
In Firefox, alert displayed just before blurring an element dispatches
the native blur event twice which tripped the jQuery logic if a jQuery blur
handler was not attached before the trigger call.

This was because the `leverageNative` logic part for triggering first checked if
setup was done before (which, for example, is done if a jQuery handler was
registered before for this element+event pair) and - if it was not - added
a dummy handler that just returned `true`. The `leverageNative` logic made that
`true` then saved into private data, replacing the previous `saved` array. Since
`true` passed the truthy check, the second native inner handler treated `true`
as an array, crashing on the `slice` call.

The same issue could happen if a handler returning `true` is attached before
triggering. A bare `length` check would not be enough as the user handler may
return an array-like as well. To remove this potential data shape clash, capture
the inner result in an object with a `value` property instead of saving it
directly.

Since it's impossible to call `alert()` in unit tests, simulate the issue by
replacing the `addEventListener` method on a test button with a version that
calls attached blur handlers twice.

Fixes gh-5459
Closes gh-5466
Ref gh-5236
2024-05-20 18:05:19 +02:00
Timmy Willison
5880e02707
Tests: include github ref in concurrency group
- fixes cancelled workflows when multiple PRs are merged
  in quick succession to both the main and 3.x-stable branches

Close gh-5481
2024-04-25 13:07:55 -04:00
Michał Gołębiowski-Owczarek
399a78ee9f
Tests: Make the beforeunload event tests work regardless of extensions
Some browser extensions, like React DevTools, send messages to the content area.
Since our beforeunload event test listens for all messages, it used to catch
those as well, failing the test.

Add a `source` field to the payload JSON and check for it before treating the
message as coming from our own test to make sure the test passes even with such
browser extensions installed.

Closes gh-5478
2024-04-25 00:24:55 +02:00
Michał Gołębiowski-Owczarek
7cdd837423
Docs: Update remaining HTTP URLs to HTTPS
Update a few remaining HTTP URLs to HTTPS. The only ones left are XMLNS-like
URLs or ones to localhost - those need to stay as-is.

Closes gh-5479
2024-04-25 00:22:36 +02:00
Liam James
556eaf4a19
Offset: Increase search depth when finding the 'real' offset parent
Changes:
* Increase search depth when finding for the real offset parent
* Ignore offset for statically positioned offset parent
* Add tests for the position of an element in a table

Closes gh-4861
2024-04-19 15:47:52 +02:00
dependabot[bot]
df1df9503a
Build: Bump actions/cache, actions/checkout & github/codeql-action
1. Bump actions/cache from 4.0.1 to 4.0.2

Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](ab5e6d0c87...0c45773b62)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

2. Bump github/codeql-action from 3.24.6 to 3.24.9

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8a470fddaf...1b1aada464)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Bump actions/checkout from 4.1.1 to 4.1.2

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Closes gh-5462

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 23:35:25 +02:00
Timmy Willison
284b082eb8
Tests: share queue/browser handling for all worker types
- one queue to rule them all: browserstack, selenium, and jsdom
- retries and hard retries are now supported in selenium
- selenium tests now re-use browsers in the same way as browserstack

Close gh-5460
2024-04-01 10:23:36 -04:00
dependabot[bot]
691c0aeede
Build: Bump express from 4.18.3 to 4.19.2
Bumps [express](https://github.com/expressjs/express) from 4.18.3 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.3...4.19.2)

Closes gh-5461

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 21:23:24 +01:00
Timmy Willison
b9d333acef
Tests: improve diffing for values of different types
Close gh-5454

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2024-03-27 10:36:35 -04:00
Michał Gołębiowski-Owczarek
063831b637
Attributes: Make .attr( name, false ) remove for all non-ARIA attrs
The HTML spec defines boolean attributes:
https://html.spec.whatwg.org/#boolean-attributes
that often correlate with boolean properties. If the attribute is missing, it
correlates with the `false` property value, if it's present - the `true`
property value. The only valid values are an empty string or the attribute name.

jQuery tried to be helpful here and treated boolean attributes in a special way
in the `.attr()` API:
1. For the getter, as long as the attribute was present, it was returning the
   attribute name lowercased, ignoring the value.
2. For the setter, it was removing the attribute when `false` was passed;
   otherwise, it was ignoring the passed value and set the attribute -
   interestingly, in jQuery `>=3` not lowercased anymore.

The problem is the spec occasionally converts boolean attributes into ones with
additional attribute values with special behavior - one such example is the new
`"until-found"` value for the `hidden` attribute. Our setter normalization
means passing those values is impossible with jQuery. Also, new boolean
attributes are introduced occasionally and jQuery cannot easily add them to the
list without incurring breaking changes.

This patch removes any special handling of boolean attributes - the getter
returns the value as-is and the setter sets the provided value.

To provide better backwards compatibility with the very frequent `false` value
provided to remove the attribute, this patch makes `false` trigger attribute
removal for ALL non-ARIA attributes. ARIA attributes are exempt from the rule
since many of them recognize `"false"` as a valid value with semantics different
than the attribute missing. To remove an ARIA attribute, use `.removeAttr()` or
pass `null` as the value to `.attr()` which doesn't have this exception.

Fixes gh-5388
Closes gh-5452

Co-authored-by: Richard Gibson <richard.gibson@gmail.com>
2024-03-20 00:46:30 +01:00
Timmy Willison
f80e78ef3e
Tests: show any and all actual/expected values
Close gh-5448
2024-03-15 17:44:05 -04:00
Timmy Willison
44fb7fa220
Tests: add diffing to test reporter
Close gh-5445
2024-03-14 14:28:20 -04:00
Timmy Willison
1e84908baf
Tests: add actual and expected messages to test reporter
Close gh-5443
2024-03-14 09:05:42 -04:00
Michał Gołębiowski-Owczarek
60f11b58bf
Core: Fix the exports setup to make bundlers work with ESM & CommonJS
We cannot pass a single file via the `module` condition as then
`require( "jquery" )` will not return jQuery but instead the module object
with `default`, `$` & `jQuery` as keys. Instead:

1. For Node.js, detected via the `node` condition:
    1. Expose a regular CommonJS version to `require`
    2. Expose a tiny wrapper over CommonJS to `import`
2. For bundlers, detected via the `module` condition:
    1. Expose a regular ESM version to `import`
    2. Expose a tiny wrapper over ESM to `require`
3. If neither Node.js nor bundlers are detected (no `node` or `module`
   conditions`):
    1. Expose a regular CommonJS version to `require`
    2. Expose a regular ESM version to `import`

The reasons for such definitions are as follows:
1. In Node.js, one can synchronously import from a CommonJS file inside of
   an ESM one but not vice-versa. To use an ESM file in a CommonJS one,
   a dynamic import is required and that forces asynchronicity.
2. In some bundlers CommonJS is not necessarily enabled - e.g. in Rollup without
   the CommonJS plugin. Therefore, the ESM version needs to be pure ESM.
   However, bundlers allow synchronously calling `require` on an ESM file. This
   is possible since bundlers merge the files before they are passed to
   the browser to execute and the final bundles no longer contain async import
   code.
3. Bare ESM & CommonJS versions are provided to non-Node non-bundler
   environments where we cannot assume interoperability between ESM & CommonJS
   is supported.
4. Bare versions cannot be supplied to Node or bundlers as projects using both
   ESM & CommonJS to fetch jQuery would result in duplicate jQuery instances,
   leading to increased JS size and disjoint data storage.

In addition to the above changes, the `script` condition has been dropped. Only
Webpack documents this condition and it's not clear when exactly it's triggered.
Adding support for a new condition can be added later without a breaking change;
removing is not so easy.

The `production` & `development` conditions have been removed as well. They were
not really applied correctly; we'd need to provide both of them to each current
leaf which would double the size of the definition for the `.` & `./slim` entry
points. In jQuery, the only difference between development & production builds
is minification; there are no logic changes so we can pass unminified versions
to all the tooling, expecting minification down the line.

As for the factory entry points:
1. Node.js always gets the CommonJS version
2. Bundlers always get the ESM version
3. Other tools take the ESM version when using `import` and the CommonJS when
   using `require`.

The complexity is lower than for the `.` & `./slim` entry points because there's
no default export to handle so Node/bundler wrapper files are not necessary.

Other changes:
* Tests: Change "node:assert" to "node:assert/strict"; the former is deprecated
* Docs: Mention that the CommonJS module doesn't expose named exports
* Tests: Run Node & bundler tests for all the above cases

Fixes gh-5416
Closes gh-5429
2024-03-12 00:39:34 +01:00
Timmy Willison
fedffe7448 Tests: fix worker restarts for failed browser acknowledgements
Close gh-5440
2024-03-11 13:29:23 -04:00
Timmy Willison
783c9d6958 Build: make compare size cache readable for manual edits
Ref gh-5440
2024-03-11 13:29:23 -04:00
Timmy Willison
8a3a74c475 Build: fix size comparison for slim files when the branch is dirty
Ref gh-5440
2024-03-11 13:29:23 -04:00
Timmy Willison
ae7f6139cc Build: migrate more uses of fs.promises; use node: protocol
Ref gh-5440
2024-03-11 13:29:23 -04:00