@ideasonpurpose/build-tools-wordpress 2.0.3 → 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.
@@ -8,15 +8,17 @@ jobs:
8
8
  publish:
9
9
  name: Build and publish to npm
10
10
  # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
11
- runs-on: ubuntu-22.04
11
+ runs-on: ubuntu-24.04
12
12
  steps:
13
13
  # https://github.com/marketplace/actions/checkout
14
14
  - uses: actions/checkout@v4
15
+
15
16
  # https://github.com/actions/setup-node
16
17
  - uses: actions/setup-node@v4
17
18
  with:
18
- node-version: 20
19
+ node-version: 22
19
20
  registry-url: https://registry.npmjs.org/
21
+
20
22
  # - run: npm ci
21
23
  - run: npm publish
22
24
  env:
@@ -8,25 +8,19 @@ jobs:
8
8
  build:
9
9
  name: Build Release
10
10
  # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
11
- runs-on: ubuntu-22.04
11
+ runs-on: ubuntu-24.04
12
12
 
13
13
  steps:
14
14
  # https://github.com/marketplace/actions/checkout
15
15
  - uses: actions/checkout@v4
16
16
 
17
- - name: Set up REPO and TAG environment vars
17
+ - name: Set TAG environment variable
18
18
  run: |
19
- echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
20
- echo "TAG=${GITHUB_SHA:0:6}" >> $GITHUB_ENV
21
-
22
- - name: This run was triggered by a version tag, reset the $TAG variable to the tag name
23
- if: startsWith(github.ref, 'refs/tags/v')
24
- run: |
25
- echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
19
+ echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
26
20
 
27
21
  - name: Create GitHub release
28
- if: ${{ contains(github.ref, 'refs/tags/') }}
29
22
  env:
30
23
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31
24
  run: |
32
- gh release create v${TAG}
25
+ echo "Creating release for tag: ${TAG}"
26
+ gh release create "${TAG}" --generate-notes
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.0.4
8
+
9
+ > 19 March 2025
10
+
11
+ - update GitHub Actions
12
+
13
+ #### v2.0.3
14
+
15
+ > 19 March 2025
16
+
17
+ - bump deps
18
+ - update example files
19
+ - update devserver-proxy tests
20
+
7
21
  #### v2.0.2
8
22
 
9
23
  > 13 January 2025
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ideasonpurpose/build-tools-wordpress
2
2
 
3
- #### Version 2.0.3
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.3",
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",