Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Remove support for jQuery 4.x #554

Open
wants to merge 7 commits into
base: 3.x-stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- main
- 3.x-stable

env:
NODE_VERSION: 20.x
Expand Down Expand Up @@ -47,11 +47,12 @@ jobs:
npm run pretest
npm run test:unit -- -b ${{ matrix.BROWSER }} -h \
--jquery-migrate ${{ matrix.MIGRATE_VERSION }} \
--jquery git --jquery git.min --jquery git.slim --jquery git.slim.min \
--jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min \
--jquery 3.7.1 --jquery 3.7.1.slim \
--jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 \
--jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 \
--jquery 3.3.1 --jquery 3.2.1 \
--jquery 3.1.1 --jquery 3.1.1.slim \
--jquery 3.0.0 \
--retries 1

ie:
Expand Down Expand Up @@ -84,11 +85,12 @@ jobs:
run: |
npm run test:ie -- ^
--jquery-migrate ${{ env.MIGRATE_VERSION }} ^
--jquery git --jquery git.min --jquery git.slim --jquery git.slim.min ^
--jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min ^
--jquery 3.7.1 --jquery 3.7.1.slim ^
--jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 ^
--jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 ^
--jquery 3.3.1 --jquery 3.2.1 ^
--jquery 3.1.1 --jquery 3.1.1.slim ^
--jquery 3.0.0 ^
--retries 1

safari:
Expand Down Expand Up @@ -120,9 +122,10 @@ jobs:
run: |
npm run test:safari -- \
--jquery-migrate ${{ env.MIGRATE_VERSION }} \
--jquery git --jquery git.min --jquery git.slim --jquery git.slim.min \
--jquery 3.x-git --jquery 3.x-git.min --jquery 3.x-git.slim --jquery 3.x-git.slim.min \
--jquery 3.7.1 --jquery 3.7.1.slim \
--jquery 3.6.4 --jquery 3.5.1 --jquery 3.4.1 \
--jquery 3.3.1 --jquery 3.2.1 --jquery 3.1.1 --jquery 3.0.0 \
--jquery 3.3.1 --jquery 3.2.1 \
--jquery 3.1.1 --jquery 3.1.1.slim \
--jquery 3.0.0 \
--retries 1
71 changes: 0 additions & 71 deletions .github/workflows/browserstack-git.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Browserstack (Core 3.x)
name: Browserstack

on:
push:
branches:
- main
- 3.x-stable
# Once a week every Tuesday
schedule:
- cron: "12 2 * * 2"
Expand Down Expand Up @@ -51,9 +51,19 @@ jobs:
- '__iOS_13'
- '__iOS_12'
- '__iOS_11'
- '__iOS_10'

# iOS 10 is a tier 4 device as of January 2025 and its availability
# is poor, leading to frequent test timeouts. Skip testing on it.
# See https://www.browserstack.com/device-tiers
# - '__iOS_10'

# Versions below are not officially supported by BrowserStack as
# they use emulators instead of real devices. We include them as
# long as they still work.
- '__iOS_9'
- '__iOS_8'
# iOS 7 emulators no longer work properly
# - '__iOS_7'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/filestash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Filestash
on:
push:
branches:
- main
- 3.x-stable

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down Expand Up @@ -47,5 +47,5 @@ jobs:

- name: Upload to Filestash
run: |
rsync dist/jquery-migrate.js filestash@"${{ secrets.FILESTASH_SERVER }}":jquery-migrate-git.js
rsync dist/jquery-migrate.min.js filestash@"${{ secrets.FILESTASH_SERVER }}":jquery-migrate-git.min.js
rsync dist/jquery-migrate.js filestash@"${{ secrets.FILESTASH_SERVER }}":jquery-migrate-3.x-git.js
rsync dist/jquery-migrate.min.js filestash@"${{ secrets.FILESTASH_SERVER }}":jquery-migrate-3.x-git.min.js
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Make sure you have reproduced the bug with all browser extensions and add-ons di

### Try the latest version of jQuery Migrate

