Commit Graph

6687 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
57152dccc3 Release: Fix release issues uncovered during the 4.0.0-rc.1 release
Changes:
* Run `pre-release.sh` & `post-release.sh` scripts directly; make them
  executable
* Fix the hashbang to specify the default bash installation; note: `/bin/bash`
  would be a wrong choice as that would use an ancient 3.x version on macOS
* Make sure Bash 5 or newer is used
* Run `npm publish --tag beta` when a pre-release is being published
* Fix the `repository.url` field in `package.json` as reported by `npm publish`
* Fix a few issues reported by shellcheck

Closes gh-5697

(cherry picked from commit a5b0c4318d)
2025-09-16 00:49:35 +02:00
Michał Gołębiowski-Owczarek
c7ccab2025 Tests: Fix module/nomodule tests flakiness
The module/nomodule tests are the most flaky ones, contributing significantly
to increase number of test failures (somewhat mitigated by auto-retries).

Fix flakiness of module/nomodule tests:
1. For module tests, increase the timeout to 5 seconds. In order for most tests
   to not wait that long, change callbacks called by module scripts to verify
   the results as soon as all scripts have run.
2. For nomodule tests, run the check in 1 second. All modern browsers will
   need to wait that long, hence a smaller timeout, and if occasionally the
   check runs too quickly, the test will still pass.

Closes gh-5699

(cherry picked from commit 5964acf330)
2025-09-15 18:59:57 +02:00
Michał Gołębiowski-Owczarek
94bd860301 Build: Simplify caching in CI, use npm ci (3.x)
Our setup is pretty standard, so manual configuration of `actions/cache`
is an overkill. Relying on built-in `actions/node` caching will also resolve
differences between caching configurations for macOS/Linux vs. Windows.

Also, switch from `npm install` to `npm ci` in CI.

Closes gh-5703
Ref gh-5702
Ref jquery/jquery-migrate#597
2025-09-15 18:14:49 +02:00
dependabot[bot]
9d7f6e628e Build: Bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5698

Updates `actions/checkout` from 4.2.2 to 5.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

Updates `actions/cache` from 4.2.3 to 4.2.4
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](5a3ec84eff...0400d5f644)

Updates `github/codeql-action` from 3.29.2 to 3.29.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](181d5eefc2...3c3833e0f8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 4.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  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>
(cherry picked from commit 607b25eb08)
2025-09-03 00:50:46 +02:00
studystill
b57c4b51dc Docs: Fix some minor issues in comments
Changes:
1. Eliminate mentions of Karma.
2. Replace `"root granchild"` with `"root grandchild"`.
3. Collapse duplicate "the the" & "with with" into single words.

Closes gh-5662

Signed-off-by: studystill <chenghuiyue@outlook.com>
Co-authored-by: Michał Gołębiowski-Owczarek <m.goleb@gmail.com>
(cherry picked from commit e4d4dd81bf)
2025-08-18 22:29:52 +02:00
dependabot[bot]
2ffba5f624 Build: Bump tmp and @inquirer/editor
Bumps [tmp](https://github.com/raszi/node-tmp) and [@inquirer/editor](https://github.com/SBoudrias/Inquirer.js). These dependencies needed to be updated together.

Updates `tmp` from 0.2.3 to 0.2.5
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.5)

Updates `@inquirer/editor` from 4.2.11 to 4.2.16
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/@inquirer/editor@4.2.11...@inquirer/editor@4.2.16)

Closes gh-5694

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.5
  dependency-type: indirect
- dependency-name: "@inquirer/editor"
  dependency-version: 4.2.16
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 9c84195b94)
2025-08-12 22:06:45 +02:00
Michał Gołębiowski-Owczarek
ed119f79b2 Release: Run npm publish in the post-release phase
PR gh-5681 specified the `tmp/release/dist` folder as `publishPath` so that
`npm publish` is done from the dist repo, not the source one. However,
`npm publish` is invoked by release-it before the post-release phase, at which
stage the dist repo is not updated with the new release yet.

