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: Drop support for old jQuery or old browsers #2249

Merged
merged 9 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,31 +133,3 @@ jobs:

- name: Test
run: npm run test:unit -- -b safari --jquery ${{ matrix.JQUERY }} --retries 3

legacy-build:
runs-on: ubuntu-latest
name: Build on Node 10.x
env:
NODE_VERSION: 10.x
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}

- name: Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-

- name: Install npm dependencies
run: npm install

- name: Build
run: npm run build
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The tests require a local web server and the samples contain some PHP, so a PHP
* Windows: [WAMP download](https://www.wampserver.com/en/)
* Mac: [MAMP download](https://www.mamp.info/en/mac/)
* Linux: [Setting up LAMP](https://www.linux.com/learn/tutorials/288158-easy-lamp-server-installation)
* [Mongoose (most platforms)](https://code.google.com/archive/p/mongoose/)
* [Mongoose (most platforms)](https://mongoose.ws/)
* [http-server](https://www.npmjs.com/package/http-server)

### Running the Tests
Expand Down
114 changes: 4 additions & 110 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = function( grunt ) {

// files
const coreFiles = [
"core.js",
"widget.js",
"widgets/mouse.js",
"widgets/draggable.js",
Expand Down Expand Up @@ -85,15 +84,6 @@ const htmllintBad = [
"tests/unit/tabs/data/test.html"
];

const nodeV16OrNewer = !/^v1[0-5]\./.test( process.version );

// Support: Node.js <16
// Skip running tasks that dropped support for Node.js 10-15
// in this Node version.
function runIfNewNode( task ) {
return nodeV16OrNewer ? task : "print_old_node_message:" + task;
}

function mapMinFile( file ) {
return "dist/" + file.replace( /ui\//, "minified/" );
}
Expand Down Expand Up @@ -167,7 +157,7 @@ grunt.initConfig( {
findNestedDependencies: true,
skipModuleInsertion: true,
exclude: [ "jquery" ],
include: expandFiles( [ "ui/**/*.js", "!ui/core.js", "!ui/i18n/*" ] ),
include: expandFiles( [ "ui/**/*.js", "!ui/i18n/*" ] ),
out: "dist/jquery-ui.js",
wrap: {
start: createBanner( uiFiles )
Expand Down Expand Up @@ -258,99 +248,9 @@ grunt.initConfig( {
"jquery/jquery.js": "jquery-3.x/dist/jquery.js",
"jquery/LICENSE.txt": "jquery-3.x/LICENSE.txt",

"jquery-1.8.0/jquery.js": "jquery-1.8.0/jquery.js",
"jquery-1.8.0/MIT-LICENSE.txt": "jquery-1.8.0/MIT-LICENSE.txt",

"jquery-1.8.1/jquery.js": "jquery-1.8.1/jquery.js",
"jquery-1.8.1/MIT-LICENSE.txt": "jquery-1.8.1/MIT-LICENSE.txt",

"jquery-1.8.2/jquery.js": "jquery-1.8.2/jquery.js",
"jquery-1.8.2/MIT-LICENSE.txt": "jquery-1.8.2/MIT-LICENSE.txt",

"jquery-1.8.3/jquery.js": "jquery-1.8.3/jquery.js",
"jquery-1.8.3/MIT-LICENSE.txt": "jquery-1.8.3/MIT-LICENSE.txt",

"jquery-1.9.0/jquery.js": "jquery-1.9.0/jquery.js",
"jquery-1.9.0/MIT-LICENSE.txt": "jquery-1.9.0/MIT-LICENSE.txt",

"jquery-1.9.1/jquery.js": "jquery-1.9.1/jquery.js",
"jquery-1.9.1/MIT-LICENSE.txt": "jquery-1.9.1/MIT-LICENSE.txt",

"jquery-1.10.0/jquery.js": "jquery-1.10.0/jquery.js",
"jquery-1.10.0/MIT-LICENSE.txt": "jquery-1.10.0/MIT-LICENSE.txt",

"jquery-1.10.1/jquery.js": "jquery-1.10.1/jquery.js",
"jquery-1.10.1/MIT-LICENSE.txt": "jquery-1.10.1/MIT-LICENSE.txt",

"jquery-1.10.2/jquery.js": "jquery-1.10.2/jquery.js",
"jquery-1.10.2/MIT-LICENSE.txt": "jquery-1.10.2/MIT-LICENSE.txt",

"jquery-1.11.0/jquery.js": "jquery-1.11.0/dist/jquery.js",
"jquery-1.11.0/MIT-LICENSE.txt": "jquery-1.11.0/MIT-LICENSE.txt",

"jquery-1.11.1/jquery.js": "jquery-1.11.1/dist/jquery.js",
"jquery-1.11.1/MIT-LICENSE.txt": "jquery-1.11.1/MIT-LICENSE.txt",

"jquery-1.11.2/jquery.js": "jquery-1.11.2/dist/jquery.js",
"jquery-1.11.2/MIT-LICENSE.txt": "jquery-1.11.2/MIT-LICENSE.txt",

"jquery-1.11.3/jquery.js": "jquery-1.11.3/dist/jquery.js",
"jquery-1.11.3/MIT-LICENSE.txt": "jquery-1.11.3/MIT-LICENSE.txt",

"jquery-1.12.0/jquery.js": "jquery-1.12.0/dist/jquery.js",
"jquery-1.12.0/LICENSE.txt": "jquery-1.12.0/LICENSE.txt",

"jquery-1.12.1/jquery.js": "jquery-1.12.1/dist/jquery.js",
"jquery-1.12.1/LICENSE.txt": "jquery-1.12.1/LICENSE.txt",

"jquery-1.12.2/jquery.js": "jquery-1.12.2/dist/jquery.js",
"jquery-1.12.2/LICENSE.txt": "jquery-1.12.2/LICENSE.txt",

"jquery-1.12.3/jquery.js": "jquery-1.12.3/dist/jquery.js",
"jquery-1.12.3/LICENSE.txt": "jquery-1.12.3/LICENSE.txt",

"jquery-1.12.4/jquery.js": "jquery-1.12.4/dist/jquery.js",
"jquery-1.12.4/LICENSE.txt": "jquery-1.12.4/LICENSE.txt",

"jquery-2.0.0/jquery.js": "jquery-2.0.0/jquery.js",
"jquery-2.0.0/MIT-LICENSE.txt": "jquery-2.0.0/MIT-LICENSE.txt",

"jquery-2.0.1/jquery.js": "jquery-2.0.1/jquery.js",
"jquery-2.0.1/MIT-LICENSE.txt": "jquery-2.0.1/MIT-LICENSE.txt",

"jquery-2.0.2/jquery.js": "jquery-2.0.2/jquery.js",
"jquery-2.0.2/MIT-LICENSE.txt": "jquery-2.0.2/MIT-LICENSE.txt",

"jquery-2.0.3/jquery.js": "jquery-2.0.3/jquery.js",
"jquery-2.0.3/MIT-LICENSE.txt": "jquery-2.0.3/MIT-LICENSE.txt",

"jquery-2.1.0/jquery.js": "jquery-2.1.0/dist/jquery.js",
"jquery-2.1.0/MIT-LICENSE.txt": "jquery-2.1.0/MIT-LICENSE.txt",

"jquery-2.1.1/jquery.js": "jquery-2.1.1/dist/jquery.js",
"jquery-2.1.1/MIT-LICENSE.txt": "jquery-2.1.1/MIT-LICENSE.txt",

"jquery-2.1.2/jquery.js": "jquery-2.1.2/dist/jquery.js",
"jquery-2.1.2/MIT-LICENSE.txt": "jquery-2.1.2/MIT-LICENSE.txt",

"jquery-2.1.3/jquery.js": "jquery-2.1.3/dist/jquery.js",
"jquery-2.1.3/MIT-LICENSE.txt": "jquery-2.1.3/MIT-LICENSE.txt",

"jquery-2.1.4/jquery.js": "jquery-2.1.4/dist/jquery.js",
"jquery-2.1.4/MIT-LICENSE.txt": "jquery-2.1.4/MIT-LICENSE.txt",

"jquery-2.2.0/jquery.js": "jquery-2.2.0/dist/jquery.js",
"jquery-2.2.0/LICENSE.txt": "jquery-2.2.0/LICENSE.txt",

"jquery-2.2.1/jquery.js": "jquery-2.2.1/dist/jquery.js",
"jquery-2.2.1/LICENSE.txt": "jquery-2.2.1/LICENSE.txt",

"jquery-2.2.2/jquery.js": "jquery-2.2.2/dist/jquery.js",
"jquery-2.2.2/LICENSE.txt": "jquery-2.2.2/LICENSE.txt",

"jquery-2.2.3/jquery.js": "jquery-2.2.3/dist/jquery.js",
"jquery-2.2.3/LICENSE.txt": "jquery-2.2.3/LICENSE.txt",

"jquery-2.2.4/jquery.js": "jquery-2.2.4/dist/jquery.js",
"jquery-2.2.4/LICENSE.txt": "jquery-2.2.4/LICENSE.txt",

Expand Down Expand Up @@ -448,13 +348,7 @@ grunt.initConfig( {
} );

// grunt plugins
require( "load-grunt-tasks" )( grunt, {
pattern: nodeV16OrNewer ? [ "grunt-*" ] : [
"grunt-*",
"!grunt-eslint",
"!grunt-html"
]
} );
require( "load-grunt-tasks" )( grunt );

// local tasks
grunt.loadTasks( "build/tasks" );
Expand Down Expand Up @@ -497,9 +391,9 @@ grunt.registerTask( "print_old_node_message", ( ...args ) => {
// Keep this task list in sync with the testing steps in our GitHub action test workflow file!
grunt.registerTask( "lint", [
"asciilint",
runIfNewNode( "eslint" ),
"eslint",
"csslint",
runIfNewNode( "htmllint" )
"htmllint"
] );
grunt.registerTask( "build", [ "requirejs", "concat" ] );
grunt.registerTask( "default", [ "lint", "build" ] );
Expand Down
30 changes: 0 additions & 30 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,8 @@
"jquery-simulate": "1.1.1",
"qunit": "2.19.4",
"requirejs": "2.1.14",
"jquery-1.8.0": "jquery#1.8.0",
"jquery-1.8.1": "jquery#1.8.1",
"jquery-1.8.2": "jquery#1.8.2",
"jquery-1.8.3": "jquery#1.8.3",
"jquery-1.9.0": "jquery#1.9.0",
"jquery-1.9.1": "jquery#1.9.1",
"jquery-1.10.0": "jquery#1.10.0",
"jquery-1.10.1": "jquery#1.10.1",
"jquery-1.10.2": "jquery#1.10.2",
"jquery-1.11.0": "jquery#1.11.0",
"jquery-1.11.1": "jquery#1.11.1",
"jquery-1.11.2": "jquery#1.11.2",
"jquery-1.11.3": "jquery#1.11.3",
"jquery-1.12.0": "jquery#1.12.0",
"jquery-1.12.1": "jquery#1.12.1",
"jquery-1.12.2": "jquery#1.12.2",
"jquery-1.12.3": "jquery#1.12.3",
"jquery-1.12.4": "jquery#1.12.4",
"jquery-3.x": "jquery#3.7.1",
"jquery-2.0.0": "jquery#2.0.0",
"jquery-2.0.1": "jquery#2.0.1",
"jquery-2.0.2": "jquery#2.0.2",
"jquery-2.0.3": "jquery#2.0.3",
"jquery-2.1.0": "jquery#2.1.0",
"jquery-2.1.1": "jquery#2.1.1",
"jquery-2.1.2": "jquery#2.1.2",
"jquery-2.1.3": "jquery#2.1.3",
"jquery-2.1.4": "jquery#2.1.4",
"jquery-2.2.0": "jquery#2.2.0",
"jquery-2.2.1": "jquery#2.2.1",
"jquery-2.2.2": "jquery#2.2.2",
"jquery-2.2.3": "jquery#2.2.3",
"jquery-2.2.4": "jquery#2.2.4",
"jquery-3.0.0": "jquery#3.0.0",
"jquery-3.1.0": "jquery#3.1.0",
Expand Down
1 change: 1 addition & 0 deletions build/tasks/testswarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var versions = {
"Droppable": "droppable/droppable.html",
"Effects": "effects/effects.html",
"Form Reset Mixin": "form-reset-mixin/form-reset-mixin.html",
"jQuery Patch": "jquery-patch/jquery-patch.html",
"Menu": "menu/menu.html",
"Position": "position/position.html",
"Progressbar": "progressbar/progressbar.html",
Expand Down
1 change: 0 additions & 1 deletion build/themes

This file was deleted.

6 changes: 0 additions & 6 deletions demos/autocomplete/maxheight.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
/* IE 6 doesn't support max-height
* we use height instead, but this forces the menu to always be this tall
*/
* html .ui-autocomplete {
height: 100px;
}
</style>
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
Expand Down
4 changes: 1 addition & 3 deletions demos/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
( function() {
"use strict";

// Find the script element
var scripts = document.getElementsByTagName( "script" );
var script = scripts[ scripts.length - 1 ];
var script = document.currentScript;

// Read the modules
var modules = script.getAttribute( "data-modules" );
Expand Down
5 changes: 0 additions & 5 deletions demos/slider/multiple-vertical.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Slider - Multiple sliders</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<script src="../../external/jquery/jquery.js"></script>
<script src="../../ui/core.js"></script>
<script src="../../ui/widget.js"></script>
<script src="../../ui/mouse.js"></script>
<script src="../../ui/slider.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't this need to load JS anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does still load JS. This was the old way of doing it that also included loading the deprecated core.js file that this PR removes.

This template actually used both ways of loading JS; it looks like a migration oversight. I checked that the demo still works fine after these removals.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

<link rel="stylesheet" href="../demos.css">
<style>
#eq > span {
Expand Down
2 changes: 0 additions & 2 deletions demos/tooltip/custom-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
width: 25px;
height: 25px;
box-shadow: 6px 5px 9px -9px black;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.arrow.top:after {
Expand Down
21 changes: 0 additions & 21 deletions external/jquery-1.10.0/MIT-LICENSE.txt

This file was deleted.