@webikon/webentor-codemods 0.3.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 CHANGED
@@ -1,5 +1,22 @@
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
+
3
20
  ## 0.3.0
4
21
 
5
22
  - Add the `starter-2.1.1` migration (theme **2.1.0 → 2.1.1**, **Acorn 6 / Laravel
@@ -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
+ }
@@ -48,6 +48,22 @@
48
48
  { "entry": "changelog/theme.md", "target": "web/app/themes/*/changelog.md", "marker": "### Version 2.1.1" }
49
49
  ],
50
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"
51
67
  }
52
68
  ]
53
69
  }
@@ -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.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",