254 Commits

Author SHA1 Message Date
John Blackbourn
99dd184af4 Build/Test Tools: Improve the error message shown when fetching Twemoji fails.
This allows the full error message to be shown from the connection attempt instead of a generic error message.

Fixes #62382


git-svn-id: https://develop.svn.wordpress.org/trunk@59443 602fd350-edb4-49c9-b593-d223f7449a82
2024-11-21 13:16:07 +00:00
Greg Ziółkowski
0b8b80449f Build: Prepare for more Script Modules
This is a companion to https://github.com/WordPress/gutenberg/pull/65460 that requires syncing in WordPress Core. Namely, the block-library changes require registration with their updated script module IDs so that the blocks continue to work correctly.

They key improvement is script modules registration is handled in one central place, and a combined asset file is used to improve the performance by avoiding multiple disk operations for every individual file.

Props jonsurrell, gziolo, wildworks, noisysocks.
See #60647, #59462.



git-svn-id: https://develop.svn.wordpress.org/trunk@59083 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-24 07:33:55 +00:00
Robert Anderson
1ad25bb143 Editor: Update packages for 6.7 Beta 1.
Syncs `@wordpress/*` packages to the `wp-6.7` npm tag.

Fixes #61906.
Props peterwilsoncc, gziolo, kevin940726.


git-svn-id: https://develop.svn.wordpress.org/trunk@59072 602fd350-edb4-49c9-b593-d223f7449a82
2024-09-20 01:53:52 +00:00
Jonathan Desrosiers
81a4c4cdf0 Build/Test Tools: Fix the precommit:emoji script.
GitHub recently sunset support for Subversion, causing the `precommit:emoji` Grunt script to break. Since there’s no direct replacement for `svn ls` in Git, this has been replaced with a query through the GitHub CLI.

This also adds a step in the workflow that tests the build process to run the `precommit:emoji` script to ensure no changes to built files are missed when updating the Twemoji library in the future.

Follow up to [57626].

Props kraftbj, peterwilsoncc, swissspidy.
Fixes #60520. See #57600.

git-svn-id: https://develop.svn.wordpress.org/trunk@57758 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 11:23:59 +00:00
Aaron Jorbin
35feae5c75 General: Add an option to configure the site icon in general settings.
This restores the site icon setting to its original home on the settings page where it lives with the title and tagline.

The base for this code was originally added in [32994] and then removed in [33329]. The majority of the modification to that version are to remove the no-js pieces and make the workflow completely inline rather than putting the cropping on a separate page.

Additionally, since image crops rely on the ability to upload an image, this setting is gated by the `upload_files` capability.

Follow-up to: [32994], [33329].

Props jorbin, audrasjb, mukesh27, joedolson, afercia, kebbet, swissspidy, obenland, jameskoster, kjellr, andraganescu, stacimc, mikeschroder, h71, krupajnanda, huzaifaalmesbah.
Fixes #54370.
See #16434.



git-svn-id: https://develop.svn.wordpress.org/trunk@57602 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-12 21:55:44 +00:00
Greg Ziółkowski
dc15d66ee6 Script Modules API: Add import map polyfill for older browsers
Syncs the changes from https://github.com/WordPress/gutenberg/pull/58263. Adds a polyfill to make import maps compatible with unsported browsers (https://caniuse.com/import-maps).

Fixes #60348.
Props cbravobernal, jorbin, luisherranz, jonsurrell.



git-svn-id: https://develop.svn.wordpress.org/trunk@57492 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-31 08:29:18 +00:00
Riad Benguella
cf8b74de16 Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress. 
This includes features like:

 - DataViews.
 - Customization tools like box shadow, background size and repeat.
 - UI improvements in the site editor. 
 - Preferences sharing between the post and site editors.
 - Unified panels and editors between post and site editors.
 - Improved template mode in the post editor.
 - Iterations to multiple interactive blocks.
 - Preparing the blocks and UI for pattern overrides.
 - and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.

git-svn-id: https://develop.svn.wordpress.org/trunk@57377 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-29 21:04:18 +00:00
Pascal Birchler
5cd843e235 Build/Test Tools: Expand "imagemin" Grunt task to cover default themes.
Runs `npm run grunt precommit:image` to minify/compress images in the repository.

Props desrosj.
Fixes #58996.

