@ideasonpurpose/build-tools-wordpress 2.0.4 → 2.0.5

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,12 @@ 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.0.4
8
+
9
+ > 19 March 2025
10
+
11
+ - update GitHub Actions
12
+
7
13
  #### v2.0.3
8
14
 
9
15
  > 19 March 2025
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ideasonpurpose/build-tools-wordpress
2
2
 
3
- #### Version 2.0.4
3
+ #### Version 2.0.5
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)
@@ -29,6 +29,23 @@ Each project may optionally include an **ideasonpurpose.config.js** file in the
29
29
 
30
30
  -->
31
31
 
32
+ ## Local Development
33
+
34
+ Because this project makes use of bin scripts, conventional `npm link` workflows won't work correctly. To work on this code to work on a development project, change the project's package.json to install from a local file path, probably something like this:
35
+
36
+ ```json
37
+ "devDependencies": {
38
+ "@ideasonpurpose/build-tools-wordpress": "../../build-tools-wordpress"
39
+ }
40
+ ```
41
+
42
+ Running a simple watch script to re-install on changes will make things somewhat seamless:
43
+
44
+ ```sh
45
+ cd dev-project-working-dir
46
+ npm chokidar-cli "../../build-tools-wordpress/**/*" -c "npm install"
47
+
48
+
32
49
  ### Additional Notes
33
50
 
34
51
  This project expects an entirely ES Module based environment and specifies all dependencies using standard ESM import syntax. Projects importing this file should set `"type": "module"` in their package.json files.
@@ -46,3 +63,4 @@ A GitHub action will auto-publish version-tagged releases to npm. In order to pu
46
63
  <a href="https://www.ideasonpurpose.com"><img src="https://raw.githubusercontent.com/ideasonpurpose/ideasonpurpose/master/iop-logo-white-on-black-88px.png" height="44" align="top" alt="IOP Logo"></a><img src="https://raw.githubusercontent.com/ideasonpurpose/ideasonpurpose/master/spacer.png" align="middle" width="4" height="54"> This project is actively developed and used in production at <a href="https://www.ideasonpurpose.com">Ideas On Purpose</a>.
47
64
 
48
65
  <!-- END IOP CREDIT BLURB -->
66
+ ```
@@ -324,8 +324,11 @@ export default async (env) => {
324
324
 
325
325
  resolveLoader: {
326
326
  modules: [
327
- path.resolve("../tools/node_modules"),
328
- path.resolve("./node_modules"), // for local development when running outside of Docker
327
+ "node_modules",
328
+ new URL("../../build-tools-wordpress/node_modules", import.meta.url)
329
+ .pathname,
330
+ // path.resolve("../tools/node_modules"),
331
+ // path.resolve("./node_modules"), // for local development when running outside of Docker
329
332
  ],
330
333
  },
331
334
 
@@ -116,9 +116,10 @@ export async function devserverProxy(config) {
116
116
 
117
117
  originalBody = Buffer.concat(originalBody);
118
118
  let newBody;
119
- // TODO: Is there ever a case where content-type is missing?
120
- const type = proxyRes.headers["content-type"].split(";")[0];
121
- // const type = (proxyRes.headers["content-type"] || "").split(";")[0];
119
+
120
+ // const type = proxyRes.headers["content-type"]?.split(";")[0].trim() ?? null;
121
+ const type = proxyRes.headers["content-type"]?.split(";")[0].trim();
122
+
122
123
  const wpRegexp = new RegExp(
123
124
  "^/wp-(?:admin|includes|content/plugins).*(?:css|js|map)$",
124
125
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ideasonpurpose/build-tools-wordpress",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
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": {
@@ -20,13 +20,14 @@
20
20
  "main": "index.js",
21
21
  "bin": {
22
22
  "iop-build-port-reporter": "./bin/port-reporter.js",
23
- "iop-project-init": "./bin/project-init.js",
24
- "iop-build-zip-archive": "./bin/zip.js"
23
+ "iop-build-zip-archive": "./bin/zip.js",
24
+ "iop-project-init": "./bin/project-init.js"
25
25
  },
26
26
  "directories": {
27
27
  "lib": "lib"
28
28
  },
29
29
  "scripts": {
30
+ "test": "vitest",
30
31
  "version": "version-everything && auto-changelog && git add -u"
31
32
  },
32
33
  "prettier": "@ideasonpurpose/prettier-config",