Instead, do the `npm publish` manually in the post-release stage, just after
the dist repo is updated & changes are pushed.

Closes gh-5690

(cherry picked from commit ff1f0eaafd)
2025-08-12 00:24:51 +02:00
Michał Gołębiowski-Owczarek
85ee6c3a27 Release: Only run browserless tests during the release
`npm test` is susceptible to any flakiness in tests, making releases less
predictable. Our process requires us to check CI before releases or run
`npm test` manually if there are issues with that, we don't need to repeat it
all during the release process.

In addition to that, currently the whole pre-release part is silent and the full
`npm test` takes a long time to finish while no feedback is presented to the
person running the release. It will be more bearable with just browserless
tests.

Closes gh-5689

(cherry picked from commit fb5ab0f546)
2025-08-12 00:23:49 +02:00
Michał Gołębiowski-Owczarek
492dfcd940 Build: Make the sed usage portable across Linux & macOS
On macOS (which uses the BSD-variant of sed), the `-i` flag requires its
“backup extension” to come immediately after the i (with a space), even if
it’s empty; this made the release `sed` commands fail on macOS. The GNU sed
doesn’t require an extension but it allows it.

To make the commands work both on macOS & Linux, make the following changes:
1. Always specify the backup extension.
2. Explicitly specify the script part by using the `-e` flag.
3. To simplify the patterns, use `|` as a separator instead of `/`; then
   slashes don't need to be escaped in the script parts.

(cherry picked from commit a848611f9a)
2025-08-12 00:23:17 +02:00
Michał Gołębiowski-Owczarek
184f106395 Tests: Use releases.jquery.com as external host for AJAX testing
Previously, we used example.com. However, that one is rate-limited, causing us
frequent unit test failures.

Closes gh-5688

(cherry picked from commit f21a6ea6b5)
2025-08-11 22:16:05 +02:00
dependabot[bot]
8d7252787b Build: Bump form-data from 4.0.2 to 4.0.4
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.4)

Closes gh-5677

---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 70ee64fc95)
2025-08-06 12:55:46 +02:00
Michał Gołębiowski-Owczarek
497414b22b Build: Test on Safari 18 & 17 instead of "latest-1"
JTR doesn't take into account the jump from Safari 18 to 26,
so we need to specify versions explicitly. Also, while BrowserStack
already added macOS Tahoe with Safari 26, it's not a stable release
yet, so we need to test on Safari 17 as well.

Closes gh-5687
Ref jquery/jquery-test-runner#17

(cherry picked from commit 958369f088)
2025-08-06 11:18:22 +02:00
dependabot[bot]
50d6d096bf Build: Bump github/codeql-action in the github-actions group
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5673

Updates `github/codeql-action` from 3.28.18 to 3.29.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ff0a06e83c...181d5eefc2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  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>
(cherry picked from commit 19621e9944)
2025-08-06 10:31:50 +02:00
Michał Gołębiowski-Owczarek
24cd228da2 Build: Update the jQuery license link in comment headers
Switch https://jquery.org/license to https://jquery.com/license/, note the
trailing slash. Leave the trailing slash from the minified version to save size.

Closes gh-5686
Ref gh-5685
2025-08-06 00:22:21 +02:00
Michał Gołębiowski-Owczarek
d2983769f3 Build: Try to unpack Firefox ESR via xz, fall back to bzip2
The `-j` switch passed to `tar` indicates the archive is compressed using the
bzip2 format (`bz2` extension). That was how Firefox used to be compressed until
recently, but the new ESR release now uses xz. Ubuntu `tar` doesn't auto-guess
the encryption algorithm, so to support both, first try with xz and fall back
to bzip2 if that fails.

Note: this will download the old Firefox ESR twice, but it will still work
when the current ESR version starts to use xz with no changes to the code.

Closes gh-5684
Ref gh-5682
2025-08-04 23:48:20 +02:00
dependabot[bot]
09d429737b Build: Bump github/codeql-action in the github-actions group
Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5665