git-svn-id: https://develop.svn.wordpress.org/trunk@57322 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-22 11:41:33 +00:00
Pascal Birchler
64190e8c3e Build/Test Tools: Revert accidental change to Gruntfile.js
This is a follow-up to r56926.

See #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56927 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-13 08:13:58 +00:00
Pascal Birchler
5a838d1bb7 Build/Test Tools: Migrate Puppeteer tests to Playwright.
As per the migration plan shared last year, this migrates all browser-based tests in WordPress core to use Playwright.
This includes end-to-end, performance, and visual regression tests.

Props swissspidy, mamaduka, kevin940726, bartkalisz, desrosj, adamsilverstein.
Fixes #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56926 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-13 08:11:41 +00:00
Tammie Lister
ae1484cbb6 Update editor related npm packages
The npm packages needed updating for 6.4 to the latest.

Props mikachan, mukesdpanchal27, luisherranz, youknowriad, tellthemachines, gziolo, ockham, michalczaplinski

Fixes #59411



git-svn-id: https://develop.svn.wordpress.org/trunk@56710 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-26 14:20:18 +00:00
Weston Ruter
f085426605 Build Tools: Avoid doing copy:dynamic when running grunt watch when using --dev option.
This prevents erroneously copying a file from source onto itself in source.

Props westonruter, jorbin.
Fixes #59196.


git-svn-id: https://develop.svn.wordpress.org/trunk@56461 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:40:24 +00:00
Weston Ruter
415c9f6bb4 Embeds: Modernize wp-embed script with removal of obsolete IE10/IE11 code and support for WP<4.4.
* Remove obsolete `load` event handler in `wp-embed` since IE10+ support `DOMContentLoaded`.
* Replace obsolete use of `document.createElement('a')` in favor of the newer `URL` class (supported in all browsers but obsolete IE11).
* Remove obsolete IE10/IE11 code.
* Combine conditionals.
* Use `substring()` instead of deprecated `substr()` method.
* Eliminate the stipulation that `wp-embed.js` not include ampersands, considering this was put in place for WP<4.3 which now accounts for only 1.43% of sites. This includes the elimination of the `verify:wp-embed` grunt task.

Props westonruter, swissspidy.
Fixes #58974.


git-svn-id: https://develop.svn.wordpress.org/trunk@56383 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-10 19:47:08 +00:00
K. Adam White
fb9814474e Build Tools: Remove outmoded jsvalidate task from Gruntfile.
grunt-jsvalidate was added to catch situations where minification introduced parsing errors in Internet Explorer.
IE is no longer supported by WordPress, and the grunt task itself has not been maintained for a decade.
Removing this task simplifies the build and avoids false-positive warnings where the outdated tool flags modern JS syntax incorrectly.

Props westonruter, joemcgill, jorbin, youknowriad, desrosj, swissspidy.
Fixes #58645. See #26615.


git-svn-id: https://develop.svn.wordpress.org/trunk@56247 602fd350-edb4-49c9-b593-d223f7449a82
2023-07-17 14:05:51 +00:00
Bernie Reiter
a710b97e7c Editor: update Wordpress npm packages.
Updates the wordpress npm packages and their dependencies to the latest versions, as well as auto-updates to relevant core PHP files.

Props youknowriad, joemcgill, spacedmonkey, ramonopoly, peterwilsoncc, bernhard-reiter, tyxla, dmsnell.
Fixes #58623.

git-svn-id: https://develop.svn.wordpress.org/trunk@56065 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 14:20:18 +00:00
Joe Dolson
e97a67e7b8 Upgrade/Install: Show/hide toggle on password fields.
Add a show/hide toggle for new passwords in initial user creation and database access during install and setup process using the same model as on user profiles. Add a new password toggle script. Change setup config table to two columns, matching the install table layout.

Props xmarcos, matt, markjaquith, nazgul, akbigdog, intoxination, rob1n, MichaelH, empireoflight, rmccue, markoheijnen, r0uter, amansurov, bi0xid, DrewAPicture, Narthur, wpnook, markparnell, costdev, clorith, ryokuhi, sabernhardt, bgoewert, ironprogrammer, adeltahri, joedolson, mukesh27, audrasjb, sergeybiryukov.
Fixes #3534.