Bugs in old versions of jQuery Migrate may have already been fixed. In order to avoid reporting known issues, make sure you are always testing against the [latest build](https://releases.jquery.com/git/jquery-migrate-git.js). We cannot fix bugs in older released files, if a bug has been fixed in a subsequent version of jQuery Migrate the site should upgrade.
Bugs in old versions of jQuery Migrate may have already been fixed. In order to avoid reporting known issues, make sure you are always testing against the [latest build](https://releases.jquery.com/git/jquery-migrate-3.x-git.js). We cannot fix bugs in older released files, if a bug has been fixed in a subsequent version of jQuery Migrate the site should upgrade.

### Simplify the test case

Expand Down Expand Up @@ -78,16 +78,16 @@ Change directory to the newly created dir `jquery-migrate/`:
$ cd jquery-migrate
```

Add the jQuery Migrate `main` as a remote (e.g. `upstream`):
Add the jQuery Migrate `3.x-stable` as a remote (e.g. `upstream`):

```bash
$ git remote add upstream [email protected]:jquery/jquery-migrate.git
```

Get in the habit of pulling in the "upstream" main to stay up to date as jQuery Migrate receives new commits:
Get in the habit of pulling in the "upstream" `3.x-stable` to stay up to date as jQuery Migrate receives new commits:

```bash
$ git pull upstream main
$ git pull upstream 3.x-stable
```

Install the necessary dependencies:
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![CI Status](https://github.com/jquery/jquery-migrate/actions/workflows/node.js.yml/badge.svg?branch=main)
![CI Status](https://github.com/jquery/jquery-migrate/actions/workflows/node.js.yml/badge.svg?branch=3.x-stable)

#### NOTE: To upgrade to jQuery 3.0, you first need version 1.12.x or 2.2.x. If you're using an older version, first upgrade to one of these versions using [jQuery Migrate 1.x](https://github.com/jquery/jquery-migrate/tree/1.x-stable#readme), to resolve any compatibility issues. For more information about the changes made in jQuery 3.0, see the [upgrade guide](https://jquery.com/upgrade-guide/3.0/) and [blog post](https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/).

Expand All @@ -11,14 +11,14 @@ That way you can spot and fix what otherwise would have been errors, until you n

The following table indicates which jQuery Migrate versions can be used with which jQuery versions:

| jQuery version | jQuery Migrate version |
|----------------|-------------------------|
| 1.x | 1.x |
| 2.x | 1.x |
| 3.x | 3.x / 4.x<sup>[1]</sup> |
| 4.x | 3.x / 4.x<sup>[1]</sup> |
| jQuery version | jQuery Migrate version |
|----------------|------------------------|
| 1.x | 1.x |
| 2.x | 1.x |
| 3.x | 3.x |
| 4.x | 4.x |

[1] NOTE: jQuery Migrate 4.x only supports the same browser as jQuery 4.x does. If you need to support Edge Legacy, Internet Explorer 9-10 or iOS 7+ (and not just 3 latest versions), use jQuery Migrate 3.x.
Each jQuery Migrate version supports the same browsers that the jQuery version used with it.

## Usage

Expand All @@ -40,7 +40,7 @@ The production build is minified and does not generate console warnings. It will
| Debugging enabled | <p align="center">✓</p> | |
| Minified | | <p align="center">✓</p> |
| Latest release (*may be hotlinked if desired*) | [jquery-migrate-3.5.2.js](https://code.jquery.com/jquery-migrate-3.5.2.js) | [jquery-migrate-3.5.2.min.js](https://code.jquery.com/jquery-migrate-3.5.2.min.js) |
| \* Latest work-in-progress build | [jquery-migrate-git.js](https://releases.jquery.com/git/jquery-migrate-git.js) | [jquery-migrate-git.min.js](https://releases.jquery.com/git/jquery-migrate-git.min.js) |
| \* Latest work-in-progress build | [jquery-migrate-3.x-git.js](https://releases.jquery.com/git/jquery-migrate-3.x-git.js) | [jquery-migrate-3.x-git.min.js](https://releases.jquery.com/git/jquery-migrate-3.x-git.min.js) |


\* **Work-in-progress build:** Although this file represents the most recent updates to the plugin, it may not have been thoroughly tested. We do not recommend using this file on production sites since it may be unstable; use the released production version instead.
Expand All @@ -50,7 +50,7 @@ The production build is minified and does not generate console warnings. It will

The development version of the plugin displays warnings in the browser console. Older browsers such as IE9 doesn't support the console interface. No messages will be generated unless you include a debugging library such as [Firebug Lite](https://getfirebug.com/firebuglite) before including the jQuery Migrate plugin. Developers can also inspect the `jQuery.migrateWarnings` array to see what error messages have been generated.

All warnings generated by this plugin start with the string "JQMIGRATE". A list of the warnings you may see are in [warnings.md](https://github.com/jquery/jquery-migrate/blob/main/warnings.md).
All warnings generated by this plugin start with the string "JQMIGRATE". A list of the warnings you may see are in [warnings.md](https://github.com/jquery/jquery-migrate/blob/3.x-stable/warnings.md).


## Migrate Plugin API
Expand All @@ -69,7 +69,7 @@ This plugin adds some properties to the `jQuery` object that can be used to prog

`jQuery.migrateDeduplicateWarnings`: By default, Migrate only gives a specific warning once. If you set this property to `false` it will give a warning for every occurrence each time it happens. Note that this can generate a lot of output, for example when a warning occurs in a loop.

`jQuery.migrateDisablePatches`: Disables patches by their codes. You can find a code for each patch in square brackets in [warnings.md](https://github.com/jquery/jquery-migrate/blob/main/warnings.md). A limited number of warnings doesn't have codes defined and cannot be disabled. These are mostly setup issues like using an incorrect version of jQuery or loading Migrate multiple times.
`jQuery.migrateDisablePatches`: Disables patches by their codes. You can find a code for each patch in square brackets in [warnings.md](https://github.com/jquery/jquery-migrate/blob/3.x-stable/warnings.md). A limited number of warnings doesn't have codes defined and cannot be disabled. These are mostly setup issues like using an incorrect version of jQuery or loading Migrate multiple times.

`jQuery.migrateDisablePatches`: Disables patches by their codes.

Expand Down
6 changes: 3 additions & 3 deletions build/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var releaseVersion,
prompt = enquirer.prompt,

repoURL = "[email protected]:jquery/jquery-migrate.git",
branch = "main",
branch = "3.x-stable",

// Windows needs the .cmd version but will find the non-.cmd
// On Windows, also ensure the HOME environment variable is set
Expand Down Expand Up @@ -211,7 +211,7 @@ async function publishToNPM( next ) {

function setNextVersion( next ) {
updateSourceVersion( nextVersion );
updatePackageVersion( nextVersion, "main" );
updatePackageVersion( nextVersion, "3.x-stable" );
git( [ "commit", "-a", "--no-verify", "-m", "Updating the source version to " + nextVersion ],
next );
}
Expand Down Expand Up @@ -281,7 +281,7 @@ function updateReadmeVersion() {
}

function setBlobVersion( s, v ) {
return s.replace( /\/blob\/(?:(\d+\.\d+[^\/]+)|main)/, "/blob/" + v );
return s.replace( /\/blob\/(?:(\d+\.\d+[^\/]+)|3.x-stable)/, "/blob/" + v );
}

function writeJsonSync( fname, json ) {
Expand Down
Loading
Loading