diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index 5e992599f89..00000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,4 +0,0 @@
-dist/**/*
-external/**/*
-tests/lib/vendor/**/*
-ui/vendor/**/*
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index e7d67eb0e51..00000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "root": true,
-
- "extends": "jquery",
-
- // Uncomment to find useless comment disable directives
- // "reportUnusedDisableDirectives": true,
-
- "parserOptions": {
- "ecmaVersion": 2018
- },
-
- "env": {
- "es6": true,
- "node": true
- },
-
- "rules": {
- "strict": [ "error", "global" ]
- }
-}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 981b6912b8b..6cbef952226 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -20,7 +20,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
+ uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
@@ -41,7 +41,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
+ uses: github/codeql-action/autobuild@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
# âšī¸ Command-line programs to run using the OS shell.
# đ https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -55,4 +55,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
+ uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
diff --git a/.github/workflows/filestash.yml b/.github/workflows/filestash.yml
index f3944447a82..fd06c31470a 100644
--- a/.github/workflows/filestash.yml
+++ b/.github/workflows/filestash.yml
@@ -13,19 +13,19 @@ jobs:
runs-on: ubuntu-latest
environment: filestash
env:
- NODE_VERSION: 20.x
+ NODE_VERSION: 22.x
name: Update Filestash
steps:
- name: Checkout
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+ uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
index 22116c7dabd..846ae5dc8cd 100644
--- a/.github/workflows/node.js.yml
+++ b/.github/workflows/node.js.yml
@@ -12,34 +12,34 @@ permissions:
contents: read
env:
- NODE_VERSION: 20.x
+ NODE_VERSION: 22.x
jobs:
build-and-test:
runs-on: ubuntu-latest
name: |
- ${{ matrix.BROWSER }} | ${{ matrix.JQUERYS.name }}
+ ${{ matrix.BROWSER }} | ${{ matrix.CONFIGS.name }}
strategy:
fail-fast: false
matrix:
BROWSER: [chrome, firefox]
- JQUERYS:
- - versions: --jquery git --jquery 3.x-git
+ CONFIGS:
+ - config: jtr-git.yml
name: jQuery git
- - versions: --jquery 3.7.1 --jquery 3.6.4 --jquery 2.2.4 --jquery 1.12.4
+ - config: jtr-stable.yml
name: jQuery stable
steps:
- name: Checkout
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+ uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
@@ -49,41 +49,42 @@ jobs:
- name: Install npm dependencies
run: npm install
- - name: Lint
- run: npm run lint
-
- name: Build
run: npm run build
+ # Lint must happen after build as we lint generated files.
+ - name: Lint
+ run: npm run lint
+
- name: Test
run: |
- npm run test:unit -- -h -b ${{ matrix.BROWSER }} \
- ${{ matrix.JQUERYS.versions }} \
- --retries 3 --hard-retries 1
+ npm run test:unit -- \
+ --headless -b ${{ matrix.BROWSER }} \
+ -c ${{ matrix.CONFIGS.config }}
edge:
runs-on: windows-latest
name: |
- edge | ${{ matrix.JQUERYS.name }}
+ edge | ${{ matrix.CONFIGS.name }}
strategy:
fail-fast: false
matrix:
- JQUERYS:
- - versions: --jquery git --jquery 3.x-git
+ CONFIGS:
+ - config: jtr-git.yml
name: jQuery git
- - versions: --jquery 3.7.1 --jquery 3.6.4 --jquery 2.2.4 --jquery 1.12.4
+ - config: jtr-stable.yml
name: jQuery stable
steps:
- name: Checkout
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+ uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
@@ -97,34 +98,31 @@ jobs:
run: npm run build
- name: Test
- run: |
- npm run test:unit -- -h -b edge `
- ${{ matrix.JQUERYS.versions }} `
- --retries 3 --hard-retries 1
+ run: npm run test:unit -- -- --headless -b edge -c ${{ matrix.CONFIGS.config }}
safari:
runs-on: macos-latest
name: |
- safari | ${{ matrix.JQUERYS.name }}
+ safari | ${{ matrix.CONFIGS.name }}
strategy:
fail-fast: false
matrix:
- JQUERYS:
- - versions: --jquery git --jquery 3.x-git
+ CONFIGS:
+ - config: jtr-git.yml
name: jQuery git
- - versions: --jquery 3.7.1 --jquery 3.6.4 --jquery 2.2.4 --jquery 1.12.4
+ - config: jtr-stable.yml
name: jQuery stable
steps:
- name: Checkout
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
+ uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Cache
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
@@ -138,7 +136,4 @@ jobs:
run: npm run build
- name: Test
- run: |
- npm run test:unit -- -b safari \
- ${{ matrix.JQUERYS.versions }} \
- --retries 3 --hard-retries 1
+ run: npm run test:unit -- -b safari -c ${{ matrix.CONFIGS.config }}
diff --git a/Gruntfile.js b/Gruntfile.js
index 334e4bb1ae1..bbb71d33e52 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -51,9 +51,6 @@ const cssFiles = [
// minified files
const minify = {
- options: {
- preserveComments: false
- },
main: {
options: {
banner: createBanner( uiFiles )
@@ -174,7 +171,7 @@ grunt.initConfig( {
}
},
- uglify: minify,
+ minify,
htmllint: {
good: {
options: {
@@ -207,9 +204,12 @@ grunt.initConfig( {
"ui/**/*.js",
"!ui/vendor/**/*.js",
"Gruntfile.js",
+ "dist/jquery-ui.js",
+ "dist/jquery-ui.min.js",
"build/**/*.js",
"tests/unit/**/*.js",
"tests/lib/**/*.js",
+ "!tests/lib/vendor/**/*.js",
"demos/**/*.js"
]
},
@@ -403,9 +403,9 @@ grunt.registerTask( "lint", [
"csslint",
"htmllint"
] );
-grunt.registerTask( "build", [ "requirejs", "concat" ] );
-grunt.registerTask( "default", [ "lint", "build" ] );
-grunt.registerTask( "sizer", [ "requirejs:js", "uglify:main", "compare_size:all" ] );
-grunt.registerTask( "sizer_all", [ "requirejs:js", "uglify", "compare_size" ] );
+grunt.registerTask( "build", [ "requirejs", "concat", "minify:main" ] );
+grunt.registerTask( "default", [ "build", "lint" ] );
+grunt.registerTask( "sizer", [ "requirejs:js", "minify:main", "compare_size:all" ] );
+grunt.registerTask( "sizer_all", [ "requirejs:js", "minify", "compare_size" ] );
};
diff --git a/bower.json b/bower.json
index eec454dea05..eb3187e0c38 100644
--- a/bower.json
+++ b/bower.json
@@ -13,7 +13,7 @@
},
"devDependencies": {
"jquery-color": "3.0.0",
- "jquery-mousewheel": "3.1.12",
+ "jquery-mousewheel": "3.2.2",
"jquery-simulate": "1.1.1",
"qunit": "2.19.4",
"requirejs": "2.1.14",
diff --git a/build/tasks/minify.js b/build/tasks/minify.js
new file mode 100644
index 00000000000..6d83831ee3c
--- /dev/null
+++ b/build/tasks/minify.js
@@ -0,0 +1,53 @@
+"use strict";
+
+const swc = require( "@swc/core" );
+
+module.exports = function( grunt ) {
+
+grunt.registerMultiTask( "minify", async function() {
+ const done = this.async();
+ const options = this.options();
+
+ for ( const file of this.files ) {
+ if ( file.src.length === 0 ) {
+ grunt.log.writeln(
+ `No source file found, skipping minification to "${ file.dest }".` );
+ continue;
+ }
+ if ( file.src.length !== 1 ) {
+ grunt.fail.warn( "Minifying multiple source files into one " +
+ "destination file not supported" );
+ }
+
+ const contents = grunt.file.read( file.src[ 0 ] );
+
+ const { code } = await swc.minify(
+ contents,
+ {
+ compress: {
+ ecma: 5,
+ hoist_funs: false,
+ loops: false
+ },
+ format: {
+ ecma: 5,
+ asciiOnly: true,
+ comments: false,
+ preamble: options.banner
+ },
+ inlineSourcesContent: false,
+ mangle: true,
+ module: false,
+ sourceMap: false
+ }
+ );
+
+ grunt.file.write( file.dest, code );
+
+ grunt.log.writeln( `File ${ file.dest } created.` );
+ }
+
+ done();
+} );
+
+};
diff --git a/demos/.eslintrc.json b/demos/.eslintrc.json
deleted file mode 100644
index 805ec8eb261..00000000000
--- a/demos/.eslintrc.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "root": true,
-
- "extends": "../ui/.eslintrc.json",
-
- "globals": {
- "require": true
- }
-}
diff --git a/demos/effect/easing.html b/demos/effect/easing.html
index 4bee1c41f14..3014f762034 100644
--- a/demos/effect/easing.html
+++ b/demos/effect/easing.html
@@ -26,8 +26,12 @@
height = 100;
$.each( $.easing, function( name, impl ) {
+ // Skip _default property
+ if ( typeof impl !== "function" ) {
+ return;
+ }
var graph = $( "
" ).addClass( "graph" ).appendTo( "#graphs" ),
- text = $( "
" ).text( ++i + ". " + name ).appendTo( graph ),
+ text = $( "
" ).text( name ).css({ fontSize: "13px", textAlign: "center", whiteSpace: "nowrap" }).appendTo( graph ),
wrap = $( "
" ).appendTo( graph ).css( 'overflow', 'hidden' ),
canvas = $( "
+
+