git-svn-id: https://develop.svn.wordpress.org/trunk@56008 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-23 23:07:10 +00:00
Andrew Ozz
a67b087a20 Build/Test Tools: Fix cleaning of old CSS files in wp-includes/blocks/*. Have to be cleaned earlier, before Webpack runs. Not together with the rest of the CSS files.
Props: ironprogrammer, petitphp, hellofromTonya, azaozz.
Fixes: #57891. 

git-svn-id: https://develop.svn.wordpress.org/trunk@55494 602fd350-edb4-49c9-b593-d223f7449a82
2023-03-09 00:03:36 +00:00
Andrew Ozz
87f053492f Build/Test Tools: Remove all previously built files when running clean:files.
Cleans old JS, CSS and Webpack files from /src so they are not automatically copied to /build when running `grunt build`. Fixes errors that may be caused by copying outdated files and/or directories to /build.

Props: desrosj, isabel_brison, SergeyBiryukov, ironprogrammer, mukesh27, robinwpdeveloper, razthee007, costdev, peterwilsoncc, azaozz.

Fixes: #47749.

git-svn-id: https://develop.svn.wordpress.org/trunk@55484 602fd350-edb4-49c9-b593-d223f7449a82
2023-03-08 01:01:45 +00:00
Andrew Ozz
4dd9160d8e Emoji: Always skip nodes with the wp-exclude-emoji CSS class.
Patches twemoji.js to add support for a `doNotParse()` callback. Uses that callback to always exclude emojis in HTML elements with the above class.

Props: dd32, peterwilsoncc, azaozz.
Fixes #52219.

git-svn-id: https://develop.svn.wordpress.org/trunk@55186 602fd350-edb4-49c9-b593-d223f7449a82
2023-02-02 00:51:02 +00:00
Jonathan Desrosiers
94ea12b60c Build/Test Tools: Update PostCSS to version 8.
This updates PostCSS related dependencies for the main Core build process to versions that use the latest major version of PostCSS, 8.x.

There were no changes to any versioned CSS files as a result of this update directly. However, two occurrences of `-o-tab-size` have been removed due to the version of `caniuse-lite` used being updated in the process.

See #57554, #57555.

git-svn-id: https://develop.svn.wordpress.org/trunk@55150 602fd350-edb4-49c9-b593-d223f7449a82
2023-01-27 15:53:15 +00:00
Greg Ziółkowski
108c92d8dd Build: Improve how combined assets are generated
Allows to revert changes applied in [54277] - temporary workaround for the failing Test NPM CI check on Windows.

Improvements included:
- generate combined asset files for both production and development
- store in the repository only the production version of the combined assets for packages, we use everything else only in development
- to make unit tests work, ensure that they ignore react fast refresh and use the production version of combined assets that are present in the source code

Props bernhard-reiter, jsnajdr, clorith, wildworks.
Fixes #56615.



git-svn-id: https://develop.svn.wordpress.org/trunk@54289 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-23 08:25:45 +00:00
Sergey Biryukov
688b88d5a3 Editor: Improve block loading PHP performance.
This commit improves PHP performance for core blocks by reading a single PHP file with block metadata, instead of reading a JSON file per-block and then decoding from JSON to PHP.

Includes:
* Adding a new Grunt task to convert `block.json` files to `block-json.php`.
* Using the new `block-json.php` file in the `register_block_type_from_metadata()` function.

Follow-up to [48141].

Props aristath, gziolo, johnbillion, presstoke, mukesh27, hellofromTonya, petitphp, adamsilverstein, costdev, desrosj, SergeyBiryukov.
Fixes #55005.

git-svn-id: https://develop.svn.wordpress.org/trunk@54276 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-21 13:55:25 +00:00
Greg Ziółkowski
537e5239f9 Tools: Automate backporting core blocks from Gutenberg to Core
Syncing stable blocks from the Gutenberg repository to wordpress-develop was a manual process, but it got automated with the script that runs together with syncing WordPress packages changed in the Gutenberg package.

Props zieladam.
Fixes #56179.




git-svn-id: https://develop.svn.wordpress.org/trunk@53688 602fd350-edb4-49c9-b593-d223f7449a82
2022-07-08 12:32:37 +00:00
Greg Ziółkowski
619693e75f Editor: Update WordPress packages for 6.0 RC 2 (part 2)
Includes cherry-picked commit from the Gutenberg plugin that fix a bug discovere just before WordPress 6.0 RC 2.

Props hellofromtonya, zieladam, kebbet.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53378 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 15:55:57 +00:00
Greg Ziółkowski
e0837a8b18 Editor: Update WordPress packages for 6.0 Beta 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 3.

Props zieladam, ndiego, darerodz.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53329 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 10:36:45 +00:00
Sergey Biryukov
f4416e018d Docs: Adjust comments in Gruntfile.js per the documentation standards.
See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53314 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:44:15 +00:00
Greg Ziółkowski
6a1f7d02f8 Tools: Further automate backporting from Gutenberg to Core
Follow-up for #51491.

Updating WordPress packages is currently a manual process that takes some reading and trial & error to figure out. This PR adds a single npm task called `sync-gutenberg-packages` that automates this entire process.

Props zieladam.
Fixes #55642.



git-svn-id: https://develop.svn.wordpress.org/trunk@53311 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 13:59:49 +00:00
Greg Ziółkowski
b726922bb9 Build: Enable React Fast Refresh for block development
Brings the same functionality introduced in the Gutenberg plugin with https://github.com/WordPress/gutenberg/pull/28273. In effect, it brings React Fast Refresh support to WordPress core for block development with `@wordpress/scripts`.

Props walbo, antonvlasenko.
See #51750, #55505.
Follow-up [53135].



git-svn-id: https://develop.svn.wordpress.org/trunk@53140 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-11 16:08:12 +00:00
Marius L. J
f2e08d36af External libraries: Update jQuery Color to 2.2.0
The NPM package for jQuery Color was updated in [50543], but a bundled version still existed within core.
This removes that bundled version, in favor of expanding the Grunt build steps to include the package from NPM instead.

Fixes #55016. See #51405.

git-svn-id: https://develop.svn.wordpress.org/trunk@52657 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 01:20:19 +00:00
Sergey Biryukov
8bfdd80f46 Build/Test Tools: Remove the replace:emoji-banner-text Grunt task.
The task was previously used to ensure that `/*! This file is auto-generated */` comment is not included on front end as part of the inline emoji detection script.

As the `wp-emoji-loader.js` script is now included via `file_get_contents()` and `wp_print_inline_script_tag()` instead of `grunt-include` to simplify the logic, the task does not find anything to replace and is no longer necessary.

Additionally, include a line break before the `wp-emoji-loader.js` script content for better line wrapping.

Follow-up to [48096], [50651], [52132].

See #44632, #44306, #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52325 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-06 10:12:28 +00:00
Weston Ruter
02a2f9c9f5 Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows.
* Prevent loading `wp-embed` script unconditionally on every page in favor of conditionally enqueueing when a post embed is detected. The `wp-embed` script is also explicitly marked as being in the footer group. Sites which currently disable post embed scripts from being enqueued via `remove_action( 'wp_head', 'wp_oembed_add_host_js' )` will continue to do so.
* Send a `ready` message from the host page to each post embed window in case the `iframe` loads before the `wp-embed` script does. When the `ready` message is received by the post embed window, it sends the same `height` message as it sends when it loads.
* Eliminate use of `grunt-include` to inject emoji script and the post embed script. Instead obtain the script contents via `file_get_contents()` (as is done elsewhere in core) and utilize `wp_print_inline_script_tag()`/`wp_get_inline_script_tag()` to construct out the script. This simplifies the logic and allows the running of src without `SCRIPT_DEBUG` enabled.
* For the embed code that users are provided to copy for embedding outside of WP, add the `secret` on the `blockquote` and `iframe`. This ensures the `blockquote` will be hidden when the `iframe` loads. The embed code in question is accessed here via `get_post_embed_html()`.

Props westonruter, swissspidy, pento, flixos90, ocean90.
Fixes #44632, #44306.


git-svn-id: https://develop.svn.wordpress.org/trunk@52132 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 02:47:10 +00:00
Riad Benguella
fdb2dacc19 Block Editor: Update the WordPress Packages based on Gutenberg 11.9 RC1.
This brings the JS packages up to date and is the first step that will allow us 
to include the other block editor updates for WordPress 5.9:
FSE infrastrucutre, site editor and global styles.

Props noisysocks.
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52042 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 14:26:27 +00:00
Peter Wilson
d43e6a6314 Build: Clean css/dist as part of the webpack build step.
Move the cleaning of the `wp-includes/css/dist` folder from `clean:css` to `clean:webpack-assets` to avoid an order of operations issue in which the files were built shortly before been deleted later in the build process.

Follow up to [51689].

Props netweb, ramonopoly, peterwilsoncc.
Fixes #53719.



git-svn-id: https://develop.svn.wordpress.org/trunk@51713 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-01 03:59:30 +00:00
Peter Wilson
bb3075d642 Build: Remove css/dist in grunt clean command.
Modify the `grunt clean:css` command to include the folder `wp-includes/css/dist` to ensure legacy files do not remain if the built files are removed/relocated.

Props desrosj, netweb.
Fixes #53719.



git-svn-id: https://develop.svn.wordpress.org/trunk@51689 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 04:34:19 +00:00
gziolo
ad976addb3 Build: Split packages and blocks to their webpack configs
It aligns with the changes proposed added in Gutenberg: https://github.com/WordPress/gutenberg/pull/33293.

The idea here is to split the growing webpack config into two parts: blocks and  packages.

We need to add handling for JavaScript files that are going to be used with blocks on the frontend. They didn't work quite well with the current setup for entry points created for packages.

As part of the effort, it adds support for `viewScript` in `block.json` metadata file that is later translated to `$view_script` in `WP_Block_Type` class and exposed as `view_script` from the REST API endpoint for block types.

Props youknowriad, desrosj, aristath.
Fixes #53690.



git-svn-id: https://develop.svn.wordpress.org/trunk@51501 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-28 10:05:01 +00:00
John Blackbourn
ef09cd88de Build/Test Tools: Add assertions to ensure version-controlled files are not modified during CI, and fix the grunt clean command.
Some tests and some commands that run during the build steps modify files that are under version control. This adds assertions to ensure that these files don't remain in a modified state after the test runs on CI.

This also fixes the `grunt clean` command which erroneously deletes `script-loader-packages.php`. This file is re-populated during the build, but deleting it during the clean is undesirable.

Fixes #53606


git-svn-id: https://develop.svn.wordpress.org/trunk@51355 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-06 18:36:46 +00:00
Jonathan Desrosiers
36012064f6 Build/Test Tools: Revert [51259-51256,51265].
[51259] introduced a PHP notice that was not actually fixed by [51265]. Reverting these changes in order to investigate further.

See #53397.

git-svn-id: https://develop.svn.wordpress.org/trunk@51268 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-30 02:13:30 +00:00
Riad Benguella
51cbe7eeb7 Build: Split packages and blocks to their webpack configs.
This also adds support for the viewScript for blocks fixing 
the PDF preview for file blocks.

Props desrosj, gziolo.
See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51259 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 15:08:16 +00:00
Jonathan Desrosiers
81182b52ef Build/Test Tools: Ignore sourceMaps for non WordPress Core files.
If a custom plugin or theme exists in the `build/wp-content` directory with a sourcemap, the build` script is currently returning a warning and failing.

