Commit Graph

62 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
8be4c0e4f8
Build: Add exports to package.json, export slim & esm builds
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
2023-07-10 19:14:08 +02:00
Michał Gołębiowski-Owczarek
5701957b72
Build: Drop individual AMD modules
With this change, jQuery build no longer generates the `amd` directory with
AMD modules transpiled from source `src` ECMAScript Modules. To use individual
jQuery modules from source, ESM is now required.

Note that this DOES NOT affect the main `"jquery"` AMD module defined by built
jQuery files; those remain supported.

Closes gh-5276
2023-06-27 18:23:58 +02:00
Timmy Willison
b2bbaa36d4
Release: remove the need to install grunt globally 2021-03-01 18:16:04 -05:00
Timmy Willison
967af73203
Release: upgrade release dependencies
- Remove unused npm dependency
2021-03-01 18:15:21 -05:00
Michał Gołębiowski-Owczarek
bfb6897c55
Release: Remove an unused chalk dependency
Chalk was used for a Sizzle version check that's no longer there on `master`.

Closes gh-4712
2020-05-18 22:45:04 +02:00
Michał Gołębiowski-Owczarek
358b769a00
Release: Use an in-repository dist README fixture
Use a dist README fixture kept in the jQuery repository instead of modifying
an existing one. This makes the jQuery repository the single source of truth
when it comes to jQuery releases and it makes it easier to make changes to
README without worrying how it will affect older jQuery lines.

The commit also ES6ifies build/release.js & build/release/dist.js

