aboutsummaryrefslogtreecommitdiffstats
path: root/build
Commit message (Collapse)AuthorAgeFilesLines
* Build: Auto-convert sources to AMDMichał Gołębiowski-Owczarek2019-12-093-5/+54
| | | | | | | | | | | | | | | jQuery source has been migrated in gh-4541 from AMD to ES modules. To maintain support for consumers of our AMD modules, this commits adds a task transpiling the ES modules sources in `src/` to AMD in `amd/`. A "Load with AMD" checkbox was also restored to the QUnit setup. Note that, contrary to jQuery 3.x, AMD files need to be generated via `grunt amd` or `grunt` as sources are not authored in ECMAScript modules. To achieve a similar no-compile experience during jQuery 4.x testing, use the new "Load as modules" checkbox which works in all supported browsers except for IE & Edge (the legacy, EdgeHTML-based one). Ref gh-4541 Closes gh-4554
* Build: Fix the Windows buildMichał Gołębiowski-Owczarek2019-12-022-17/+51
| | | | | | | This commit gets rid of rollup-plugin-hypothetical in favor of a simpler inline Rollup plugin that fits our need and is compatible with Windows. Fixes gh-4548 Closes gh-4549
* Core: Migrate from AMD to ES modules 🎉Michał Gołębiowski-Owczarek2019-11-181-207/+174
| | | | | | | | | | | | | | | | | | | | | | Migrate all source AMD modules to ECMAScript modules. The final bundle is compiled by a custom build process that uses Rollup under the hood. Test files themselves are still loaded via RequireJS as that has to work in IE 11. Tests can now be run in "Load as modules" mode which replaces the previous "Load with AMD" option. That option of running tests doesn't work in IE and Edge as it requires support for dynamic imports. Some of the changes required by the migration: * check `typeof` of `noGlobal` instead of using the variable directly as it's not available when modules are used * change the nonce module to be an object as ECMASscript module exports are immutable * remove some unused exports * import `./core/parseHTML.js` directly in `jquery.js` so that it's not being cut out when the `ajax` module is excluded in a custom compilation Closes gh-4541
* Build: Require strict mode in Node.js scripts via ESLintMichał Gołębiowski-Owczarek2019-10-099-12/+18
| | | | | | | | So far, only browser-based JS files were required to be in strict mode (in the function form). This commit adds such a requirement to Node.js scripts where the global form is preferred. All Node.js scripts in sloppy mode were converted to strict mode. Closes gh-4499
* Build: Support jquery-release --dry-run flagMichał Gołębiowski-Owczarek2019-10-051-1/+2
| | | | | | | Without this change passing `--dry-run` to jquery-release still pushes to the jquery-dist repository which is dangerous as one can assume `--dry-run` to be safe from external side effects. Close gh-4498
* Build: Stop copying src/core.js to dist on releaseMichał Gołębiowski-Owczarek2019-10-041-4/+7
| | | | | | | | File `src/core.js` has started erroneously being copied to `dist/` in gh-2981. Fixes gh-4489 Closes gh-4492 Ref gh-2979 Ref gh-2981
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-294-85/+0
| | | | | | | | | | | | | | | | | | This commit removes Sizzle from jQuery, inlining its code & removing obsolete workarounds where applicable. The selector-native module has been removed. Further work on the selector module may decrease the size enough that it will no longer be necessary. If it turns out it's still useful, we'll reinstate it but the code will look different anyway as we'll want to share as much code as possible with the existing selector module. The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are sorted by their first contributions to either of the two repositories. The commit reduces the gzipped jQuery size by 1460 bytes compared to master. Closes gh-4395
* Build: ESLint: forbid unused function parametersMichał Gołębiowski-Owczarek2019-05-131-1/+1
| | | | | | | | | | | | | This commit requires all function parameters to be used, not just the last one. In cases where that's not possible as we need to match an external API, there's an escape hatch of prefixing an unused argument with `_`. This change makes it easier to catch unused AMD dependencies and unused parameters in internal functions the API of which we may change at will, among other things. Unused AMD dependencies have been removed as part of this commit. Closes gh-4381
* Build: Fix the regex parsing AMD var-modules (#4389)Michał Gołębiowski-Owczarek2019-05-131-1/+1
| | | | | | | | | | | | | | | | The previous regex caused the final jQuery binary to have syntax errors for var-modules with names starting with "return". For example, the following module wouldn't work when the file is named `returnTrue.js`: ```js define( function() { "use strict"; return function returnTrue() { return true; }; } ); ``` Closes gh-4389
* Build: Remove manual QUnit fixture resettingMichał Gołębiowski-Owczarek2019-03-111-3/+1
| | | | | | It was needed when QUnit 1.x one used but we've since upgraded to QUnit 2.x. Closes gh-4312 Ref gh-4307
* Build: Make Promises/A+ tests use the dot reporter instead of the defaultMichał Gołębiowski-Owczarek2019-03-111-5/+6
| | | | | | The default reporter is very verbose as it prints all the test names it encounters. We already use the dot reporter for Karma tests. Closes gh-4313
* Build: Update jsdom; migrate a test with Symbol polyfill to an iframe testMichał Gołębiowski-Owczarek2019-03-041-12/+12
| | | | | | | | | | | So far, we've been testing that jQuery element iteration works with polyfilled Symbol & transpiled for-of via a Node test with jsdom with the Symbol global removed. Unfortunately, jsdom now requires Symbol to be present for its internal functionality so such a test is no longer possible. Instead, it's been migrated to an iframe test with transpiled JavaScript. This PR also enables us to use ECMAScript 2017 or newer in Node.js code. Closes gh-4305
* Build: Remove CRLF line endings to fix builds on WindowsDave Methvin2018-01-091-1/+1
| | | Close gh-3929
* Tests: Add support for running unit tests via grunt with karmaTimo Tijhof2017-12-181-0/+22
| | | | | | | | | | | | | - Update QUnit to 1.23.1 - Remove unused dl#dl from test/index.html - Remove unused map#imgmap from test/index.html - Ensure all urls to data use baseURI - Add the 'grunt karma:main' task - customContextFile & customDebugFile - Add 'npm run jenkins' script Close gh-3744 Fixes gh-1999
* Tests: Make Node tests work for paths with spaces in themMichał Gołębiowski-Owczarek2017-10-182-3/+3
| | | | | | Without this patch Jenkins tests fail as jQuery job names there contain spaces, e.g. "jQuery Core". Closes gh-3821
* Build: increase timeout in Promises/A+ tests 10 timesMichał Gołębiowski-Owczarek2017-09-251-3/+6
| | | | | | | The promises-aplus-tests sets up a default 200 ms Mocha timeout. This makes our tests randomly fail on Jenkins. 2 seconds will be safer. Closes gh-3791
* Build: Drop cross-spawn, use child_process.spawn shell optionMichał Gołębiowski-Owczarek2017-09-253-9/+11
|
* Release: edit dist README version on releaseTimmy Willison2017-03-171-1/+24
| | | | Fixes gh-3574
* Release: md5sum -> md5 -r for MACTimmy Willison2017-03-161-1/+1
|
* Release: update release dependenciesTimmy Willison2017-03-151-4/+4
|
* Build: Keep deprecated module in slimTimmy Willison2017-02-131-1/+1
| | | | | Fixes gh-3237 Close gh-3533
* Build: Make the @CODE-replacing regex more robustMichał Gołębiowski2016-12-051-1/+5
| | | | | | | | | | | | | The code replacing @CODE in wrapper.js was written so that it expected both the code and the next line to start in the first column. This commit adjusts the regex so to get rid of that assumption and to work properly regardless of number of lines with comments after this block. While this is technically not necessary for our code, contributors sometimes re-format the wrapper file in their pull requests and the error messages they get don't tell them what's the real problem with their code. Closes gh-3429
* Release: fix quotes for releasing on WindowsTimmy Willison2016-09-221-3/+4
|
* Build: Make sourcemap updates in two .replace() passesDave Methvin2016-09-191-4/+5
| | | | | Fixes gh-3260 Closes gh-3321
* Core: expose noConflict in AMD modeTimmy Willison2016-08-151-5/+1
| | | | | | | | - For compability reasons, we had already added the global in AMD mode, but without noConflict. This adds back noConflict to AMD (which fixes noConflict mode in the tests). Fixes gh-2930
* Build: Fix the regex removing the ESLint comment from wrapper.jsMichał Gołębiowski2016-07-131-1/+1
| | | | | | | The new regex from after the switch from JSHint to ESLint wasn't catching the ESLint pragma correctly. Also, the spacing of the pragma comment was updated to match other comments.
* Build: ESLint detailsOleg Gaidarenko2016-06-114-12/+15
| | | | | | Use eslint pragmas, fix new errors, etc Closes gh-3148
* Tests: Move promise/A+ adapters for tests to dedicated folderOleg Gaidarenko2016-06-111-5/+5
|
* Build: Switch from jscs+jshint to eslintOleg Gaidarenko2016-06-111-0/+7
|
* Release: remove extraneous files from dist during releaseTimmy Willison2016-05-132-2/+17
| | | | | Fixes gh-3094 Close gh-3116
* Release: copy sizzle separately into an 'external' folderTimmy Willison2016-05-131-2/+7
| | | | Fixes gh-2945
* Deferred: Separate the two paths in jQuery.whenRichard Gibson2016-05-021-2/+12
| | | | | | | | Single- and no-argument calls act like Promise.resolve. Multi-argument calls act like Promise.all. Fixes gh-3029 Closes gh-3059
* Build: Strip the strict-mode related comment in exports/global.jsMichał Gołębiowski2016-04-261-1/+4
| | | | | | | The comment (& the JSHint pragma) doesn't make sense in the context of the full built file. Closes gh-3078
* Build: Strip excessive "use strict" pragmas when buildingMichał Gołębiowski2016-04-261-1/+1
| | | | Fixes gh-3077
* Deferred: Remove default callback contextRichard Gibson2016-04-231-0/+3
| | | | | | | Employs strict mode to simplify Deferred callback context handling. Fixes gh-3060 Closes gh-3061
* Core: implement ready without DeferredTimmy Willison2016-04-041-2/+11
| | | | | | | | | - Make jQuery.ready promise-compatible - Gives up sync guarantee for post-ready callbacks Fixes gh-1778 Fixes gh-1823 Close gh-2891
* Build: try insight package to get info about custom buildsOleg Gaidarenko2016-03-141-2/+41
| | | | | Fixes gh-2890 Closes gh-2988
* Release: set version in source for releasesTimmy Willison2016-03-142-1/+16
| | | | | Fixes gh-2979 Close gh-2981
* Build: combine intro and outroTimmy Willison2016-03-091-2/+7
| | | | | Fixes gh-2975 Close gh-2976
* Release: include external/sizzle in releasesTimmy Willison2016-02-241-0/+1
| | | | Ref gh-2945
* Build: use hard-coded path to sizzle in selector-sizzleTimmy Willison2016-02-101-4/+1
| | | | Fixes gh-2898
* Build: Drop testing on jsdom with Node 0.10 & 0.12Michał Gołębiowski2016-02-101-20/+0
| | | | Fixes gh-2841
* Build: switch from win-spawn to cross-spawnMichał Gołębiowski2016-01-271-1/+1
| | | | | | | The win-spawn package is deprecated. Refs gh-2877 Refs 67c96a59f5af9e8404b3f904028e1c730d647498
* Docs: Fix various spelling errorsJosh Soref2016-01-131-1/+1
| | | | Closes gh-2761
* Release: push a custom slim build to the CDNTimmy Willison2015-11-166-29/+47
| | | | | Fixes gh-2653 Close gh-2711
* Release: use chalk instead of colors for terminal colorsTimmy Willison2015-11-122-4/+6
|
* Release: remove antiquated release-notes.jsTimmy Willison2015-10-291-58/+0
|
* Build: Fixed issue with base path that contain 'var'Martin Naumann2015-10-121-1/+1
| | | | | | | Remove the cwd from the paths, so the regex doesn't kick in on "var" Fixes gh-2450 Closes gh-2641
* Tests: Add simple tests for Android 2.3Michał Gołębiowski2015-09-081-4/+8
| | | | | | Fixes gh-2505 Closes gh-2509 Refs gh-2483
* Build: Don't install jsdom 3 on Node.js 0.10 & 0.12 by defaultMichał Gołębiowski2015-09-083-28/+21
| | | | | | | | | | | | | | | | | | | | | jsdom 3 requires Python & Visual Studio on Windows which is a significant barrier to contributors. Newer jsdom versions don't require pre-compiling but work only on io.js. This commit installs the new jsdom everywhere (it does install in old Node.js, it just won't work) and executes Node-related tests only on newer Nodes or if a working jsdom version is installed. The latter can be achieved by running the `old_jsdom` task. Node.js is merging with io.js soon so this will become a smaller problem over time. One drawback is our Jenkins setup runs on Node 0.10 so it won't be running Node tests anymore. We have Travis set up on io.js, though so all PRs have those tests run. When the new LTS Node.js arrives (as it soon merges with io.js) we should update our Jenkins infrastructure so that it runs on this new version. Fixes gh-2519 Closes gh-2526