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
`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
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.
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
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-5682
Ref gh-5684
The original test's `text` variant just repeated the previous test with 3
parameters; the goal was to use 4 ones. This fixes it.
Closes gh-5646
Ref gh-5640
Ref gh-5645
Also, fix `mock.php` formatting to not fail the
`jQuery.get( String, null, String )` test in PHP mode.
Closes gh-5640
Ref gh-4989
Ref jquery/api.jquery.com#1208
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.
We haven't added an explicit test for the `"until-found"` value of the
`hidden` attribute which triggered this decision so far, though.
Backport the test from gh-5607 which landed on `3.x-stable` so that we
do test it.
Closes gh-5619
Ref gh-5452
Ref gh-5607
(cherry picked from commit 85290c5972)
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-5630
Ref gh-5634
So far, a result of an event handler has been assigned to the `returnValue`
of the original event by jQuery. Initially, one could pass a message the browser
will then display to the user. Since that got abused a lot, every browser
stopped using the provided string and they all now provide a generic message.
From the browsers supported in v4, only IE 11 would still display the message.
Incidentally, IE 11 is the only browser from our supported ones which respects
the value returned from a beforeunload handler attached by `addEventListener`;
other browsers do so only for inline handlers, so not setting the value directly
shouldn't reduce any functionality.
This looks like a good moment to stop passing the message through and just call
`event.preventDefault()` without extra checks which is shorter. This used to
not work in Chrome but it got implemented in Chrome 119.
Unfortunately, it's hard to test this event in unit tests since it blocks page
dismissal.
Closes gh-5626
Sizzle & the `3.x-stable` branch have tests adding a custom attribute getter
to `attrHandle` and checking if selection takes it into account. `attrHandle`
was removed from the `4.x` line so the tests were not ported to the `main`
branch, but the `4.x` line takes standard jQuery attribute getters into account
instead and we should test for that.
Backport the `3.x-stable` selector tests for custom attribute getters, changing
`jQuery.expr.attrHandle` to `jQuery.attrHooks`.
Closes gh-5568
Using a document created via:
```js
document.implementation.createHTMLDocument( "" )
```
was needed in IE 9 which doesn't support `DOMParser#parseFromString` for
`text/html`. We can switch to:
```js
( new window.DOMParser() ) .parseFromString( "", "text/html" )
```
now, saving some bytes.
Closes gh-5572
The `finalPropName` util caches properties detected to require a vendor
prefix. This used to cache unprefixed properties as well, but it was
reported that this logic broke accidentally during a refactor. Since
fewer & fewer properties require a vendor prefix and caching a few
basic checks likely has negligible perf benefits, opt to saving a few
bytes and remove the cache.
Closes gh-5583
Ref gh-5582
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
`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
Those APIs have formally been deprecated since `3.0.0`, but they never made its
way into the deprecated module.
`jQuery.expr[ ":" ]` has been removed when Sizzle got inlined into Core in
gh-4395; this change restores it.
Closes gh-5580
Ref gh-5570
Ref gh-4395
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
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
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>
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
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