Closes gh-4614
2020-03-02 22:42:38 +01:00
Michał Gołębiowski-Owczarek
9b9ed469b4
Build: Create a grunt custom:slim alias for the Slim build (#4578)
Closes gh-4578
2020-01-07 16:42:49 +01:00
Michał Gołębiowski-Owczarek
f37c2e51f3
Build: Auto-convert sources to AMD
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
2019-12-09 20:00:44 +01:00
Michał Gołębiowski-Owczarek
bbad821c39
Build: Require strict mode in Node.js scripts via ESLint
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
2019-10-09 00:17:55 +02:00
Michał Gołębiowski-Owczarek
9a4d980639
Build: Stop copying src/core.js to dist on release
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
2019-10-04 16:13:14 +02:00
Michał Gołębiowski-Owczarek
47835965bd Selector: Inline Sizzle into the selector module
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
2019-07-29 21:19:21 +02:00
Timmy Willison
47caeaecd9
Release: update release dependencies 2017-03-15 14:57:20 -04:00
Timmy Willison
0588d0ce35
Build: Keep deprecated module in slim
Fixes gh-3237
Close gh-3533
2017-02-13 10:53:04 -05:00
Oleg Gaidarenko
58c6ca9822 Build: ESLint details
Use eslint pragmas, fix new errors, etc

Closes gh-3148
2016-06-11 10:41:33 +03:00
Timmy Willison
95c7ab6897 Release: remove extraneous files from dist during release
Fixes gh-3094
Close gh-3116
2016-05-13 11:35:15 -04:00
Timmy Willison
0f5f0c981a Release: set version in source for releases
Fixes gh-2979
Close gh-2981
2016-03-14 10:37:11 -04:00
Timmy Willison
cf7102c3f1 Release: push a custom slim build to the CDN
Fixes gh-2653
Close gh-2711
2015-11-16 11:22:20 -05:00
Timmy Willison
5f5aee3b58 Release: use chalk instead of colors for terminal colors 2015-11-12 13:23:53 -05:00
Oleg Gaidarenko
10fdad742a Build: Update jscs and lint files
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Timmy Willison
e0673dfedb Release: fix CDN archive creation
Fixes gh-1940
2015-01-29 17:38:35 -08:00
Timmy Willison
aae998b544 Release: dist can be run during a test 2015-01-29 15:36:48 -08:00
Timmy Willison
61224f5fef Release: bower.json is actually generated from scratch 2015-01-29 12:25:57 -08:00
Timmy Willison
26eca143c2 Release: Distribute files to distribution repo
Fixes gh-1869
Fixes gh-1673
Fixes gh-2045
2015-01-29 12:03:40 -08:00
Dave Methvin
c34ed46eee Release: Remove copying of jquery-latest files 2015-01-06 21:59:14 -05:00
Timmy Willison
c869a1ef8a Build: update grunt-jscs-checker and pass with the new rules 2014-07-17 10:25:59 -07:00
Timmy Willison
1d931068d3 Release: ensure Sizzle is the latest tag
Fixes #14915
2014-05-23 13:49:57 -04:00
Scott González
5265cdac3d Build: Update release script for new jquery-release API
Closes gh-1544
2014-03-21 12:33:10 -04:00
Timmy Willison
de7702ac59 Release: Instantiate a zip archiver, run archivers async 2014-01-23 16:00:54 -05:00
Jörn Zaefferer
20ea8071b4 Release: Publish to npm
Closes gh-1479
2014-01-10 09:25:11 -05:00
Timmy Willison
23db994404 Release script: _tracMilestone -> tracMilestone 2013-12-21 12:07:40 -05:00
Timmy Willison
74a48958bd Release script: minor formatting issue. 2013-12-20 17:37:38 -05:00
Timmy Willison
f3062f96e0 Release script: jquery-release integration 2013-12-20 17:25:03 -05:00
Timmy Willison
f9ad13c9ec Manage bower dependencies with grunt-bowercopy
Tracked bower dependencies are located at "src/sizzle" and "test/libs".
The source-destination mapping is in the Gruntfile.

When updating a bower dependency, update the version in bower.json, run
`grunt bower`, and then commit the result. When adding a dependency,
update the bowercopy task accordingly.

Fixes #14615.
Closes gh-1452.
2013-12-06 16:04:35 -05:00
Timmy Willison
14c19cf1a8 Release script: Add dist files in multiple commits for a clean final commit with a small diff 2013-11-15 10:48:49 -05:00
Timmy Willison
b04b386180 Release script: Add .npmignore and keep .gitignore when creating the tag 2013-11-15 10:32:13 -05:00
Timmy Willison
9aacb89f36 Release script: create tag after building CDN files 2013-11-15 09:32:46 -05:00
Timmy Willison
7f0b28e308 Update sizzle location in release script 2013-11-14 10:21:46 -05:00
Timmy Willison
2035695624 Modify release script to create a headless tag for bower and publish to NPM 2013-11-13 23:51:09 -05:00
Michał Gołębiowski
562145e887 Fix #14415. Remove the source map comment in the release script. Close gh-1424. 2013-11-10 23:24:26 +01:00
Timmy Willison
fc4ff9315d Add bower install script and release scripts to jshint and pass lint 2013-10-07 18:24:02 -04:00
Dave Methvin
d79c036ad6 Update release script for sourcmap syntax change 2013-09-19 09:06:19 -04:00
Dave Methvin
6e630fbbb1 Revert "Fix #13983. Switch to //# for sourcemaps."
Per the discussion here:
https://code.google.com/p/chromium/issues/detail?id=256636

Thanks to the Chrome team for the quick response!

This reverts commit d53ddc90c1.
2013-07-02 16:58:20 -04:00
Dave Methvin
d53ddc90c1 Fix #13983. Switch to //# for sourcemaps.
Normally we'd avoid doing this on a patch release, but Chrome Canary is
spewing deprecation warnings already and that's generating bug tickets.
2013-07-02 09:48:40 -04:00
Dave Methvin
9cbd6898b9 Do not include the path in map references. 2013-05-24 12:37:32 -04:00
Dave Methvin
df372ad6e7 Update the map reference in each minified file.
(cherry picked from commit ebc7899ba1)
2013-05-16 23:04:38 -04:00
Dave Methvin
5e8a5f4adc build: switch from .min.gz to .zip format. 2013-05-12 21:58:53 -04:00
Chris Talkington
eaee6eae0f build: update release script to use nodejs archiver. 2013-05-12 16:40:49 -05:00
Chris Talkington
8ab32fe3ff build: correct paths so that archiving works. 2013-05-12 16:02:00 -05:00
Dave Methvin
47f56f1612 Create CDN archives in the build script. 2013-05-08 20:00:24 -04:00
Dave Methvin
caf963992d Make it easier to debug the release script. 2013-05-06 10:32:16 -04:00