@wordpress/create-block 3.1.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/lib/prompts.js +2 -1
- package/lib/templates/block/index.js.mustache +2 -1
- package/lib/templates/es5/.editorconfig.mustache +4 -0
- package/lib/templates/plugin/$slug.php.mustache +1 -1
- package/lib/templates/plugin/.editorconfig.mustache +4 -0
- package/lib/templates/plugin/readme.txt.mustache +1 -1
- package/package.json +4 -4
- package/lib/.DS_Store +0 -0
- package/lib/templates/.DS_Store +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 3.3.0 (2022-06-01)
|
|
6
|
+
|
|
7
|
+
### Enhancement
|
|
8
|
+
|
|
9
|
+
- Read the block name from `block.json` file in JavaScript files ([#41273](https://github.com/WordPress/gutenberg/pull/41273)).
|
|
10
|
+
|
|
11
|
+
## 3.2.0 (2022-05-18)
|
|
12
|
+
|
|
13
|
+
### Bug Fix
|
|
14
|
+
|
|
15
|
+
- Fix the `.editorconfig` file include to work correctly with YAML files ([#40994](https://github.com/WordPress/gutenberg/pull/40994)).
|
|
16
|
+
|
|
17
|
+
### Internal
|
|
18
|
+
|
|
19
|
+
- Updated `commander` dependency from requiring `^4.1.0` to `^9.2.0` ([#40927](https://github.com/WordPress/gutenberg/pull/40927)).
|
|
20
|
+
|
|
5
21
|
## 3.1.0 (2022-04-08)
|
|
6
22
|
|
|
7
23
|
### New Features
|
|
8
|
-
|
|
24
|
+
|
|
25
|
+
- Add `npmDevDependencies` template variable to allow definition of `devDependencies` as part of a template ([#39723](https://github.com/WordPress/gutenberg/pull/39723)).
|
|
9
26
|
|
|
10
27
|
## 3.0.0 (2022-03-03)
|
|
11
28
|
|
package/lib/prompts.js
CHANGED
|
@@ -88,7 +88,8 @@ const version = {
|
|
|
88
88
|
message: 'The current version number of the plugin:',
|
|
89
89
|
validate( input ) {
|
|
90
90
|
// Regular expression was copied from https://semver.org.
|
|
91
|
-
const validSemVerPattern =
|
|
91
|
+
const validSemVerPattern =
|
|
92
|
+
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
92
93
|
if ( ! validSemVerPattern.test( input ) ) {
|
|
93
94
|
return 'Invalid Semantic Version provided. Visit https://regex101.com/r/vkijKf/1/ to discover all valid patterns.';
|
|
94
95
|
}
|
|
@@ -19,13 +19,14 @@ import './style.scss';
|
|
|
19
19
|
*/
|
|
20
20
|
import Edit from './edit';
|
|
21
21
|
import save from './save';
|
|
22
|
+
import metadata from './block.json';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Every block starts by registering a new block type definition.
|
|
25
26
|
*
|
|
26
27
|
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
|
|
27
28
|
*/
|
|
28
|
-
registerBlockType(
|
|
29
|
+
registerBlockType( metadata.name, {
|
|
29
30
|
/**
|
|
30
31
|
* @see ./edit.js
|
|
31
32
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/create-block",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Generates PHP, JS and CSS code for registering a block for a WordPress plugin.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"wp-create-block": "./index.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@wordpress/lazy-import": "^1.4.
|
|
34
|
+
"@wordpress/lazy-import": "^1.4.2",
|
|
35
35
|
"chalk": "^4.0.0",
|
|
36
36
|
"check-node-version": "^4.1.0",
|
|
37
|
-
"commander": "^
|
|
37
|
+
"commander": "^9.2.0",
|
|
38
38
|
"execa": "^4.0.2",
|
|
39
39
|
"fast-glob": "^3.2.7",
|
|
40
40
|
"inquirer": "^7.1.0",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "48d5f37dfb52d2e77c8eeb662f9874cf141b8c6b"
|
|
52
52
|
}
|
package/lib/.DS_Store
DELETED
|
Binary file
|
package/lib/templates/.DS_Store
DELETED
|
Binary file
|