jQuery 4.1.0 发布 3.x 分支转入仅关键修复

原标题:jQuery 4.1.0
38AI 研判分

jQuery 团队发布 4.1.0 版本,延续 4.x 主线并新增 ESM 模块化构建产物(dist-module/ 目录导出 jQuery 与 $ 具名导出)。同时官方明确 3.x 分支仅接收关键修复,2.x 与 1.x 已完全停止支持,并推荐用户升级至最新版本。

关联知识实体

报道正文

本文目录7 个章节

jQuery — New Wave JavaScript

Meetings are currently held on the matrix.org platform.

Meeting minutes can be found at meetings.jquery.org.

The latest version of jQuery is available at https://jquery.com/download/.

Version support

VersionBranchSupport
4.xmainFull
3.x3.x-stableCritical-only
2.x2.x-stableNone
1.x1.x-stableNone

jQuery 4.0.0 has been released!

The 3.x branch will now only receive critical updates. The 2.x and 1.x branches are no longer supported. We recommend that all users upgrade to the latest version of jQuery to ensure that they have the best performance, security, and features.

Commercial support for previous versions is available from HeroDevs or TuxCare.

Learn more about our version support.

Contribution Guides

In the spirit of open source software development, jQuery always encourages community code contribution. To help you get started and before you jump into writing code, be sure to read these important contribution guidelines thoroughly:

  1. Getting Involved
  2. Core Style Guide
  3. Writing Code for jQuery Projects

References to issues/PRs

GitHub issues/PRs are usually referenced via gh-NUMBER, where NUMBER is the numerical ID of the issue/PR. You can find such an issue/PR under https://github.com/jquery/jquery/issues/NUMBER.

jQuery has used a different bug tracker - based on Trac - in the past, available under bugs.jquery.com. It is being kept in read only mode so that referring to past discussions is possible. When jQuery source references one of those issues, it uses the pattern trac-NUMBER, where NUMBER is the numerical ID of the issue. You can find such an issue under https://bugs.jquery.com/ticket/NUMBER.

Environments in which to use jQuery

  • Browser support
  • jQuery also supports Node, browser extensions, and other non-browser environments.

What you need to build your own jQuery

To build jQuery, you need to have the latest Node.js/npm and git 1.7 or later. Earlier versions might work, but are not supported.

For Windows, you have to download and install git and Node.js.

macOS users should install Homebrew. Once Homebrew is installed, run brew install git to install git, and brew install node to install Node.js.

Linux/BSD users should use their appropriate package managers to install git and Node.js, or build from source if you swing that way. Easy-peasy.

How to build your own jQuery

First, clone the jQuery git repo.

Then, enter the jquery directory, install dependencies, and run the build script:

BASH
cd jquery
npm install
npm run build

The built version of jQuery will be placed in the dist/ directory, along with a minified copy and associated map file.

Build all jQuery release files

To build all variants of jQuery, run the following command:

BASH
npm run build:all

This will create all of the variants that jQuery includes in a release, including jquery.js, jquery.slim.js, jquery.module.js, and jquery.slim.module.js along their associated minified files and sourcemaps.

jquery.module.js and jquery.slim.module.js are ECMAScript modules that export jQuery and $ as named exports are placed in the dist-module/ directory rather than the dist/ directory.

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)