@webikon/webentor-codemods 0.2.0 → 0.3.1
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 +35 -0
- package/migrations/__fixtures__/starter-2.1.1/after/composer.json +63 -0
- package/migrations/__fixtures__/starter-2.1.1/before/composer.json +63 -0
- package/migrations/__fixtures__/starter-2.1.1/customized/composer.json +55 -0
- package/migrations/__fixtures__/starter-2.1.2/after/composer.json +63 -0
- package/migrations/__fixtures__/starter-2.1.2/after/package.json +90 -0
- package/migrations/__fixtures__/starter-2.1.2/before/composer.json +63 -0
- package/migrations/__fixtures__/starter-2.1.2/before/package.json +86 -0
- package/migrations/__fixtures__/starter-2.1.2/customized/composer.json +26 -0
- package/migrations/__fixtures__/starter-2.1.2/customized/package.json +12 -0
- package/migrations/index.json +32 -0
- package/migrations/starter-2.1.1/README.md +95 -0
- package/migrations/starter-2.1.1/changelog/root.md +7 -0
- package/migrations/starter-2.1.1/changelog/theme.md +7 -0
- package/migrations/starter-2.1.1/rules/deps.yml +24 -0
- package/migrations/starter-2.1.2/README.md +93 -0
- package/migrations/starter-2.1.2/changelog/root.md +5 -0
- package/migrations/starter-2.1.2/changelog/theme.md +5 -0
- package/migrations/starter-2.1.2/rules/deps.yml +149 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Webentor Codemods Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
- Add the `starter-2.1.2` migration (theme **2.1.1 → 2.1.2**, WP 7.0 dependency
|
|
6
|
+
alignment). Selectable by id or `--package webentor-starter`. It does **not**
|
|
7
|
+
change the `webentor-core` ranges — core `0.15.4` is a transparent patch
|
|
8
|
+
within the existing `^0.15` (`pnpm up` / `composer update` pull it in-range).
|
|
9
|
+
- `deps.yml` (JSON): the complete manifest delta from the 2.1.1 baseline —
|
|
10
|
+
rewrites the six declared `@wordpress/*` ranges to the WP-7.0-bundled
|
|
11
|
+
versions, replaces the unused
|
|
12
|
+
`@wordpress/dependency-extraction-webpack-plugin` entry with
|
|
13
|
+
`@wordpress/compose`, and inserts the newly declared externalized imports
|
|
14
|
+
(`data`/`element`/`hooks`/`html-entities`, guarded so re-runs never
|
|
15
|
+
duplicate). Value-is-string guarded, idempotent; `composer.json` untouched.
|
|
16
|
+
- Changelog sync prepends the `2.1.2` block to the project root `changelog.md`
|
|
17
|
+
(marker `### 2.1.2`) and the theme `web/app/themes/*/changelog.md` (marker
|
|
18
|
+
`### Version 2.1.2`), matching the coupled starter + theme `2.1.2` bump.
|
|
19
|
+
|
|
20
|
+
## 0.3.0
|
|
21
|
+
|
|
22
|
+
- Add the `starter-2.1.1` migration (theme **2.1.0 → 2.1.1**, **Acorn 6 / Laravel
|
|
23
|
+
13**) — the first **package-scoped** migration (`appliesTo.package:
|
|
24
|
+
webentor-starter`), selectable by id or `--package webentor-starter`. It does
|
|
25
|
+
**not** bump `webentor-core`.
|
|
26
|
+
- `deps.yml` (JSON): rewrites the theme's `composer.json` `roots/acorn` to `^6.0`.
|
|
27
|
+
This is the complete dependency delta from the 2.1.0 baseline — `roots/acorn` is
|
|
28
|
+
the only change; `webikon/webentor-core` stays `^0.15` (it already covers the
|
|
29
|
+
transparent `0.15.1` patch). Scoped to `composer.json` (the project root
|
|
30
|
+
`composer.json` has no `roots/acorn`), value-is-string guarded, idempotent.
|
|
31
|
+
- Changelog sync prepends the `2.1.1` block to the project root `changelog.md`
|
|
32
|
+
(marker `### 2.1.1`) and the theme `web/app/themes/*/changelog.md` (marker
|
|
33
|
+
`### Version 2.1.1`), matching the coupled starter + theme `2.1.1` bump.
|
|
34
|
+
- The Acorn 6 `.env` runtime changes (pin `CACHE_PREFIX`/`SESSION_COOKIE`/
|
|
35
|
+
`REDIS_PREFIX` to preserve caches/sessions; rename `MAIL_ENCRYPTION` →
|
|
36
|
+
`MAIL_SCHEME`) are a documented manual step (see the migration README).
|
|
37
|
+
|
|
3
38
|
## 0.2.0
|
|
4
39
|
|
|
5
40
|
- **New capability — changelog sync.** A migration can now declare a `changelog`
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.1.0",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^6.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.15"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.1.0",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^5.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.15"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "acme/acme-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "1.4.0",
|
|
5
|
+
"description": "Acme project theme",
|
|
6
|
+
"homepage": "https://acme.example",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Acme s.r.o.",
|
|
10
|
+
"email": "dev@acme.example",
|
|
11
|
+
"homepage": "https://acme.example"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"repositories": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"autoload": {
|
|
21
|
+
"psr-4": {
|
|
22
|
+
"App\\": "app/"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"php": ">=8.3",
|
|
27
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
28
|
+
"log1x/acf-composer": "^3.4",
|
|
29
|
+
"log1x/sage-directives": "^2.0",
|
|
30
|
+
"log1x/sage-svg": "^2.0",
|
|
31
|
+
"roots/acorn": "^6.0",
|
|
32
|
+
"roots/acorn-prettify": "^1.0",
|
|
33
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
34
|
+
"webikon/webentor-core": "^0.15",
|
|
35
|
+
"wpackagist-plugin/safe-svg": "^2.2"
|
|
36
|
+
},
|
|
37
|
+
"require-dev": {
|
|
38
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
39
|
+
},
|
|
40
|
+
"config": {
|
|
41
|
+
"optimize-autoloader": true,
|
|
42
|
+
"preferred-install": "dist",
|
|
43
|
+
"sort-packages": true
|
|
44
|
+
},
|
|
45
|
+
"minimum-stability": "dev",
|
|
46
|
+
"prefer-stable": true,
|
|
47
|
+
"scripts": {
|
|
48
|
+
"post-autoload-dump": [
|
|
49
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
50
|
+
],
|
|
51
|
+
"lint": [
|
|
52
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^6.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.15"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webikon/webentor-theme",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite --configLoader runner",
|
|
11
|
+
"build": "vite build --configLoader runner",
|
|
12
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
13
|
+
"lint:js": "eslint resources/scripts resources/blocks",
|
|
14
|
+
"lint:css": "stylelint \"resources/**/*.{vue,css,sass,scss,less}\"",
|
|
15
|
+
"translate": "pnpm build && pnpm translate:pot && pnpm translate:update",
|
|
16
|
+
"translate:pot": "wp i18n make-pot . ./resources/languages/webentor.pot --include=\"parts,templates,app,resources\" --skip-block-json",
|
|
17
|
+
"translate:update": "wp i18n update-po ./resources/languages/webentor.pot ./resources/languages",
|
|
18
|
+
"translate:compile": "pnpm translate:mo && pnpm translate:js",
|
|
19
|
+
"translate:js": "wp i18n make-json ./resources/languages --pretty-print",
|
|
20
|
+
"translate:mo": "wp i18n make-mo ./resources/languages ./resources/languages",
|
|
21
|
+
"prettier-check": "prettier --check 'resources/**/*.{js,ts,tsx,css}'",
|
|
22
|
+
"prettier-check:js": "prettier --check 'resources/**/*.{js,ts,tsx}'",
|
|
23
|
+
"prettier-check:css": "prettier --check 'resources/**/*.css'",
|
|
24
|
+
"prettier-check:blade": "prettier --check 'resources/**/*.blade.php'",
|
|
25
|
+
"prettier-fix": "prettier --write 'resources/**/*.{js,ts,tsx,css}'",
|
|
26
|
+
"prettier-fix:js": "prettier --write 'resources/**/*.{js,ts,tsx}'",
|
|
27
|
+
"prettier-fix:css": "prettier --write 'resources/**/*.css'",
|
|
28
|
+
"prettier-fix:blade": "prettier --write 'resources/**/*.blade.php'",
|
|
29
|
+
"postinstall": "cd ../../../../ && husky",
|
|
30
|
+
"webentor:update": "pnpm up @webikon/webentor-core && composer update webikon/webentor-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@10up/block-components": "^1.22.2",
|
|
34
|
+
"@eslint/js": "^9.39.2",
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
36
|
+
"@kucrut/vite-for-wp": "^0.12.0",
|
|
37
|
+
"@roots/vite-plugin": "^2.2.0",
|
|
38
|
+
"@shufo/prettier-plugin-blade": "^1.16.2",
|
|
39
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
40
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
41
|
+
"@types/wordpress__block-editor": "^15.0.6",
|
|
42
|
+
"@vitejs/plugin-react": "^6.0.0",
|
|
43
|
+
"@webikon/webentor-core": "^0.15.0",
|
|
44
|
+
"@webikon/webentor-configs": "^1.1.0",
|
|
45
|
+
"@wordpress/block-editor": "^15.13.2",
|
|
46
|
+
"@wordpress/block-library": "^9.40.2",
|
|
47
|
+
"@wordpress/blocks": "^15.13.1",
|
|
48
|
+
"@wordpress/components": "^32.2.1",
|
|
49
|
+
"@wordpress/compose": "^7.40.1",
|
|
50
|
+
"@wordpress/data": "^10.40.1",
|
|
51
|
+
"@wordpress/element": "^6.40.1",
|
|
52
|
+
"@wordpress/hooks": "^4.40.1",
|
|
53
|
+
"@wordpress/html-entities": "^4.40.1",
|
|
54
|
+
"@wordpress/i18n": "^6.13.1",
|
|
55
|
+
"@wordpress/icons": "^11.7.1",
|
|
56
|
+
"eslint": "^9.39.2",
|
|
57
|
+
"eslint-config-prettier": "^10.1.8",
|
|
58
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
59
|
+
"eslint-plugin-react": "^7.37.5",
|
|
60
|
+
"husky": "^9.1.7",
|
|
61
|
+
"laravel-vite-plugin": "^3.0.0",
|
|
62
|
+
"lint-staged": "^16.4.0",
|
|
63
|
+
"patch-package": "^8.0.1",
|
|
64
|
+
"postcss": "^8.5.15",
|
|
65
|
+
"postcss-pxtorem": "^6.1.0",
|
|
66
|
+
"prettier": "^3.8.4",
|
|
67
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
68
|
+
"react": "^18.3.1",
|
|
69
|
+
"react-dom": "^18.3.1",
|
|
70
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
71
|
+
"stylelint": "^17.13.0",
|
|
72
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
73
|
+
"tailwindcss": "^4.3.1",
|
|
74
|
+
"typescript": "^5.9.3",
|
|
75
|
+
"typescript-eslint": "^8.61.1",
|
|
76
|
+
"vite": "^8.0.0",
|
|
77
|
+
"vite-plugin-external": "^6.2.2"
|
|
78
|
+
},
|
|
79
|
+
"lint-staged": {
|
|
80
|
+
"*.{js,ts,tsx}": "pnpm lint:js",
|
|
81
|
+
"*.css": "pnpm lint:css"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"@alpinejs/intersect": "^3.15.12",
|
|
85
|
+
"@imacrayon/alpine-ajax": "^0.12.6",
|
|
86
|
+
"alpinejs-masonry": "^1.0.16",
|
|
87
|
+
"lightgallery": "2.9.0"
|
|
88
|
+
},
|
|
89
|
+
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
|
90
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^6.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.15"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webikon/webentor-theme",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite --configLoader runner",
|
|
11
|
+
"build": "vite build --configLoader runner",
|
|
12
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
13
|
+
"lint:js": "eslint resources/scripts resources/blocks",
|
|
14
|
+
"lint:css": "stylelint \"resources/**/*.{vue,css,sass,scss,less}\"",
|
|
15
|
+
"translate": "pnpm build && pnpm translate:pot && pnpm translate:update",
|
|
16
|
+
"translate:pot": "wp i18n make-pot . ./resources/languages/webentor.pot --include=\"parts,templates,app,resources\" --skip-block-json",
|
|
17
|
+
"translate:update": "wp i18n update-po ./resources/languages/webentor.pot ./resources/languages",
|
|
18
|
+
"translate:compile": "pnpm translate:mo && pnpm translate:js",
|
|
19
|
+
"translate:js": "wp i18n make-json ./resources/languages --pretty-print",
|
|
20
|
+
"translate:mo": "wp i18n make-mo ./resources/languages ./resources/languages",
|
|
21
|
+
"prettier-check": "prettier --check 'resources/**/*.{js,ts,tsx,css}'",
|
|
22
|
+
"prettier-check:js": "prettier --check 'resources/**/*.{js,ts,tsx}'",
|
|
23
|
+
"prettier-check:css": "prettier --check 'resources/**/*.css'",
|
|
24
|
+
"prettier-check:blade": "prettier --check 'resources/**/*.blade.php'",
|
|
25
|
+
"prettier-fix": "prettier --write 'resources/**/*.{js,ts,tsx,css}'",
|
|
26
|
+
"prettier-fix:js": "prettier --write 'resources/**/*.{js,ts,tsx}'",
|
|
27
|
+
"prettier-fix:css": "prettier --write 'resources/**/*.css'",
|
|
28
|
+
"prettier-fix:blade": "prettier --write 'resources/**/*.blade.php'",
|
|
29
|
+
"postinstall": "cd ../../../../ && husky",
|
|
30
|
+
"webentor:update": "pnpm up @webikon/webentor-core && composer update webikon/webentor-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@10up/block-components": "^1.22.2",
|
|
34
|
+
"@eslint/js": "^9.39.2",
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
36
|
+
"@kucrut/vite-for-wp": "^0.12.0",
|
|
37
|
+
"@roots/vite-plugin": "^2.2.0",
|
|
38
|
+
"@shufo/prettier-plugin-blade": "^1.16.2",
|
|
39
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
40
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
41
|
+
"@types/wordpress__block-editor": "^15.0.6",
|
|
42
|
+
"@vitejs/plugin-react": "^6.0.0",
|
|
43
|
+
"@webikon/webentor-core": "^0.15.0",
|
|
44
|
+
"@webikon/webentor-configs": "^1.1.0",
|
|
45
|
+
"@wordpress/block-editor": "^15.21.1",
|
|
46
|
+
"@wordpress/block-library": "^9.48.1",
|
|
47
|
+
"@wordpress/blocks": "^15.21.1",
|
|
48
|
+
"@wordpress/components": "^35.0.1",
|
|
49
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.48.1",
|
|
50
|
+
"@wordpress/i18n": "^6.21.1",
|
|
51
|
+
"@wordpress/icons": "^14.0.1",
|
|
52
|
+
"eslint": "^9.39.2",
|
|
53
|
+
"eslint-config-prettier": "^10.1.8",
|
|
54
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
55
|
+
"eslint-plugin-react": "^7.37.5",
|
|
56
|
+
"husky": "^9.1.7",
|
|
57
|
+
"laravel-vite-plugin": "^3.0.0",
|
|
58
|
+
"lint-staged": "^16.4.0",
|
|
59
|
+
"patch-package": "^8.0.1",
|
|
60
|
+
"postcss": "^8.5.15",
|
|
61
|
+
"postcss-pxtorem": "^6.1.0",
|
|
62
|
+
"prettier": "^3.8.4",
|
|
63
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
64
|
+
"react": "^18.3.1",
|
|
65
|
+
"react-dom": "^18.3.1",
|
|
66
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
67
|
+
"stylelint": "^17.13.0",
|
|
68
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
69
|
+
"tailwindcss": "^4.3.1",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.61.1",
|
|
72
|
+
"vite": "^8.0.0",
|
|
73
|
+
"vite-plugin-external": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"lint-staged": {
|
|
76
|
+
"*.{js,ts,tsx}": "pnpm lint:js",
|
|
77
|
+
"*.css": "pnpm lint:css"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@alpinejs/intersect": "^3.15.12",
|
|
81
|
+
"@imacrayon/alpine-ajax": "^0.12.6",
|
|
82
|
+
"alpinejs-masonry": "^1.0.16",
|
|
83
|
+
"lightgallery": "2.9.0"
|
|
84
|
+
},
|
|
85
|
+
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
|
86
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "acme/acme-project",
|
|
3
|
+
"type": "project",
|
|
4
|
+
"description": "Acme project root (Bedrock) — no theme-level dependencies here",
|
|
5
|
+
"homepage": "https://acme.example",
|
|
6
|
+
"repositories": [
|
|
7
|
+
{
|
|
8
|
+
"type": "composer",
|
|
9
|
+
"url": "https://wpackagist.org"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"require": {
|
|
13
|
+
"php": ">=8.3",
|
|
14
|
+
"composer/installers": "^2.3",
|
|
15
|
+
"roots/bedrock-autoloader": "^1.0",
|
|
16
|
+
"roots/wordpress": "^6.9",
|
|
17
|
+
"wpackagist-plugin/safe-svg": "^2.2"
|
|
18
|
+
},
|
|
19
|
+
"config": {
|
|
20
|
+
"optimize-autoloader": true,
|
|
21
|
+
"preferred-install": "dist",
|
|
22
|
+
"sort-packages": true
|
|
23
|
+
},
|
|
24
|
+
"minimum-stability": "dev",
|
|
25
|
+
"prefer-stable": true
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "acme-project-tooling",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Acme project-root tooling manifest — none of the migrated dependencies live here",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"lint": "prettier --check ."
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"prettier": "^3.6.0"
|
|
11
|
+
}
|
|
12
|
+
}
|
package/migrations/index.json
CHANGED
|
@@ -32,6 +32,38 @@
|
|
|
32
32
|
{ "entry": "changelog/theme.md", "target": "web/app/themes/*/changelog.md", "marker": "### Version 2.1.0" }
|
|
33
33
|
],
|
|
34
34
|
"docs": "README.md"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "starter-2.1.1",
|
|
38
|
+
"title": "Upgrade consumer theme to Acorn 6 (Laravel 13) — theme 2.1.1",
|
|
39
|
+
"description": "Starter/theme-only release (no webentor-core bump): bump roots/acorn ^5.0 -> ^6.0 (Acorn 6 / Laravel 13) in the theme composer.json. webentor-core stays ^0.15 (covers the transparent 0.15.1 patch). The Acorn 6 .env changes (CACHE_PREFIX/SESSION_COOKIE/REDIS_PREFIX pinning, MAIL_ENCRYPTION -> MAIL_SCHEME) are a documented manual step (see README).",
|
|
40
|
+
"appliesTo": {
|
|
41
|
+
"package": "webentor-starter",
|
|
42
|
+
"from": "2.1.0",
|
|
43
|
+
"to": "2.1.1"
|
|
44
|
+
},
|
|
45
|
+
"rules": ["rules/deps.yml"],
|
|
46
|
+
"changelog": [
|
|
47
|
+
{ "entry": "changelog/root.md", "target": "changelog.md", "marker": "### 2.1.1" },
|
|
48
|
+
{ "entry": "changelog/theme.md", "target": "web/app/themes/*/changelog.md", "marker": "### Version 2.1.1" }
|
|
49
|
+
],
|
|
50
|
+
"docs": "README.md"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "starter-2.1.2",
|
|
54
|
+
"title": "Align consumer theme with the WP 7.0 runtime — theme 2.1.2",
|
|
55
|
+
"description": "Manifest-only release (package.json only, no webentor-core constraint change): align the @wordpress/* devDependency ranges with the versions WP 7.0 bundles (these deps are externalized to window.wp.*), declare the previously undeclared externalized imports (compose/data/element/hooks/html-entities), and replace the unused @wordpress/dependency-extraction-webpack-plugin. Core 0.15.4 (WP 7.0 inspector-spacing fixes) is a transparent in-range patch — pull it with pnpm up / composer update.",
|
|
56
|
+
"appliesTo": {
|
|
57
|
+
"package": "webentor-starter",
|
|
58
|
+
"from": "2.1.1",
|
|
59
|
+
"to": "2.1.2"
|
|
60
|
+
},
|
|
61
|
+
"rules": ["rules/deps.yml"],
|
|
62
|
+
"changelog": [
|
|
63
|
+
{ "entry": "changelog/root.md", "target": "changelog.md", "marker": "### 2.1.2" },
|
|
64
|
+
{ "entry": "changelog/theme.md", "target": "web/app/themes/*/changelog.md", "marker": "### Version 2.1.2" }
|
|
65
|
+
],
|
|
66
|
+
"docs": "README.md"
|
|
35
67
|
}
|
|
36
68
|
]
|
|
37
69
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# `starter-2.1.1` — upgrade a consumer theme to Acorn 6 (Laravel 13)
|
|
2
|
+
|
|
3
|
+
**Applies to:** consumer themes on the **2.1.0** baseline (webentor-core `0.15.x`).
|
|
4
|
+
This is a **starter/theme-only** release — it does **not** bump `webentor-core`, so
|
|
5
|
+
select it by id (or `--package webentor-starter`). Coming from an older baseline?
|
|
6
|
+
Run the `0.15.0` core codemod first.
|
|
7
|
+
|
|
8
|
+
Run from your project root:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
pnpm dlx @webikon/webentor-codemods run starter-2.1.1 # preview (dry-run)
|
|
12
|
+
pnpm dlx @webikon/webentor-codemods run starter-2.1.1 --apply # apply
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then reinstall, rebuild, and clear caches:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
# in the theme dir
|
|
19
|
+
composer update
|
|
20
|
+
wp acorn optimize:clear
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This migration has **one automated rule** (a `composer.json` dependency bump) plus
|
|
24
|
+
**manual `.env` steps** for the Acorn 6 runtime changes.
|
|
25
|
+
|
|
26
|
+
## 1. Dependency (`rules/deps.yml`, JSON)
|
|
27
|
+
|
|
28
|
+
Rewrites the theme's `roots/acorn` range to the **2.1.1 baseline** (`^6.0`). This is
|
|
29
|
+
the complete delta from the 2.1.0 baseline — only `roots/acorn` changed.
|
|
30
|
+
`webikon/webentor-core` stays `^0.15` (it already covers the transparent `0.15.1`
|
|
31
|
+
patch), so it is intentionally absent here. The rule matches `roots/acorn` by its
|
|
32
|
+
exact key (value-is-string guarded) and is scoped to `composer.json` via `files:`;
|
|
33
|
+
the project root `composer.json` has no `roots/acorn`, so only the theme manifest
|
|
34
|
+
matches.
|
|
35
|
+
|
|
36
|
+
| manifest | dependency | → range |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| composer.json | `roots/acorn` (major 5→6) | `^6.0` |
|
|
39
|
+
|
|
40
|
+
- **Idempotent:** re-running rewrites to the same range → no diff.
|
|
41
|
+
- **Baseline caveat:** the fix pins `^6.0`, so a project already *ahead* within the
|
|
42
|
+
major would be set back to it. Expected for a 2.1.0 → 2.1.1 upgrade.
|
|
43
|
+
|
|
44
|
+
After applying, run `composer update` to refresh `composer.lock`.
|
|
45
|
+
|
|
46
|
+
## 2. Acorn 6 runtime changes (manual `.env`)
|
|
47
|
+
|
|
48
|
+
Acorn 6 bundles Laravel 13. These are **not** codemodded — `.env` is project- and
|
|
49
|
+
environment-specific — so apply them by hand on each environment:
|
|
50
|
+
|
|
51
|
+
- **Cache / session / Redis prefixes.** Laravel 13 changed the default prefix and
|
|
52
|
+
cookie separators from underscores to hyphens. On an existing site this
|
|
53
|
+
**invalidates the object cache and logs out every session** unless you pin the
|
|
54
|
+
values explicitly:
|
|
55
|
+
|
|
56
|
+
```dotenv
|
|
57
|
+
CACHE_PREFIX=your_existing_prefix
|
|
58
|
+
SESSION_COOKIE=your_existing_cookie
|
|
59
|
+
REDIS_PREFIX=your_existing_prefix
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
A fresh project can ignore this (there is no cache/session to preserve).
|
|
63
|
+
|
|
64
|
+
- **Mail scheme.** If you set `MAIL_ENCRYPTION`, rename it to `MAIL_SCHEME`:
|
|
65
|
+
|
|
66
|
+
```diff
|
|
67
|
+
- MAIL_ENCRYPTION=tls
|
|
68
|
+
+ MAIL_SCHEME=smtps
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- **PHP floor.** Acorn 6 requires PHP `>=8.3` (already the theme's floor).
|
|
72
|
+
|
|
73
|
+
After any `.env` change, run `wp acorn optimize:clear`.
|
|
74
|
+
|
|
75
|
+
Reference: the starter theme's `composer.json` at theme 2.1.1, and the upstream
|
|
76
|
+
[Acorn v6 upgrade notes](https://roots.io/acorn/docs/upgrading-acorn/).
|
|
77
|
+
|
|
78
|
+
## Changelog sync
|
|
79
|
+
|
|
80
|
+
Prepends the `2.1.1` version block to the project's changelogs so they match the
|
|
81
|
+
stack:
|
|
82
|
+
|
|
83
|
+
- `changelog.md` (project root) ← `changelog/root.md` (marker `### 2.1.1`)
|
|
84
|
+
- `web/app/themes/*/changelog.md` ← `changelog/theme.md` (marker `### Version 2.1.1`)
|
|
85
|
+
|
|
86
|
+
Idempotent (skipped if the heading is already present) and additive (inserted under
|
|
87
|
+
the `# … Changelog` H1, above existing entries). If you've customized the changelog,
|
|
88
|
+
your entries are preserved.
|
|
89
|
+
|
|
90
|
+
## Relationship to `update-dependencies`
|
|
91
|
+
|
|
92
|
+
This codemod only encodes the `roots/acorn` major as the released theme baseline.
|
|
93
|
+
Routine third-party dependency maintenance (in-range patch/minor bumps) is a
|
|
94
|
+
separate concern handled by the `update-dependencies` flow and is not part of a
|
|
95
|
+
migration.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
### 2.1.1
|
|
2
|
+
|
|
3
|
+
- Bump the bundled theme to `2.1.1` — `roots/acorn` to `^6.0` (from `^5.0`), i.e. **Acorn 6 / Laravel 13**.
|
|
4
|
+
- **Requires consumer action on existing sites:** Laravel 13 changes the default cache-prefix / session-cookie / Redis-prefix separators (underscores → hyphens), which **invalidates the object cache and logs out all sessions** unless `CACHE_PREFIX`, `SESSION_COOKIE`, and `REDIS_PREFIX` are pinned in `.env`. Rename the SMTP `MAIL_ENCRYPTION` env var to `MAIL_SCHEME`. Acorn 6 requires PHP `>=8.3` (already the floor).
|
|
5
|
+
- After upgrading, run `composer update` then `wp acorn optimize:clear`.
|
|
6
|
+
- Bump `webentor-core` to `0.15.1` (transparent patch within the existing `^0.15` range: focal-point `<source srcset>` fix; no API change for consumers).
|
|
7
|
+
- Existing projects can apply the `roots/acorn` bump via `pnpm dlx @webikon/webentor-codemods run starter-2.1.1`; the `.env` changes are a documented manual step in that codemod's README.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
### Version 2.1.1
|
|
2
|
+
|
|
3
|
+
- Bump `roots/acorn` to `^6.0` (from `^5.0`) — Acorn 6 ships Laravel 13 components.
|
|
4
|
+
- **Breaking runtime behavior for existing sites:** Laravel 13 changes the default cache-prefix / session-cookie / Redis-prefix separators (underscores → hyphens), which **invalidates existing caches and logs out all sessions** unless `CACHE_PREFIX`, `SESSION_COOKIE`, and `REDIS_PREFIX` are pinned in `.env`. The SMTP `MAIL_ENCRYPTION` env var is renamed to `MAIL_SCHEME`. Requires PHP `>=8.3` (already the theme floor).
|
|
5
|
+
- After upgrading, run `composer update` then `wp acorn optimize:clear` to rebuild Acorn's cached bootstrap files.
|
|
6
|
+
- Bump `webentor-core` to `0.15.1` (within the existing `^0.15` range — no constraint change). Transparent patch: fixes focal-point cropping in responsive `<source srcset>` (no API change for consumers).
|
|
7
|
+
- The `roots/acorn` bump is reproducible in existing projects via `pnpm dlx @webikon/webentor-codemods run starter-2.1.1`; the `.env` changes above are a manual step (documented in the codemod README).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Dependency bump for the webentor-theme 2.1.1 upgrade (Acorn 6 / Laravel 13).
|
|
2
|
+
#
|
|
3
|
+
# Baseline = the 2.1.0 starter theme (webentor-core 0.15.x). This is the COMPLETE
|
|
4
|
+
# `git diff starter-v2.1.0 -- <theme>/composer.json` dependency delta to the 2.1.1
|
|
5
|
+
# baseline — only the `roots/acorn` major changed; everything else (including
|
|
6
|
+
# `webikon/webentor-core ^0.15`, which already covers the transparent 0.15.1 patch)
|
|
7
|
+
# carried over from 2.1.0 unchanged and is therefore absent here. Run the `0.15.0`
|
|
8
|
+
# codemod first if coming from an older baseline.
|
|
9
|
+
#
|
|
10
|
+
# Same shape as the 0.15.0 deps rules: one rule per dependency, matched by its
|
|
11
|
+
# exact key (anchored regex) with a value-is-string guard (so a config object that
|
|
12
|
+
# shares a key is never clobbered), rewritten to the 2.1.1 baseline range
|
|
13
|
+
# regardless of the consumer's current value. `files:` scopes the rule to
|
|
14
|
+
# composer.json (the project root composer.json has no `roots/acorn`, so only the
|
|
15
|
+
# theme manifest matches). `name`/`version` are never touched.
|
|
16
|
+
id: deps-roots-acorn-composer
|
|
17
|
+
language: json
|
|
18
|
+
files: ['**/composer.json']
|
|
19
|
+
rule:
|
|
20
|
+
kind: pair
|
|
21
|
+
all:
|
|
22
|
+
- has: { field: key, regex: '^"roots/acorn"$' }
|
|
23
|
+
- has: { field: value, kind: string }
|
|
24
|
+
fix: '"roots/acorn": "^6.0"'
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# `starter-2.1.2` — align a consumer theme with the WP 7.0 runtime
|
|
2
|
+
|
|
3
|
+
**Applies to:** consumer themes on the **2.1.1** baseline (webentor-core `0.15.x`,
|
|
4
|
+
Acorn 6). Coming from an older baseline? Run the `starter-2.1.1` codemod first.
|
|
5
|
+
|
|
6
|
+
Run from your project root:
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
pnpm dlx @webikon/webentor-codemods run starter-2.1.2 # preview (dry-run)
|
|
10
|
+
pnpm dlx @webikon/webentor-codemods run starter-2.1.2 --apply # apply
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Then reinstall, rebuild, and clear caches:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
# in the theme dir
|
|
17
|
+
pnpm install
|
|
18
|
+
pnpm up @webikon/webentor-core
|
|
19
|
+
composer update webikon/webentor-core
|
|
20
|
+
pnpm build
|
|
21
|
+
wp acorn optimize:clear
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This migration is **manifest-only** (one `rules/deps.yml`, JSON, `package.json`
|
|
25
|
+
only): no code changes are required in consumer themes, and `composer.json` is
|
|
26
|
+
untouched. Core `0.15.4` (WP 7.0 inspector-spacing fixes) is a transparent patch
|
|
27
|
+
within the existing `^0.15` range — the `pnpm up` / `composer update` commands
|
|
28
|
+
above pull it in; no constraint change is needed.
|
|
29
|
+
|
|
30
|
+
## 1. Dependencies (`rules/deps.yml`, JSON)
|
|
31
|
+
|
|
32
|
+
The **complete delta from the 2.1.1 baseline** — nothing else changed between the
|
|
33
|
+
baselines, so nothing else is encoded:
|
|
34
|
+
|
|
35
|
+
| manifest | dependency | → range |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| package.json | `@wordpress/block-editor` | `^15.13.2` |
|
|
38
|
+
| package.json | `@wordpress/block-library` | `^9.40.2` |
|
|
39
|
+
| package.json | `@wordpress/blocks` | `^15.13.1` |
|
|
40
|
+
| package.json | `@wordpress/components` (32.x = WP 7.0 runtime) | `^32.2.1` |
|
|
41
|
+
| package.json | `@wordpress/dependency-extraction-webpack-plugin` | **replaced by** `@wordpress/compose: ^7.40.1` |
|
|
42
|
+
| package.json | `@wordpress/data` | **added** `^10.40.1` |
|
|
43
|
+
| package.json | `@wordpress/element` | **added** `^6.40.1` |
|
|
44
|
+
| package.json | `@wordpress/hooks` | **added** `^4.40.1` |
|
|
45
|
+
| package.json | `@wordpress/html-entities` | **added** `^4.40.1` |
|
|
46
|
+
| package.json | `@wordpress/i18n` | `^6.13.1` |
|
|
47
|
+
| package.json | `@wordpress/icons` | `^11.7.1` |
|
|
48
|
+
|
|
49
|
+
Why the `@wordpress/*` ranges go *down*: these imports are externalized to
|
|
50
|
+
`window.wp.*`, so the code always runs against the Gutenberg packages **bundled
|
|
51
|
+
by the installed WP core** — declared ranges only drive types and lint, and the
|
|
52
|
+
2.1.2 baseline pins them to what **WP 7.0** ships instead of npm latest. The four
|
|
53
|
+
**added** packages were always imported through the externals but never declared;
|
|
54
|
+
declaring them makes their types resolve. The webpack dependency-extraction
|
|
55
|
+
plugin was a leftover from the pre-Vite toolchain and is not referenced anywhere.
|
|
56
|
+
|
|
57
|
+
Mechanics worth knowing:
|
|
58
|
+
|
|
59
|
+
- The plugin **removal** and the `@wordpress/compose` **addition** are one
|
|
60
|
+
in-place edit (the plugin's `package.json` entry is rewritten into the
|
|
61
|
+
`compose` entry), so the JSON stays valid and alphabetically ordered. Guarded:
|
|
62
|
+
if your manifest already declares `@wordpress/compose`, the swap is skipped to
|
|
63
|
+
avoid a duplicate key — remove the webpack-plugin entry by hand in that case.
|
|
64
|
+
- The four **insertions** are anchored on your `@wordpress/i18n` entry and
|
|
65
|
+
guarded on `@wordpress/data` being absent, so re-running never duplicates them.
|
|
66
|
+
Two complementary i18n rules (insert-owned vs rewrite-only) can never both
|
|
67
|
+
fire.
|
|
68
|
+
- **Idempotent:** re-running rewrites everything to the same ranges → no diff.
|
|
69
|
+
- **Baseline caveat:** ranges are pinned to the 2.1.2 baseline, so a project
|
|
70
|
+
already *ahead* of it would be set back. Expected for a 2.1.1 → 2.1.2 upgrade.
|
|
71
|
+
(If your fleet still runs a WP older than 7.0, hold this migration until the
|
|
72
|
+
WP core update — the whole point is matching the WP bundle.)
|
|
73
|
+
|
|
74
|
+
After applying, run `pnpm install` (refreshes `pnpm-lock.yaml`).
|
|
75
|
+
|
|
76
|
+
## Changelog sync
|
|
77
|
+
|
|
78
|
+
Prepends the `2.1.2` version block to the project's changelogs so they match the
|
|
79
|
+
stack:
|
|
80
|
+
|
|
81
|
+
- `changelog.md` (project root) ← `changelog/root.md` (marker `### 2.1.2`)
|
|
82
|
+
- `web/app/themes/*/changelog.md` ← `changelog/theme.md` (marker `### Version 2.1.2`)
|
|
83
|
+
|
|
84
|
+
Idempotent (skipped if the heading is already present) and additive (inserted under
|
|
85
|
+
the `# … Changelog` H1, above existing entries). If you've customized the changelog,
|
|
86
|
+
your entries are preserved.
|
|
87
|
+
|
|
88
|
+
## Relationship to `update-dependencies`
|
|
89
|
+
|
|
90
|
+
This codemod encodes the released 2.1.2 theme baseline only. Routine third-party
|
|
91
|
+
dependency maintenance stays with the `update-dependencies` flow; future
|
|
92
|
+
WP-upgrade audits (which `@wordpress/*` ranges to align next) come from the
|
|
93
|
+
`gutenberg-packages-audit` skill.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
### 2.1.2
|
|
2
|
+
|
|
3
|
+
- Bump the bundled theme to `2.1.2` — `@wordpress/*` devDependencies aligned with the versions WP 7.0 actually bundles (they are externalized to `window.wp.*` at runtime), including newly declared `compose`/`data`/`element`/`hooks`/`html-entities` and removal of the unused `@wordpress/dependency-extraction-webpack-plugin`.
|
|
4
|
+
- Bump `webentor-core` to `0.15.4` (transparent patch within the existing `^0.15` range: restores inspector-control spacing under WP 7.0's `__nextHasNoMarginBottom` default flip; editor-only, no API change).
|
|
5
|
+
- Existing projects can apply the manifest changes via `pnpm dlx @webikon/webentor-codemods run starter-2.1.2`, then `pnpm up @webikon/webentor-core` and `composer update webikon/webentor-core`.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
### Version 2.1.2
|
|
2
|
+
|
|
3
|
+
- **Align `@wordpress/*` devDependencies with the WP 7.0 runtime.** These imports are externalized to `window.wp.*`, so the WP-bundled versions are what actually runs; declared ranges now match them instead of npm latest: `components` `^32.2.1`, `icons` `^11.7.1`, `block-editor` `^15.13.2`, `blocks` `^15.13.1`, `block-library` `^9.40.2`, `i18n` `^6.13.1`. Newly declares the externalized imports the theme/core code uses (`compose` `^7.40.1`, `data` `^10.40.1`, `element` `^6.40.1`, `hooks` `^4.40.1`, `html-entities` `^4.40.1`) and removes the unused webpack-era `@wordpress/dependency-extraction-webpack-plugin`. Types/lint-only; runtime is unchanged.
|
|
4
|
+
- Bump `webentor-core` to `0.15.4` (within the existing `^0.15` range — no constraint change). Transparent patch: restores inspector-control spacing under WordPress 7.0 (`__nextHasNoMarginBottom` default flip in `@wordpress/components` 32) — editor-only, no template or API changes.
|
|
5
|
+
- Existing projects can apply the manifest alignment via `pnpm dlx @webikon/webentor-codemods run starter-2.1.2` (dry-run by default, `--apply` to write), then `pnpm up @webikon/webentor-core` and `composer update webikon/webentor-core`.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Dependency alignment for the webentor-theme 2.1.2 upgrade (WP 7.0 runtime).
|
|
2
|
+
#
|
|
3
|
+
# Baseline = the 2.1.1 starter theme (webentor-core 0.15.x). This is the COMPLETE
|
|
4
|
+
# `git diff starter-v2.1.1 -- <theme>/{package,composer}.json` dependency delta to
|
|
5
|
+
# the 2.1.2 baseline:
|
|
6
|
+
# - the six declared `@wordpress/*` ranges -> the versions WP 7.0 actually
|
|
7
|
+
# bundles (these deps are externalized to `window.wp.*`, so the WP bundle is
|
|
8
|
+
# the runtime; declared ranges only drive types/lint)
|
|
9
|
+
# - `@wordpress/dependency-extraction-webpack-plugin` (unused webpack-era
|
|
10
|
+
# leftover) is REPLACED IN PLACE by the newly declared `@wordpress/compose`
|
|
11
|
+
# (one edit = removal + addition, keeps JSON valid and alphabetical order)
|
|
12
|
+
# - `@wordpress/data`/`element`/`hooks`/`html-entities` are INSERTED before the
|
|
13
|
+
# `@wordpress/i18n` pair (previously undeclared externalized imports)
|
|
14
|
+
# The `webentor-core` ranges are intentionally NOT touched: core 0.15.4 is a
|
|
15
|
+
# transparent patch within the existing ^0.15 (pnpm up / composer update pull it
|
|
16
|
+
# in-range). Everything else carried over from 2.1.1 unchanged and is therefore
|
|
17
|
+
# absent here. Run the `starter-2.1.1` codemod first if coming from an older
|
|
18
|
+
# baseline; composer.json is untouched by this migration.
|
|
19
|
+
#
|
|
20
|
+
# Same shape as the earlier deps rules: matched by exact key (anchored regex)
|
|
21
|
+
# with a value-is-string guard, rewritten to the 2.1.2 baseline range regardless
|
|
22
|
+
# of the consumer's current value. `name`/`version` are never touched.
|
|
23
|
+
#
|
|
24
|
+
# Insert idempotency: the i18n pair is owned by exactly one of two complementary
|
|
25
|
+
# rules -- the INSERT rule fires only while `@wordpress/data` is absent (fresh
|
|
26
|
+
# 2.1.1 baseline); the plain i18n REWRITE fires only once `@wordpress/data` is
|
|
27
|
+
# present (already-migrated / re-run). Same idea guards the plugin->compose swap
|
|
28
|
+
# (skipped if `@wordpress/compose` already exists, so no duplicate key is ever
|
|
29
|
+
# produced; in that unlikely case remove the webpack plugin entry by hand).
|
|
30
|
+
id: deps-wp-block-editor
|
|
31
|
+
language: json
|
|
32
|
+
files: ['**/package.json']
|
|
33
|
+
rule:
|
|
34
|
+
kind: pair
|
|
35
|
+
all:
|
|
36
|
+
- has: { field: key, regex: '^"@wordpress/block-editor"$' }
|
|
37
|
+
- has: { field: value, kind: string }
|
|
38
|
+
fix: '"@wordpress/block-editor": "^15.13.2"'
|
|
39
|
+
---
|
|
40
|
+
id: deps-wp-block-library
|
|
41
|
+
language: json
|
|
42
|
+
files: ['**/package.json']
|
|
43
|
+
rule:
|
|
44
|
+
kind: pair
|
|
45
|
+
all:
|
|
46
|
+
- has: { field: key, regex: '^"@wordpress/block-library"$' }
|
|
47
|
+
- has: { field: value, kind: string }
|
|
48
|
+
fix: '"@wordpress/block-library": "^9.40.2"'
|
|
49
|
+
---
|
|
50
|
+
id: deps-wp-blocks
|
|
51
|
+
language: json
|
|
52
|
+
files: ['**/package.json']
|
|
53
|
+
rule:
|
|
54
|
+
kind: pair
|
|
55
|
+
all:
|
|
56
|
+
- has: { field: key, regex: '^"@wordpress/blocks"$' }
|
|
57
|
+
- has: { field: value, kind: string }
|
|
58
|
+
fix: '"@wordpress/blocks": "^15.13.1"'
|
|
59
|
+
---
|
|
60
|
+
id: deps-wp-components
|
|
61
|
+
language: json
|
|
62
|
+
files: ['**/package.json']
|
|
63
|
+
rule:
|
|
64
|
+
kind: pair
|
|
65
|
+
all:
|
|
66
|
+
- has: { field: key, regex: '^"@wordpress/components"$' }
|
|
67
|
+
- has: { field: value, kind: string }
|
|
68
|
+
fix: '"@wordpress/components": "^32.2.1"'
|
|
69
|
+
---
|
|
70
|
+
id: deps-wp-icons
|
|
71
|
+
language: json
|
|
72
|
+
files: ['**/package.json']
|
|
73
|
+
rule:
|
|
74
|
+
kind: pair
|
|
75
|
+
all:
|
|
76
|
+
- has: { field: key, regex: '^"@wordpress/icons"$' }
|
|
77
|
+
- has: { field: value, kind: string }
|
|
78
|
+
fix: '"@wordpress/icons": "^11.7.1"'
|
|
79
|
+
---
|
|
80
|
+
# Replace the unused webpack-era plugin entry with the newly declared
|
|
81
|
+
# @wordpress/compose (in place: removal + addition in one edit). Guarded so a
|
|
82
|
+
# manifest that already declares @wordpress/compose is never given a duplicate.
|
|
83
|
+
id: deps-wp-depextract-to-compose
|
|
84
|
+
language: json
|
|
85
|
+
files: ['**/package.json']
|
|
86
|
+
rule:
|
|
87
|
+
kind: pair
|
|
88
|
+
all:
|
|
89
|
+
- has: { field: key, regex: '^"@wordpress/dependency-extraction-webpack-plugin"$' }
|
|
90
|
+
- has: { field: value, kind: string }
|
|
91
|
+
- inside:
|
|
92
|
+
kind: object
|
|
93
|
+
not:
|
|
94
|
+
has:
|
|
95
|
+
kind: pair
|
|
96
|
+
has: { field: key, regex: '^"@wordpress/compose"$' }
|
|
97
|
+
fix: '"@wordpress/compose": "^7.40.1"'
|
|
98
|
+
---
|
|
99
|
+
# Re-align @wordpress/compose wherever it is already declared (no-op right after
|
|
100
|
+
# the swap above; keeps deviant/already-migrated manifests on the baseline).
|
|
101
|
+
id: deps-wp-compose
|
|
102
|
+
language: json
|
|
103
|
+
files: ['**/package.json']
|
|
104
|
+
rule:
|
|
105
|
+
kind: pair
|
|
106
|
+
all:
|
|
107
|
+
- has: { field: key, regex: '^"@wordpress/compose"$' }
|
|
108
|
+
- has: { field: value, kind: string }
|
|
109
|
+
fix: '"@wordpress/compose": "^7.40.1"'
|
|
110
|
+
---
|
|
111
|
+
# INSERT rule: fresh 2.1.1 baseline (no @wordpress/data yet) — expands the i18n
|
|
112
|
+
# pair into the four newly declared packages + the realigned i18n itself.
|
|
113
|
+
id: deps-wp-insert-externalized-before-i18n
|
|
114
|
+
language: json
|
|
115
|
+
files: ['**/package.json']
|
|
116
|
+
rule:
|
|
117
|
+
kind: pair
|
|
118
|
+
all:
|
|
119
|
+
- has: { field: key, regex: '^"@wordpress/i18n"$' }
|
|
120
|
+
- has: { field: value, kind: string }
|
|
121
|
+
- inside:
|
|
122
|
+
kind: object
|
|
123
|
+
not:
|
|
124
|
+
has:
|
|
125
|
+
kind: pair
|
|
126
|
+
has: { field: key, regex: '^"@wordpress/data"$' }
|
|
127
|
+
fix: |-
|
|
128
|
+
"@wordpress/data": "^10.40.1",
|
|
129
|
+
"@wordpress/element": "^6.40.1",
|
|
130
|
+
"@wordpress/hooks": "^4.40.1",
|
|
131
|
+
"@wordpress/html-entities": "^4.40.1",
|
|
132
|
+
"@wordpress/i18n": "^6.13.1"
|
|
133
|
+
---
|
|
134
|
+
# REWRITE rule: complementary to the insert above — only fires once
|
|
135
|
+
# @wordpress/data exists, so the two rules can never both edit the i18n pair.
|
|
136
|
+
id: deps-wp-i18n
|
|
137
|
+
language: json
|
|
138
|
+
files: ['**/package.json']
|
|
139
|
+
rule:
|
|
140
|
+
kind: pair
|
|
141
|
+
all:
|
|
142
|
+
- has: { field: key, regex: '^"@wordpress/i18n"$' }
|
|
143
|
+
- has: { field: value, kind: string }
|
|
144
|
+
- inside:
|
|
145
|
+
kind: object
|
|
146
|
+
has:
|
|
147
|
+
kind: pair
|
|
148
|
+
has: { field: key, regex: '^"@wordpress/data"$' }
|
|
149
|
+
fix: '"@wordpress/i18n": "^6.13.1"'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webikon/webentor-codemods",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Reusable, polyglot codemods for migrating Webentor Stack consumer projects (theme PHP/TS/CSS/JSON) across webentor-core updates",
|
|
5
5
|
"homepage": "https://webikon.sk",
|
|
6
6
|
"license": "MIT",
|