mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
8be4c0e4f8
Summary of the changes: * define the `exports` field in `package.json`; `jQuery` & `$` are also exported as named exports in ESM builds now * declare `"type": "module"` globally except for the `build` folder * add the `--esm` option to `grunt custom`, generating jQuery as an ECMAScript module into the `dist-module` folder * expand `node_smoke_tests` to test the slim & ESM builds and their various combinations; also, test both jQuery loaded via a path to the file as well as from module specifiers that should be parsed via the `exports` feature * add details about ESM usage to the release package README * run `compare_size` on all built minified files; don't run it anymore on unminified files where they don't provide lots of value * remove the remove_map_comment task; SWC doesn't insert the `//# sourceMappingURL=` pragma by default so there's nothing to strip Fixes gh-4592 Closes gh-5255
154 lines
5.3 KiB
JSON
154 lines
5.3 KiB
JSON
{
|
|
"name": "jquery",
|
|
"title": "jQuery",
|
|
"description": "JavaScript library for DOM operations",
|
|
"version": "4.0.0-pre",
|
|
"type": "module",
|
|
"exports": {
|
|
".": {
|
|
"node": {
|
|
"module": "./dist-module/jquery.module.js",
|
|
"import": "./dist-module/jquery.node-module-wrapper.js",
|
|
"require": "./dist/jquery.js"
|
|
},
|
|
"production": "./dist-module/jquery.module.min.js",
|
|
"development": "./dist-module/jquery.module.js",
|
|
"script": "./dist/jquery.min.js",
|
|
"default": "./dist-module/jquery.module.min.js"
|
|
},
|
|
"./slim": {
|
|
"node": {
|
|
"module": "./dist-module/jquery.slim.module.js",
|
|
"import": "./dist-module/jquery.node-module-wrapper.slim.js",
|
|
"require": "./dist/jquery.slim.js"
|
|
},
|
|
"production": "./dist-module/jquery.slim.module.min.js",
|
|
"development": "./dist-module/jquery.slim.module.js",
|
|
"script": "./dist/jquery.slim.min.js",
|
|
"default": "./dist-module/jquery.slim.module.min.js"
|
|
},
|
|
"./src/*.js": "./src/*.js"
|
|
},
|
|
"main": "dist/jquery.js",
|
|
"homepage": "https://jquery.com",
|
|
"author": {
|
|
"name": "OpenJS Foundation and other contributors",
|
|
"url": "https://github.com/jquery/jquery/blob/main/AUTHORS.txt"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/jquery/jquery.git"
|
|
},
|
|
"keywords": [
|
|
"jquery",
|
|
"javascript",
|
|
"browser",
|
|
"library"
|
|
],
|
|
"bugs": {
|
|
"url": "https://github.com/jquery/jquery/issues"
|
|
},
|
|
"license": "MIT",
|
|
"devDependencies": {
|
|
"@babel/core": "7.10.5",
|
|
"@babel/plugin-transform-for-of": "7.10.4",
|
|
"@swc/core": "1.3.66",
|
|
"bootstrap": "5.3.0",
|
|
"colors": "1.4.0",
|
|
"commitplease": "3.2.0",
|
|
"core-js-bundle": "3.6.5",
|
|
"eslint-config-jquery": "3.0.0",
|
|
"eslint-plugin-import": "2.25.2",
|
|
"grunt": "1.5.3",
|
|
"grunt-babel": "8.0.0",
|
|
"grunt-cli": "1.4.3",
|
|
"grunt-compare-size": "0.4.2",
|
|
"grunt-contrib-watch": "1.1.0",
|
|
"grunt-eslint": "24.0.0",
|
|
"grunt-git-authors": "3.2.0",
|
|
"grunt-jsonlint": "2.1.2",
|
|
"grunt-karma": "4.0.2",
|
|
"grunt-newer": "1.3.0",
|
|
"grunt-npmcopy": "0.2.0",
|
|
"gzip-js": "0.3.2",
|
|
"husky": "4.2.5",
|
|
"jsdom": "19.0.0",
|
|
"karma": "6.4.1",
|
|
"karma-browserstack-launcher": "1.6.0",
|
|
"karma-chrome-launcher": "3.1.1",
|
|
"karma-firefox-launcher": "2.1.2",
|
|
"karma-ie-launcher": "1.0.0",
|
|
"karma-jsdom-launcher": "12.0.0",
|
|
"karma-qunit": "4.1.2",
|
|
"karma-webkit-launcher": "2.1.0",
|
|
"load-grunt-tasks": "5.1.0",
|
|
"multiparty": "4.2.3",
|
|
"native-promise-only": "0.8.1",
|
|
"playwright-webkit": "1.30.0",
|
|
"promises-aplus-tests": "2.1.2",
|
|
"q": "1.5.1",
|
|
"qunit": "2.10.1",
|
|
"raw-body": "2.4.1",
|
|
"requirejs": "2.3.6",
|
|
"rimraf": "3.0.2",
|
|
"rollup": "2.21.0",
|
|
"sinon": "7.3.1",
|
|
"strip-json-comments": "3.1.1",
|
|
"testswarm": "1.1.2"
|
|
},
|
|
"scripts": {
|
|
"build": "npm install && npm run build-all-variants",
|
|
"build-all-variants": "grunt custom:slim --esm --filename=jquery.slim.module.js && grunt custom --esm --filename=jquery.module.js && grunt custom:slim --filename=jquery.slim.js && grunt custom",
|
|
"start": "grunt watch",
|
|
"test:browserless": "grunt && npm run test:node_smoke_tests && grunt test:slow",
|
|
"test:browser": "grunt && grunt karma:main",
|
|
"test:esmodules": "grunt && grunt karma:esmodules",
|
|
"test:no-deprecated": "grunt test:prepare && grunt custom:-deprecated && grunt karma:main",
|
|
"test:selector-native": "grunt test:prepare && grunt custom:-selector && grunt karma:main",
|
|
"test:slim": "grunt test:prepare && grunt custom:slim && grunt karma:main",
|
|
"test:node_smoke_tests:full-module": "grunt node_smoke_tests:module:./dist-module/jquery.module.js && grunt node_smoke_tests:module:jquery",
|
|
"test:node_smoke_tests:full-commonjs": "grunt node_smoke_tests:commonjs:./dist/jquery.js && grunt node_smoke_tests:commonjs:jquery",
|
|
"test:node_smoke_tests:slim-module": "grunt node_smoke_tests:module:./dist-module/jquery.slim.module.js && grunt node_smoke_tests:module:jquery/slim",
|
|
"test:node_smoke_tests:slim-commonjs": "grunt node_smoke_tests:commonjs:./dist/jquery.slim.js && grunt node_smoke_tests:commonjs:jquery/slim",
|
|
"test:node_smoke_tests": "npm run test:node_smoke_tests:full-module && npm run test:node_smoke_tests:slim-module && npm run test:node_smoke_tests:full-commonjs && npm run test:node_smoke_tests:slim-commonjs",
|
|
"test": "npm run test:browserless && npm run test:slim && npm run test:no-deprecated && npm run test:selector-native && grunt && grunt test:slow && grunt karma:main && grunt karma:esmodules",
|
|
"jenkins": "npm run test:browserless"
|
|
},
|
|
"commitplease": {
|
|
"nohook": true,
|
|
"components": [
|
|
"Docs",
|
|
"Tests",
|
|
"Build",
|
|
"Support",
|
|
"Release",
|
|
"Core",
|
|
"Ajax",
|
|
"Attributes",
|
|
"Callbacks",
|
|
"CSS",
|
|
"Data",
|
|
"Deferred",
|
|
"Deprecated",
|
|
"Dimensions",
|
|
"Effects",
|
|
"Event",
|
|
"Manipulation",
|
|
"Offset",
|
|
"Queue",
|
|
"Selector",
|
|
"Serialize",
|
|
"Traversing",
|
|
"Wrap"
|
|
],
|
|
"markerPattern": "^((clos|fix|resolv)(e[sd]|ing))|^(refs?)",
|
|
"ticketPattern": "^((Closes|Fixes) ([a-zA-Z]{2,}-)[0-9]+)|^(Refs? [^#])"
|
|
},
|
|
"husky": {
|
|
"hooks": {
|
|
"commit-msg": "commitplease .git/COMMIT_EDITMSG",
|
|
"pre-commit": "grunt lint:newer qunit_fixture"
|
|
}
|
|
}
|
|
}
|