-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge changes published in the Gutenberg plugin "release/19.6" branch
- Loading branch information
1 parent
3c61eb6
commit 41580fe
Showing
794 changed files
with
16,063 additions
and
10,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7661 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/66468 | ||
* https://github.com/WordPress/gutenberg/pull/66543 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7488 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/60622 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7498 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/60622 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7604 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/66285 | ||
* https://github.com/WordPress/gutenberg/pull/66302 | ||
* https://github.com/WordPress/gutenberg/pull/66306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
https://github.com/WordPress/wordpress-develop/pull/7643 | ||
|
||
* https://github.com/WordPress/gutenberg/pull/66432 |
46 changes: 46 additions & 0 deletions
46
bin/api-docs/gen-components-docs/get-subcomponent-descriptions.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import fs from 'node:fs/promises'; | ||
import babel from '@babel/core'; | ||
import { parse as commentParser } from 'comment-parser'; | ||
|
||
/** | ||
* Try to get subcomponent descriptions from the main component Object.assign() call. | ||
*/ | ||
export async function getDescriptionsForSubcomponents( | ||
filePath, | ||
mainComponentName | ||
) { | ||
const fileContent = await fs.readFile( filePath, 'utf8' ); | ||
const parsedFile = babel.parse( fileContent, { | ||
filename: filePath, | ||
} ); | ||
const mainComponent = parsedFile.program.body | ||
.filter( ( node ) => node.type === 'ExportNamedDeclaration' ) | ||
.flatMap( ( node ) => node.declaration?.declarations ) | ||
.find( ( node ) => node?.id.name === mainComponentName ); | ||
|
||
if ( | ||
! ( | ||
// If the main component export has `Object.assign( ... )` | ||
( | ||
mainComponent?.init?.type === 'CallExpression' && | ||
mainComponent?.init?.callee?.object?.name === 'Object' && | ||
mainComponent?.init?.callee?.property?.name === 'assign' | ||
) | ||
) | ||
) { | ||
return; | ||
} | ||
|
||
const properties = mainComponent?.init?.arguments[ 1 ]?.properties.map( | ||
( node ) => [ | ||
node.key.name, | ||
commentParser( `/*${ node.leadingComments?.[ 0 ].value }*/`, { | ||
spacing: 'preserve', | ||
} )?.[ 0 ]?.description, | ||
] | ||
); | ||
return Object.fromEntries( properties ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.