Updates `github/codeql-action` from 3.28.16 to 3.28.18
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...ff0a06e83c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.18
  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>
(cherry picked from commit 0ef6020295)
2025-06-02 22:27:21 +02:00
dependabot[bot]
e583c1bba8 Build: Bump undici and release-it
Bumps [undici](https://github.com/nodejs/undici) to 6.21.2 and updates ancestor dependency [release-it](https://github.com/release-it/release-it). These dependencies need to be updated together.

Closes gh-5661

Updates `undici` from 6.21.1 to 6.21.2
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.1...v6.21.2)

Updates `release-it` from 18.1.2 to 19.0.2
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/main/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/18.1.2...19.0.2)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.21.2
  dependency-type: indirect
- dependency-name: release-it
  dependency-version: 19.0.2
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit b668be0fdc)
2025-05-15 18:06:34 +02:00
Michał Gołębiowski-Owczarek
309172f1d0 Tests: Add tests for jQuery.get( String, null-ish, null-ish, String )
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.

Closes gh-5645
Ref gh-5640
Ref gh-4989
Ref jquery/api.jquery.com#1208
2025-05-12 17:51:15 +02:00
dependabot[bot]
25bef695bd 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-5657

Updates `actions/setup-node` from 4.3.0 to 4.4.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](cdca7365b2...49933ea528)

Updates `github/codeql-action` from 3.28.13 to 3.28.16
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b549b9259...28deaeda66)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.28.16
  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>
(cherry picked from commit bd6b453b7e)
2025-05-04 13:23:05 +02:00
Michał Gołębiowski-Owczarek
50d9a8dc7f Core: Formally deprecate push/sort/splice
Since we inlined Sizzle into jQuery, we haven't been actually using these three
methods internally. Therefore, we could add deprecation warnings in Migrate 3.x
for them with jQuery 3.7.0 or newer - both 3.7.0 & 3.7.1 pass all the tests
with them removed (while 3.6.4 does not).

Some basic tests were added as well.

Closes gh-5653
2025-04-14 18:58:46 +02:00
dependabot[bot]
31b8c4290a Build: Bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [actions/setup-node](https://github.com/actions/setup-node), [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5647

Updates `actions/setup-node` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](1d0ff469b7...cdca7365b2)

Updates `actions/cache` from 4.2.2 to 4.2.3
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](d4323d4df1...5a3ec84eff)

Updates `github/codeql-action` from 3.28.10 to 3.28.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b56ba49b26...1b549b9259)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 4.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/cache
  dependency-version: 4.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: 3.28.13
  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>
(cherry picked from commit de2ecfc092)
2025-04-01 11:13:54 +02:00
dependabot[bot]
454d52df6d Build: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5636

Updates `actions/cache` from 4.2.0 to 4.2.2
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](1bd1e32a3b...d4323d4df1)

Updates `github/codeql-action` from 3.28.8 to 3.28.10
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](dd746615b3...b56ba49b26)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
(cherry picked from commit 447432f4a3)
2025-03-02 13:26:25 +01:00
Michał Gołębiowski-Owczarek
3f70fbc762 CSS: Fix dimensions of table <col> elements
Changes:
1. Fix measurements of `<col span="2">` elements in Firefox.
2. Fix measurements of all implicitly sized `<col>` elements in Safari.

Firefox always reports computed width as if `span` was 1. In Safari, computed
width for columns is always 0. Work around both issues by using `offsetWidth`.

In IE/Edge, `<col>` computed width is `"auto"` unless `width` is set explicitly
via CSS so measurements there remain incorrect. Because of the lack of a proper
workaround, we accept this limitation.

Fixes gh-5628
Closes gh-5634
Ref gh-5630
2025-02-24 18:50:39 +01:00
Timmy Willison
6b7d74a1ea Build: upgrade dependencies, including jtr@0.2.5
Closes gh-5632
2025-02-18 13:02:39 -05:00
dependabot[bot]
105dc7ed27 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-5621