This improves the `verify:source-maps` task in Grunt to ignore directories and files that do not belong to WordPress Core.

Props ryelle, afragen, johnbillion.
Fixes #52689.

git-svn-id: https://develop.svn.wordpress.org/trunk@51173 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-16 22:56:32 +00:00
Sergey Biryukov
b146e9ae59 Build/Test Tools: Use the Composer-installed version of PHPUnit for Grunt tasks.
This makes it easier to run `phpunit` Grunt tasks without having to figure out how and which PHPUnit version needs to be installed.

It also more closely matches the `format:php` task.

Follow-up to [47881].

Props ocean90.
Fixes #53015.

git-svn-id: https://develop.svn.wordpress.org/trunk@51016 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 23:14:15 +00:00
Greg Ziółkowski
585f62ad8c Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.




git-svn-id: https://develop.svn.wordpress.org/trunk@50929 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 15:07:55 +00:00
Dominik Schilling
87fc38e588 Build/Test Tools: Remove remaining Travis CI references.
* Remove `travis:` tasks in Gruntfile.js.
* Remove status badge in README.md that comes from Travis CI via shields.io.
* Remove Travis CI related skipping in the `WP_UnitTestCase_Base::skipOnAutomatedBranches()` test method and related Docker environment variables.

Props johnbillion, SergeyBiryukov, ocean90.
See #52161.
Fixes #52666.

