aboutsummaryrefslogtreecommitdiffstats
path: root/build/release/dist.js
Commit message (Collapse)AuthorAgeFilesLines
* Build: align eslint config with 3.x branch as much as possibleTimmy Willison2024-08-081-0/+1
| | | Close gh-5524
* Release: migrate release process to release-itTimmy Willison2024-07-111-186/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *Authors* - Checking and updating authors has been migrated to a custom script in the repo *Changelog* - changelogplease is no longer maintained - generate changelog in markdown for GitHub releases - generate changelog in HTML for blog posts - generate contributors list in HTML for blog posts *dist* - clone dist repo, copy files, and commit/push - commit tag with dist files on main branch; remove dist files from main branch after release *cdn* - clone cdn repo, copy files, and commit/push - create versioned and unversioned copies in cdn/ - generate md5 sums and archives for Google and MSFT *build* - implement reproducible builds and verify release builds * uses the last modified date for the latest commit * See https://reproducible-builds.org/ - the verify workflow also ensures all files were properly published to the CDN and npm *docs* - the new release workflow is documented at build/release/README.md *misc* - now that we don't need the jquery-release script and now that we no longer need to build on Node 10, we can use ESM in all files in the build folder - move dist wrappers to "wrappers" folders for easy removal of all built files - limit certain workflows to the main repo (not forks) - version in package.json has been set to beta.1 so that the next release will be beta.2 - release-it added the `preReleaseBase` option and we now always set it to `1` in the npm script. This is a noop for stable releases. Fixes jquery/jquery-release#114 Closes gh-5512
* Core: Fix the exports setup to make bundlers work with ESM & CommonJSMichał Gołębiowski-Owczarek2024-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot pass a single file via the `module` condition as then `require( "jquery" )` will not return jQuery but instead the module object with `default`, `$` & `jQuery` as keys. Instead: 1. For Node.js, detected via the `node` condition: 1. Expose a regular CommonJS version to `require` 2. Expose a tiny wrapper over CommonJS to `import` 2. For bundlers, detected via the `module` condition: 1. Expose a regular ESM version to `import` 2. Expose a tiny wrapper over ESM to `require` 3. If neither Node.js nor bundlers are detected (no `node` or `module` conditions`): 1. Expose a regular CommonJS version to `require` 2. Expose a regular ESM version to `import` The reasons for such definitions are as follows: 1. In Node.js, one can synchronously import from a CommonJS file inside of an ESM one but not vice-versa. To use an ESM file in a CommonJS one, a dynamic import is required and that forces asynchronicity. 2. In some bundlers CommonJS is not necessarily enabled - e.g. in Rollup without the CommonJS plugin. Therefore, the ESM version needs to be pure ESM. However, bundlers allow synchronously calling `require` on an ESM file. This is possible since bundlers merge the files before they are passed to the browser to execute and the final bundles no longer contain async import code. 3. Bare ESM & CommonJS versions are provided to non-Node non-bundler environments where we cannot assume interoperability between ESM & CommonJS is supported. 4. Bare versions cannot be supplied to Node or bundlers as projects using both ESM & CommonJS to fetch jQuery would result in duplicate jQuery instances, leading to increased JS size and disjoint data storage. In addition to the above changes, the `script` condition has been dropped. Only Webpack documents this condition and it's not clear when exactly it's triggered. Adding support for a new condition can be added later without a breaking change; removing is not so easy. The `production` & `development` conditions have been removed as well. They were not really applied correctly; we'd need to provide both of them to each current leaf which would double the size of the definition for the `.` & `./slim` entry points. In jQuery, the only difference between development & production builds is minification; there are no logic changes so we can pass unminified versions to all the tooling, expecting minification down the line. As for the factory entry points: 1. Node.js always gets the CommonJS version 2. Bundlers always get the ESM version 3. Other tools take the ESM version when using `import` and the CommonJS when using `require`. The complexity is lower than for the `.` & `./slim` entry points because there's no default export to handle so Node/bundler wrapper files are not necessary. Other changes: * Tests: Change "node:assert" to "node:assert/strict"; the former is deprecated * Docs: Mention that the CommonJS module doesn't expose named exports * Tests: Run Node & bundler tests for all the above cases Fixes gh-5416 Closes gh-5429
* Build: migrate more uses of fs.promises; use node: protocolTimmy Willison2024-03-111-1/+1
| | | | Ref gh-5440
* Release: use buildDefaultFiles directly and pass versionTimmy Willison2024-02-061-0/+1
| | | | | | | | - also add the ability to pass VERSION in env to test final builds - adjust sha regex to account for lack of shas - set the version on the dist package.json Close gh-5408
* Release: copy dist-module folder as wellTimmy Willison2024-02-051-7/+18
| | | Close gh-5407
* Release: remove scripts and dev deps from dist package.jsonTimmy Willison2024-02-051-2/+14
| | | | | | - this became necessary due to the addition of the prepare script - scripts aren't needed and don't work in the dist repo Close gh-5404
* Build: Drop individual AMD modulesMichał Gołębiowski-Owczarek2023-06-271-1/+0
| | | | | | | | | | 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
* Build: Rename master to main across the repositoryMichał Gołębiowski-Owczarek2021-02-051-4/+4
| | | | | | The default branch was updated, this updates the remaining occurrences in code & comments. Closes gh-4838
* Build: Update eslint-config-jquery, fix linting violationsMichał Gołębiowski-Owczarek2020-05-181-1/+1
| | | | | Closes gh-4696 Ref jquery/eslint-config-jquery#15 Ref jquery/eslint-config-jquery#16
* Release: Use an in-repository dist README fixtureMichał Gołębiowski-Owczarek2020-03-021-47/+54
| | | | | | | | | | 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
* Build: Auto-convert sources to AMDMichał Gołębiowski-Owczarek2019-12-091-0/+1
| | | | | | | | | | | | | | | 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: Require strict mode in Node.js scripts via ESLintMichał Gołębiowski-Owczarek2019-10-091-0/+2
| | | | | | | | 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
* Selector: Inline Sizzle into the selector moduleMichał Gołębiowski-Owczarek2019-07-291-5/+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
* Release: edit dist README version on releaseTimmy Willison2017-03-171-1/+24
| | | | Fixes gh-3574
* Release: fix quotes for releasing on WindowsTimmy Willison2016-09-221-3/+4
|
* Release: remove extraneous files from dist during releaseTimmy Willison2016-05-131-1/+16
| | | | | Fixes gh-3094 Close gh-3116
* Release: copy sizzle separately into an 'external' folderTimmy Willison2016-05-131-2/+7
| | | | Fixes gh-2945
* Release: set version in source for releasesTimmy Willison2016-03-141-0/+3
| | | | | Fixes gh-2979 Close gh-2981
* Release: include external/sizzle in releasesTimmy Willison2016-02-241-0/+1
| | | | Ref gh-2945
* Docs: Fix various spelling errorsJosh Soref2016-01-131-1/+1
| | | | Closes gh-2761
* Release: push a custom slim build to the CDNTimmy Willison2015-11-161-11/+10
| | | | | Fixes gh-2653 Close gh-2711
* Build: Update jscs and lint filesOleg Gaidarenko2015-09-071-6/+7
| | | | Fixes gh-2056
* Docs: Fix various spelling mistakesBruno Pérel2015-07-301-1/+1
| | | | Closes gh-2487
* Release: properly set the dist remote when it's a real releaseTimmy Willison2015-07-131-1/+1
|
* Build: bower.json: remove moot `version` fieldChris Rebert2015-05-131-1/+0
| | | | | | | Related: https://github.com/bower/bower.json-spec/commit/a325da3d79baab018c572d75dc1781b12322f6cd Close gh-2304
* Release: push dist to same remote as projectTimmy Willison2015-01-301-3/+2
|
* Release: dist can be run during a testTimmy Willison2015-01-291-2/+2
|
* Release: Distribute files to distribution repoTimmy Willison2015-01-291-0/+113
Fixes gh-1869 Fixes gh-1673 Fixes gh-2045