Updates `actions/setup-node` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](39370e3970...1d0ff469b7)

Updates `github/codeql-action` from 3.28.1 to 3.28.8
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b6a472f63d...dd746615b3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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>
(cherry picked from commit 667321eb2d)
2025-02-02 13:27:47 +01:00
Michał Gołębiowski-Owczarek
85290c5972 Attributes: Support the until-found value for the hidden attribute
The `hidden` attribute used to be a boolean one but it gained a new
`until-found` eventually. This led us to change the way we handle boolean
attributes in jQuery 4.0 in gh-5452 to avoid these issues in the future.

That said, currently from the attributes we treat as boolean only `hidden`
has gained an extra value, let's support it.

Closes gh-5607
Ref gh-5388
Ref gh-5452
2025-01-16 14:15:37 +01:00
Timmy Willison
9b29b10de0 Tests: migrate test runner to jquery-test-runner
Ref gh-5604
Closes gh-5609
2025-01-14 13:29:25 -05:00
Michał Gołębiowski-Owczarek
4705858f0a Tests: Stop testing on iOS 10
As of January 2025, iOS 10 is a tier 4 device on BrowserStack:
https://www.browserstack.com/device-tiers
That leads to devices with this iOS version often not being available and
failing our tests. Remove it from the test matrix. Also, add comments explaining
the status of tests on various iOS versions, including iOS 7 that we stopped
testing on a long time ago.

Closes gh-5606
2025-01-14 10:26:48 -05:00
dependabot[bot]
2ec6c16a03 Build: Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [actions/cache](https://github.com/actions/cache) and [github/codeql-action](https://github.com/github/codeql-action).

Closes gh-5608

Updates `actions/cache` from 4.1.2 to 4.2.0
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6849a64899...1bd1e32a3b)

Updates `github/codeql-action` from 3.27.5 to 3.28.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f09c1c0a94...b6a472f63d)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
  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>
(cherry picked from commit 098591e6fd)
2025-01-14 11:32:13 +01:00
Michał Gołębiowski-Owczarek
fc874a0e12 Build: Test on iOS 18
Closes gh-5554
Ref gh-5553
2024-12-09 00:36:45 +01:00
Michał Gołębiowski-Owczarek
a697d6596f Build: Bump GitHub Actions
Align actions versions with what the `main` branch uses. Look at `git blame` for
the `main` branch to see more details about specific versions.

Closes gh-5588

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 00:03:45 +01:00
Michał Gołębiowski-Owczarek
015dc50f5b Build: Report Brotli sizes in compareSize
So far, we were mostly optimizing gzipped sizes. However, using Brotli is more
and more popular as all modern browsers support it and compression is much
better. It makes sense to also pay attention to these numbers.

The `comparseSize` version stays at `2` as this only introduces a new field
without affecting existing ones. The only drawback is comparisons with branches
that didnt have Brotli computed before will return `NaN`. This can be easily
fixed locally by checking out the branch and running the build, but at least
we don't lose gzipped sizes in the meantime.

Closes gh-5586

(cherry picked from commit e4b5e62277)
2024-11-25 23:21:59 +01:00
Timmy Willison
bcfdf9a356 Build: Fix pre release matching in compare size regex
Closes gh-5584

(cherry picked from commit 041f6e347b)
2024-11-21 11:22:23 +01:00
Michał Gołębiowski-Owczarek
5eab9df7b6 Selector: Properly deprecate jQuery.expr[ ":" ]/jQuery.expr.filters
Those APIs have formally been deprecated since `3.0.0`, but they never made its
way into the deprecated module.

Closes gh-5570
Ref gh-5580
2024-11-05 23:08:58 +01:00
Michał Gołębiowski-Owczarek
be4f9eccde Build: Make middleware-mockserver not crash on reading nonexistent files
`fs.readFileSync` crashes when a non-existing file is passed to it. Some APIs
of `middleware-mockserver` read a file the path of which depends on query
parameters, making it possible to crash it by providing such a parameter. The
old PHP server doesn't have these issues.