git-svn-id: https://develop.svn.wordpress.org/trunk@50697 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 12:05:50 +00:00
Sergey Biryukov
9c0944fa85 Build/Test Tools: Rename some Grunt tasks to use hyphens instead of camelCase.
This makes the task names more consistent with other tasks.

Follow-up to [41043], [48096], [50650].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50651 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-03 12:44:38 +00:00
David Baumwald
44a066fa57 External Libraries: Update Underscore to version 1.12.1.
Full set of changes at https://github.com/jashkenas/underscore/compare/1.8.3...1.12.1.  
The new version includes a `sourceMappingURL` that causes a build failure, so this change 
also introduces a task to remove this from the source during the build.

Props mukesh27, hareesh-pillai, desrosj, SergeyBiryukov, TimoTijhof.
Fixes #45785.

git-svn-id: https://develop.svn.wordpress.org/trunk@50650 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-02 19:40:43 +00:00
Sergey Biryukov
9ba7875fc8 External Libraries: Install jQuery via NPM.
Previously, jQuery 1.12.4 was added to the WordPress SVN repo in order to backport an upstream security patch from jQuery 3.4.0.

Now that WordPress includes an unmodified version of jQuery 3.5.1 and no longer needs to maintain a fork, it can be removed from the SVN repo and installed via NPM again as part of the build.

