Skip to content

Commit

Permalink
Create Block: Add missing viewScriptModule field (#59140)
Browse files Browse the repository at this point in the history
* Create Block: Add missing `viewScriptModule` field

* Update changelog

* Fix double space

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: c4rl0sbr4v0 <[email protected]>
  • Loading branch information
3 people authored Feb 17, 2024
1 parent 96cb434 commit b4fe3f4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/create-block-interactive-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a template for [`@wordpress/create-block`](https://github.com/WordPress/
This block template can be used by running the following command:

```bash
npx @wordpress/create-block --template @wordpress/create-block-interactive-template
npx @wordpress/create-block --template @wordpress/create-block-interactive-template
```

It requires Gutenberg 17.5 or higher.
Expand Down
2 changes: 1 addition & 1 deletion packages/create-block-tutorial-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a template for [`@wordpress/create-block`](https://github.com/WordPress/
This block template can be used by running the following command:

```bash
npx @wordpress/create-block --template @wordpress/create-block-tutorial-template
npx @wordpress/create-block --template @wordpress/create-block-tutorial-template
```

Use the default options when prompted in the terminal.
Expand Down
4 changes: 4 additions & 0 deletions packages/create-block/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Add missing `viewScriptModule` field ([#59140](https://github.com/WordPress/gutenberg/pull/59140)).

## 4.35.0 (2024-02-09)

## 4.34.0 (2024-01-24)
Expand Down
2 changes: 2 additions & 0 deletions packages/create-block/lib/init-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async function initBlockJSON( {
viewStyle,
render,
viewModule,
viewScriptModule,
viewScript,
customBlockJSON,
example,
Expand Down Expand Up @@ -66,6 +67,7 @@ async function initBlockJSON( {
viewStyle,
render,
viewModule,
viewScriptModule,
viewScript,
...customBlockJSON,
} ).filter( ( [ , value ] ) => !! value )
Expand Down
2 changes: 2 additions & 0 deletions packages/create-block/lib/scaffold.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = async (
viewStyle,
render,
viewModule,
viewScriptModule,
viewScript,
variantVars,
customPackageJSON,
Expand Down Expand Up @@ -88,6 +89,7 @@ module.exports = async (
viewStyle,
render,
viewModule,
viewScriptModule,
viewScript,
variantVars,
customPackageJSON,
Expand Down

1 comment on commit b4fe3f4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in b4fe3f4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7941930577
📝 Reported issues:

Please sign in to comment.