WordPress at a glance
function is not described

wp_default_packages_scripts() WP 5.0.0

Registers all the WordPress packages scripts that are in the standardized js/dist/ location.

For the order of $scripts->add wp_default_scripts().

No Hooks.

Return

Nothing (null).

Usage

wp_default_packages_scripts( &$scripts );
$scripts(WP_Scripts) (required)
WP_Scripts object.

Code of wp default packages scripts: wp-includes/script-loader.php VER 5.0.3

<?php
function wp_default_packages_scripts( &$scripts ) {
	$suffix = wp_scripts_get_suffix();

	$packages_versions = array(
		'api-fetch' => '2.2.7',
		'a11y' => '2.0.2',
		'annotations' => '1.0.5',
		'autop' => '2.0.2',
		'blob' => '2.1.0',
		'block-library' => '2.2.12',
		'block-serialization-default-parser' => '2.0.3',
		'blocks' => '6.0.5',
		'components' => '7.0.5',
		'compose' => '3.0.0',
		'core-data' => '2.0.16',
		'data' => '4.2.0',
		'date' => '3.0.1',
		'deprecated' => '2.0.4',
		'dom' => '2.0.8',
		'dom-ready' => '2.0.2',
		'edit-post' => '3.1.7',
		'editor' => '9.0.7',
		'element' => '2.1.8',
		'escape-html' => '1.0.1',
		'format-library' => '1.2.10',
		'hooks' => '2.0.4',
		'html-entities' => '2.0.4',
		'i18n' => '3.1.0',
		'is-shallow-equal' => '1.1.4',
		'keycodes' => '2.0.5',
		'list-reusable-blocks' => '1.1.18',
		'notices' => '1.1.2',
		'nux' => '3.0.6',
		'plugins' => '2.0.10',
		'redux-routine' => '3.0.3',
		'rich-text' => '3.0.4',
		'shortcode' => '2.0.2',
		'token-list' => '1.1.0',
		'url' => '2.3.3',
		'viewport' => '2.1.0',
		'wordcount' => '2.0.3',
	);

	$packages_dependencies = array(
		'api-fetch' => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n', 'wp-url' ),
		'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ),
		'annotations' => array(
			'wp-data',
			'wp-hooks',
			'wp-i18n',
			'wp-polyfill',
			'wp-rich-text',
		),
		'autop' => array( 'wp-polyfill' ),
		'blob' => array( 'wp-polyfill' ),
		'blocks' => array(
			'wp-autop',
			'wp-blob',
			'wp-block-serialization-default-parser',
			'wp-data',
			'wp-dom',
			'wp-element',
			'wp-hooks',
			'wp-html-entities',
			'wp-i18n',
			'wp-is-shallow-equal',
			'wp-polyfill',
			'wp-shortcode',
			'lodash',
		),
		'block-library' => array(
			'editor',
			'lodash',
			'wp-api-fetch',
			'wp-autop',
			'wp-blob',
			'wp-blocks',
			'wp-components',
			'wp-compose',
			'wp-core-data',
			'wp-data',
			'wp-date',
			'wp-editor',
			'wp-element',
			'wp-html-entities',
			'wp-i18n',
			'wp-keycodes',
			'wp-polyfill',
			'wp-url',
			'wp-viewport',
			'wp-rich-text',
		),
		'block-serialization-default-parser' => array(),
		'components' => array(
			'lodash',
			'moment',
			'wp-a11y',
			'wp-api-fetch',
			'wp-compose',
			'wp-dom',
			'wp-element',
			'wp-hooks',
			'wp-html-entities',
			'wp-i18n',
			'wp-is-shallow-equal',
			'wp-keycodes',
			'wp-polyfill',
			'wp-rich-text',
			'wp-url',
		),
		'compose' => array(
			'lodash',
			'wp-element',
			'wp-is-shallow-equal',
			'wp-polyfill'
		),
		'core-data' => array( 'wp-data', 'wp-api-fetch', 'wp-polyfill', 'wp-url', 'lodash' ),
		'data' => array(
			'lodash',
			'wp-compose',
			'wp-element',
			'wp-is-shallow-equal',
			'wp-polyfill',
			'wp-redux-routine',
		),
		'date' => array( 'moment', 'wp-polyfill' ),
		'deprecated' => array( 'wp-polyfill', 'wp-hooks' ),
		'dom' => array( 'lodash', 'wp-polyfill', 'wp-tinymce' ),
		'dom-ready' => array( 'wp-polyfill' ),
		'edit-post' => array(
			'jquery',
			'lodash',
			'postbox',
			'media-models',
			'media-views',
			'wp-a11y',
			'wp-api-fetch',
			'wp-block-library',
			'wp-blocks',
			'wp-components',
			'wp-compose',
			'wp-core-data',
			'wp-data',
			'wp-dom-ready',
			'wp-editor',
			'wp-element',
			'wp-embed',
			'wp-i18n',
			'wp-keycodes',
			'wp-notices',
			'wp-nux',
			'wp-plugins',
			'wp-polyfill',
			'wp-url',
			'wp-viewport',
		),
		'editor' => array(
			'jquery',
			'lodash',
			'wp-tinymce-lists',
			'wp-a11y',
			'wp-api-fetch',
			'wp-blob',
			'wp-blocks',
			'wp-components',
			'wp-compose',
			'wp-core-data',
			'wp-data',
			'wp-date',
			'wp-deprecated',
			'wp-dom',
			'wp-element',
			'wp-hooks',
			'wp-html-entities',
			'wp-i18n',
			'wp-is-shallow-equal',
			'wp-keycodes',
			'wp-notices',
			'wp-nux',
			'wp-polyfill',
			'wp-tinymce',
			'wp-token-list',
			'wp-url',
			'wp-viewport',
			'wp-wordcount',
			'wp-rich-text',
		),
		'element' => array( 'wp-polyfill', 'react', 'react-dom', 'lodash', 'wp-escape-html' ),
		'escape-html' => array( 'wp-polyfill' ),
		'format-library' => array(
			'wp-components',
			'wp-dom',
			'wp-editor',
			'wp-element',
			'wp-i18n',
			'wp-keycodes',
			'wp-polyfill',
			'wp-rich-text',
			'wp-url',
		),
		'hooks' => array( 'wp-polyfill' ),
		'html-entities' => array( 'wp-polyfill' ),
		'i18n' => array( 'wp-polyfill' ),
		'is-shallow-equal' => array( 'wp-polyfill' ),
		'keycodes' => array( 'lodash', 'wp-polyfill', 'wp-i18n' ),
		'list-reusable-blocks' => array(
			'lodash',
			'wp-api-fetch',
			'wp-components',
			'wp-compose',
			'wp-element',
			'wp-i18n',
			'wp-polyfill',
		),
		'notices' => array(
			'lodash',
			'wp-a11y',
			'wp-data',
			'wp-polyfill',
		),
		'nux' => array(
			'wp-element',
			'lodash',
			'wp-components',
			'wp-compose',
			'wp-data',
			'wp-i18n',
			'wp-polyfill',
			'lodash',
		),
		'plugins' => array( 'lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill' ),
		'redux-routine' => array( 'wp-polyfill' ),
		'rich-text' => array(
			'lodash',
			'wp-data',
			'wp-escape-html',
			'wp-polyfill',
		),
		'shortcode' => array( 'wp-polyfill', 'lodash' ),
		'token-list' => array( 'lodash', 'wp-polyfill' ),
		'url' => array( 'wp-polyfill' ),
		'viewport' => array( 'wp-polyfill', 'wp-element', 'wp-data', 'wp-compose', 'lodash' ),
		'wordcount' => array( 'wp-polyfill' ),
	);

	$package_translations = array(
		'api-fetch' => 'default',
		'blocks' => 'default',
		'block-library' => 'default',
		'components' => 'default',
		'edit-post' => 'default',
		'editor' => 'default',
		'format-library' => 'default',
		'keycodes' => 'default',
		'list-reusable-blocks' => 'default',
		'nux' => 'default',
	);

	foreach ( $packages_dependencies as $package => $dependencies ) {
		$handle  = 'wp-' . $package;
		$path    = "/wp-includes/js/dist/$package$suffix.js";
		$version = $packages_versions[ $package ];

		$scripts->add( $handle, $path, $dependencies, $version, 1 );

		if ( isset( $package_translations[ $package ] ) ) {
			$scripts->set_translations( $handle, $package_translations[ $package ] );
		}
	}
}