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)
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)
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
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)
`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)
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)
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)
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)
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
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
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
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
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
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
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>
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)
`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)
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)
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)
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)
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)
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
*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