To fix this, wrap all `fs.readFileSync` occurrences with a function that falls
back to the string `"ERROR"`.

Closes gh-5579

(cherry picked from commit d5ebb464de)
2024-11-05 22:59:55 +01:00
Michał Gołębiowski-Owczarek
7dad5cb270 Build: Add a CodeQL non-mandatory check
This is backported from Core at:
1971625487/.github/workflows/codeql-analysis.yml

Closes gh-5575
2024-11-04 19:02:37 +01:00
Michał Gołębiowski-Owczarek
490cc78a87 Build: Run tests on Node 22 & 23
Closes gh-5560

(cherry picked from commit 1971625487)
2024-10-21 19:05:33 +02:00
Michał Gołębiowski-Owczarek
d41f0cd982 Docs: Update CONTRIBUTING.md
Changes:
1. Update the link to "help wanted" or "patch welcome" issues to only include
   open ones.
2. Replace info about the jQuery Forum & IRC with Matrix & Stack Overflow.
3. Update the test reduction WebKit blog post link.
4. Update the Git clone instructions to not rely on the legacy `git://`
   protocol.
5. Fix a few typos.

Closes gh-5564

(cherry picked from commit 4ef25b0de4)
2024-10-14 18:45:20 +02:00
neogy-akash
ce7db4adf0 Build: Enforce ECMAScript 5 in tests via ESLint
Fixes gh-5542
Closes gh-5563

(cherry picked from commit d74fc265de)
2024-10-09 18:27:45 +02:00
Michał Gołębiowski-Owczarek
92a437bed2 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

(cherry picked from commit 559bc5ac58)
2024-09-30 18:54:51 +02:00
ac-mmi
752e9119ab 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>

(cherry picked from commit 3cad5c435a)
2024-09-11 00:27:16 +02:00
Michał Gołębiowski-Owczarek
fb281ca8ca 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

(cherry picked from commit 6d78c0768d)
2024-09-09 18:26:59 +02:00
Michał Gołębiowski-Owczarek
6c7f755452 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. Contrary to what we did in gh-5547, still run tests on Firefox 115 on
   BrowserStack - on `main`, we deleted it since we support only the versions
   supported upstream. In jQuery 3.x, we're testing on all versions matching ESR
   lines starting with Firefox 48, so for consistency let's keep Firefox 115
   there as well.

Closes gh-5548
Ref gh-5547
2024-09-06 18:49:52 +02:00
Timmy Willison
8037b9f53e Tests: align mock.php with main branch (sans spacing diffs)
Ref gh-5531
2024-08-24 10:05:01 -04:00
Timmy Willison
ed18576506 Tests: replace dead links in qunit fixture; use https
Ref gh-5531
2024-08-24 10:05:01 -04:00
Timmy Willison
b4ab47afd7 Tests: replace express with basic Node server
Closes gh-5531
2024-08-24 10:05:01 -04:00
dependabot[bot]
af599d0d63 Build: Bump actions/setup-node from 4.0.2 to 4.0.3
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)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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>

(cherry picked from commit 55bc35bcd4)
2024-08-01 11:08:20 +02:00
Timmy Willison
0b013ca940 Build: upgrade dependencies, including requirejs to 2.3.7 2024-07-29 15:25:14 -04:00
Timmy Willison
fca1c56f15 Build: use --input-type=module in npm scripts
Ref gh-5522
2024-07-29 15:25:14 -04:00
Timmy Willison
2cf659189e 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

*verify*
- use the last modified date of the commit before the tag
- use versioned filenames when checking map files on the CDN
- skip factory and package.json files when verifying CDN

*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
- limit certain workflows to the main repo (not forks)
- version has been set to the previously released version 3.7.1,
  as release-it expects
- 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.
- include post-release script to be run manually after a release,
  with further steps that should be verified manually

Ref jquery/jquery-release#114
Closes gh-5522
2024-07-29 15:25:14 -04:00