Skip to content

Commit

Permalink
Merge pull request #217 from humanmade/update-externals
Browse files Browse the repository at this point in the history
Update externals for WP 6.2 and add snapshot update command
  • Loading branch information
Sephsekla committed Jun 16, 2023
2 parents 65369a3 + 9b1a45a commit 00e4bb3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"scripts": {
"lint": "eslint .",
"test": "jest",
"update-snapshot": "jest --updateSnapshot",
"test-build": "rm -rf test/build && webpack --config=test/test-config.js",
"test-dev-server": "webpack-dev-server --config=test/test-config.js"
},
Expand Down
15 changes: 15 additions & 0 deletions src/__snapshots__/externals.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,30 @@ Object {
"@wordpress/block-editor": "wp.blockEditor",
"@wordpress/block-library": "wp.blockLibrary",
"@wordpress/block-serialization-default-parser": "wp.blockSerializationDefaultParser",
"@wordpress/block-serialization-spec-parser": "wp.blockSerializationSpecParser",
"@wordpress/blocks": "wp.blocks",
"@wordpress/components": "wp.components",
"@wordpress/compose": "wp.compose",
"@wordpress/core-data": "wp.coreData",
"@wordpress/customize-widgets": "wp.customizeWidgets",
"@wordpress/data": "wp.data",
"@wordpress/data-controls": "wp.dataControls",
"@wordpress/date": "wp.date",
"@wordpress/deprecated": "wp.deprecated",
"@wordpress/dom": "wp.dom",
"@wordpress/dom-ready": "wp.domReady",
"@wordpress/edit-post": "wp.editPost",
"@wordpress/edit-site": "wp.editSite",
"@wordpress/edit-widgets": "wp.editWidgets",
"@wordpress/editor": "wp.editor",
"@wordpress/element": "wp.element",
"@wordpress/escape-html": "wp.escapeHtml",
"@wordpress/format-library": "wp.formatLibrary",
"@wordpress/hooks": "wp.hooks",
"@wordpress/html-entities": "wp.htmlEntities",
"@wordpress/i18n": "wp.i18n",
"@wordpress/icons": "wp.icons",
"@wordpress/interface": "wp.interface",
"@wordpress/is-shallow-equal": "wp.isShallowEqual",
"@wordpress/keyboard-shortcuts": "wp.keyboardShortcuts",
"@wordpress/keycodes": "wp.keycodes",
Expand All @@ -37,17 +43,26 @@ Object {
"@wordpress/notices": "wp.notices",
"@wordpress/nux": "wp.nux",
"@wordpress/plugins": "wp.plugins",
"@wordpress/preferences": "wp.preferences",
"@wordpress/preferences-persistence": "wp.preferencesPersistence",
"@wordpress/primitives": "wp.primitives",
"@wordpress/priority-queue": "wp.priorityQueue",
"@wordpress/private-apis": "wp.privateApis",
"@wordpress/react-i18n": "wp.reactI18n",
"@wordpress/react-native-aztec": "wp.reactNativeAztec",
"@wordpress/react-native-bridge": "wp.reactNativeBridge",
"@wordpress/react-native-editor": "wp.reactNativeEditor",
"@wordpress/redux-routine": "wp.reduxRoutine",
"@wordpress/reusable-blocks": "wp.reusableBlocks",
"@wordpress/rich-text": "wp.richText",
"@wordpress/server-side-render": "wp.serverSideRender",
"@wordpress/shortcode": "wp.shortcode",
"@wordpress/style-engine": "wp.styleEngine",
"@wordpress/token-list": "wp.tokenList",
"@wordpress/url": "wp.url",
"@wordpress/viewport": "wp.viewport",
"@wordpress/warning": "wp.warning",
"@wordpress/widgets": "wp.widgets",
"@wordpress/wordcount": "wp.wordcount",
"backbone": "Backbone",
"jquery": "jQuery",
Expand Down
19 changes: 18 additions & 1 deletion src/externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const camelCaseDash = require( './helpers/camel-case-dash' );
*/
module.exports = [
// See "dependencies" array from WordPress/gutenberg package.json.
// Up to date as of WordPress 6.2 https://github.com/WordPress/gutenberg/blob/wp/6.2/package.json
'a11y',
'annotations',
'api-fetch',
Expand All @@ -19,44 +20,60 @@ module.exports = [
'block-editor',
'block-library',
'block-serialization-default-parser',
'block-serialization-spec-parser',
'blocks',
'components',
'compose',
'core-data',
'customize-widgets',
'data',
'data-controls',
'date',
'deprecated',
'dom',
'dom-ready',
'edit-post',
'edit-site',
'edit-widgets',
'editor',
'element',
'escape-html',
'format-library',
'hooks',
'html-entities',
'i18n',
'icons',
'interface',
'is-shallow-equal',
'keyboard-shortcuts',
'keycodes',
'list-reusable-blocks',
'media-utils',
'notices',
'nux',
'plugins',
'preferences',
'preferences-persistence',
'primitives',
'priority-queue',
'private-apis',
'react-i18n',
'react-native-aztec',
'react-native-bridge',
'react-native-editor',
'redux-routine',
'reusable-blocks',
'rich-text',
'server-side-render',
'shortcode',
'style-engine',
'token-list',
'url',
'viewport',
'warning',
'widgets',
'wordcount',
// @wordpress/nux is no longer declared as a dependency in Gutenberg, however is left here for compatibility.
'nux',
].reduce( ( externals, name ) => ( {
...externals,
// Convert kebab-case package names as camelCase.
Expand Down

0 comments on commit 00e4bb3

Please sign in to comment.