@ideasonpurpose/build-tools-wordpress 2.2.0 → 2.2.2

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
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### v2.2.1
8
+
9
+ > 9 September 2025
10
+
11
+ - tweak format-php-prettier, bump deps
12
+
13
+ #### v2.2.0
14
+
15
+ > 7 September 2025
16
+
17
+ - bump deps
18
+ - Update websocket reload for v5, cleanup
19
+ - Testing some watch fixes
20
+
7
21
  #### v2.1.11
8
22
 
9
23
  > 3 September 2025
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ideasonpurpose/build-tools-wordpress
2
2
 
3
- #### Version 2.2.0
3
+ #### Version 2.2.2
4
4
 
5
5
  [![NPM Version](https://img.shields.io/npm/v/%40ideasonpurpose%2Fbuild-tools-wordpress?logo=npm)](https://www.npmjs.com/package/@ideasonpurpose/build-tools-wordpress)
6
6
  [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ideasonpurpose/build-tools-wordpress/npm-publish.yml?logo=github&logoColor=white)](https://github.com/ideasonpurpose/build-tools-wordpress#readme)
@@ -126,6 +126,16 @@ export function unTokenizeHTML(tokenizedHTML, phpCodeBlocks) {
126
126
  return phpContent;
127
127
  }
128
128
 
129
+ /**
130
+ * Formats a mixed HTML & PHP file with these steps:
131
+ * 1. Tokenize PHP Blocks as HTML-safe and attribute-safe strings
132
+ * 2. Format the result as HTML
133
+ * 3. Un-tokenize HTML back to PHP
134
+ * 4. Format again as PHP
135
+ * 5. Overwrite the file
136
+ *
137
+ * @param {string} filepath - The path to the file to format (must be a valid file path).
138
+ */
129
139
  async function formatHTMLThenPHP(filepath) {
130
140
  try {
131
141
  const startTime = process.hrtime.bigint();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ideasonpurpose/build-tools-wordpress",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "Build scripts and dependencies for IOP's WordPress development environments.",
5
5
  "homepage": "https://github.com/ideasonpurpose/build-tools-wordpress#readme",
6
6
  "bugs": {
@@ -35,6 +35,7 @@
35
35
  "dependencies": {
36
36
  "@ideasonpurpose/prettier-config": "^1.0.1",
37
37
  "@ideasonpurpose/stylelint-config": "^1.1.1",
38
+ "@prettier/plugin-php": "^0.24.0",
38
39
  "@rollup/plugin-commonjs": "^28.0.6",
39
40
  "@rollup/plugin-json": "^6.1.0",
40
41
  "@rollup/plugin-node-resolve": "^16.0.1",
@@ -46,7 +47,7 @@
46
47
  "autoprefixer": "^10.4.21",
47
48
  "babel-loader": "^10.0.0",
48
49
  "caniuse-lite": "^1.0.30001741",
49
- "chalk": "^5.6.0",
50
+ "chalk": "^5.6.2",
50
51
  "chalk-cli": "^6.0.0",
51
52
  "classnames": "^2.5.1",
52
53
  "cli-truncate": "^5.0.0",
@@ -71,6 +72,7 @@
71
72
  "postcss": "^8.5.6",
72
73
  "postcss-loader": "^8.2.0",
73
74
  "postcss-scss": "^4.0.9",
75
+ "prettier": "^3.6.2",
74
76
  "pretty-hrtime": "^1.0.3",
75
77
  "read-package-up": "^11.0.0",
76
78
  "replacestream": "^4.0.3",