Follow-up to [45342], [49101].

Props peterwilsoncc, SergeyBiryukov.
Fixes #52647.

git-svn-id: https://develop.svn.wordpress.org/trunk@50445 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-26 17:49:58 +00:00
John Blackbourn
4ab922d224 Build/Test Tools: Switch back to running the PHPUnit test suite against the src directory instead of build.
Some PHPUnit tests were concerned with the state of files in the `build` directory. In order to allow the tests to run without requiring a build to be run first, these have been moved into assertions that run after the build step (and therefore cause it to fail if they do not pass), or into QUnit tests as necessary.

Various other PHPUnit tests implictly depend on built JavaScript files being present. These files are now touched during the test setup to avoid PHP warnings if the `build` files are not present.

The `wp-tests-config-sample.php` file and the GitHub Actions configuration have also been changed so `ABSPATH` uses `src` instead of `build`, therefore allowing the PHPUnit tests to be run without a build having to be run first. This means all new local installations of WordPress will use `src` for PHPUnit testing. If you would like to switch your existing installation over then change the location of `ABSPATH` in `wp-tests-config.php` to point to `src` instead of `build`.

Props peterwilsoncc, iandunn, gziolo, desroj, johnbillion

Fixes #51734
See #45863


git-svn-id: https://develop.svn.wordpress.org/trunk@50441 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-26 14:07:53 +00:00
Kelly Choyce-Dwan
5c5f859d45 Build/Test Tools: Replace node-sass with Dart Sass
Switch the Sass implementation used by Grunt to `sass` (the Dart version), since LibSass & `node-sass` have been deprecated.

Props desrosj.
Fixes #51763.



git-svn-id: https://develop.svn.wordpress.org/trunk@50126 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-01 20:22:13 +00:00
Jonathan Desrosiers
3723941a9c Build/Test Tools: Run the Ajax test group for multisite.
This will help catch issues with Ajax related functionality on multisite.

A few tests have also been marked as `skipWithMultisite()` as they require network admin level capabilities when performing the same operations on a multisite install.

Props garrett-eclipse, netweb.
Fixes #46567.

git-svn-id: https://develop.svn.wordpress.org/trunk@49835 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 14:38:28 +00:00
Peter Wilson
a6e1d392f2 Docs, Tests: Correctly capitalize JavaScript.
Correct Javascript to JavaScript within Wordpress core ;)

See #51800, #51802.



git-svn-id: https://develop.svn.wordpress.org/trunk@49758 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-06 02:19:56 +00:00
TimothyBlynJacobs
1856d0fe2a REST API: Introduce Application Passwords for API authentication.
In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.

This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.

Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.

Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes #42790.


git-svn-id: https://develop.svn.wordpress.org/trunk@49109 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-08 22:12:02 +00:00