Skip to content

Commit 5c9847f

Browse files
committed
merge(release): integrate develop into main
Merge origin/develop into origin/main in a local validation worktree for release preparation. Resolve package.json and bun.lock conflicts in favor of the validated develop dependency set, regenerate the Bun lockfile, and preserve the release changes already present on main.
2 parents f75d157 + c876472 commit 5c9847f

File tree

103 files changed

+6312
-2208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+6312
-2208
lines changed

.changeset/fresh-tomatoes-crash.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@node-minify/cli": patch
3+
"@node-minify/core": patch
4+
"@node-minify/run": patch
5+
"@node-minify/utils": patch
6+
---
7+
8+
Fix empty in-memory content handling, benchmark CLI defaults, subprocess close handling, and multi-output routing regressions.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@node-minify/core": patch
3+
---
4+
5+
Fix multi-format image output path handling when using `$1`, including wildcard image inputs.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@node-minify/action": patch
3+
"@node-minify/cssnano": patch
4+
"@node-minify/docs": patch
5+
"@node-minify/esbuild": patch
6+
"@node-minify/html-minifier": patch
7+
"@node-minify/imagemin": patch
8+
"@node-minify/lightningcss": patch
9+
"@node-minify/minify-html": patch
10+
"@node-minify/sharp": patch
11+
"@node-minify/svgo": patch
12+
"@node-minify/swc": patch
13+
---
14+
15+
chore(deps): refresh workspace dependencies
16+
17+
Update dependency ranges across the docs site, GitHub Action package, and published minifier wrappers.
18+
Align Bun pins used in CI with the repo package manager version and keep the docs CSS compatible with newer lint rules.

.changeset/tiny-crabs-jump.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@node-minify/core": patch
3+
"@node-minify/utils": patch
4+
---
5+
6+
fix: normalize cross-platform path handling in core and utils
7+
8+
Improves Windows/POSIX path compatibility for output directory resolution, wildcard handling, and public folder/minified path generation.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@node-minify/action": minor
3+
"@node-minify/utils": minor
4+
---
5+
6+
feat: add zero-config auto mode for GitHub Action with smart file discovery
7+
8+
Adds `auto: true` mode that automatically discovers and minifies files without explicit input/output configuration. Includes smart file type detection, default glob patterns for common source directories, and comprehensive ignore patterns. Also adds ignore patterns support to the wildcards utility function.

.github/actions/node-minify/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ runs:
8888
- name: Setup Bun
8989
uses: oven-sh/setup-bun@v2
9090
with:
91-
bun-version: "1.3.6"
91+
bun-version: "1.3.10"
9292

9393
- name: Install dependencies
9494
shell: bash

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Bun
3030
uses: oven-sh/setup-bun@v2
3131
with:
32-
bun-version: "1.3.6"
32+
bun-version: "1.3.10"
3333

3434
- name: Setup Node.js
3535
uses: actions/setup-node@v6

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: 📦 Setup Bun
2828
uses: oven-sh/setup-bun@v2
2929
with:
30-
bun-version: "1.3.6"
30+
bun-version: "1.3.10"
3131

3232
- name: ⚙️ Setup Node
3333
uses: actions/setup-node@v6

.github/workflows/release-action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Bun
3030
uses: oven-sh/setup-bun@v2
3131
with:
32-
bun-version: "1.3.6"
32+
bun-version: "1.3.10"
3333

3434
- name: Install dependencies
3535
run: bun install --frozen-lockfile

.github/workflows/test-action.yml

Lines changed: 168 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Bun
2525
uses: oven-sh/setup-bun@v2
2626
with:
27-
bun-version: "1.3.6"
27+
bun-version: "1.3.10"
2828

2929
- name: Install dependencies
3030
run: bun install --frozen-lockfile
@@ -101,6 +101,11 @@ jobs:
101101
input: "test-action/input.js"
102102
output: "test-action/output.min.js"
103103
compressor: "terser"
104+
auto: 'false'
105+
patterns: ''
106+
output-dir: 'dist'
107+
ignore: ''
108+
dry-run: 'false'
104109

105110
- name: Verify terser outputs
106111
env:
@@ -137,6 +142,11 @@ jobs:
137142
output: "test-action/output.esbuild.js"
138143
compressor: "esbuild"
139144
type: "js"
145+
auto: 'false'
146+
patterns: ''
147+
output-dir: 'dist'
148+
ignore: ''
149+
dry-run: 'false'
140150

141151
- name: Compare results
142152
env:
@@ -217,6 +227,11 @@ jobs:
217227
output: "test-action/output.min.css"
218228
compressor: "lightningcss"
219229
type: "css"
230+
auto: 'false'
231+
patterns: ''
232+
output-dir: 'dist'
233+
ignore: ''
234+
dry-run: 'false'
220235

221236
- name: Verify CSS output
222237
run: |
@@ -231,10 +246,161 @@ jobs:
231246
232247
cat test-action/output.min.css
233248
249+
test-zero-config:
250+
name: Test Zero Config (Auto Mode)
251+
runs-on: ubuntu-latest
252+
needs: build-action
253+
steps:
254+
- uses: actions/checkout@v4
255+
256+
- name: Download built action
257+
uses: actions/download-artifact@v4
258+
with:
259+
name: action-dist
260+
path: packages/action/dist/
261+
262+
- name: Setup Node.js
263+
uses: actions/setup-node@v4
264+
with:
265+
node-version: "20"
266+
267+
- name: Install compressors
268+
run: |
269+
mkdir -p /tmp/compressors && cd /tmp/compressors
270+
npm init -y
271+
npm install @node-minify/terser @node-minify/lightningcss
272+
mkdir -p $GITHUB_WORKSPACE/node_modules
273+
cp -r /tmp/compressors/node_modules/* $GITHUB_WORKSPACE/node_modules/
274+
275+
- name: Create test files
276+
run: |
277+
mkdir -p src
278+
cat > src/app.js << 'EOF'
279+
function hello() { console.log("hello world"); }
280+
EOF
281+
282+
cat > src/utils.js << 'EOF'
283+
export const add = (a, b) => a + b;
284+
EOF
285+
286+
cat > src/styles.css << 'EOF'
287+
body { margin: 0; padding: 0; }
288+
EOF
289+
290+
- name: Run auto mode
291+
uses: ./
292+
with:
293+
auto: "true"
294+
output-dir: "dist"
295+
296+
- name: Verify outputs
297+
run: |
298+
test -f dist/src/app.js || (echo "dist/src/app.js not found" && exit 1)
299+
test -f dist/src/utils.js || (echo "dist/src/utils.js not found" && exit 1)
300+
test -f dist/src/styles.css || (echo "dist/src/styles.css not found" && exit 1)
301+
echo "All output files created successfully"
302+
303+
test-zero-config-dry-run:
304+
name: Test Zero Config Dry Run
305+
runs-on: ubuntu-latest
306+
needs: build-action
307+
steps:
308+
- uses: actions/checkout@v4
309+
310+
- name: Download built action
311+
uses: actions/download-artifact@v4
312+
with:
313+
name: action-dist
314+
path: packages/action/dist/
315+
316+
- name: Setup Node.js
317+
uses: actions/setup-node@v4
318+
with:
319+
node-version: "20"
320+
321+
- name: Install compressor
322+
run: |
323+
mkdir -p /tmp/compressors && cd /tmp/compressors
324+
npm init -y
325+
npm install @node-minify/terser
326+
mkdir -p $GITHUB_WORKSPACE/node_modules
327+
cp -r /tmp/compressors/node_modules/* $GITHUB_WORKSPACE/node_modules/
328+
329+
- name: Create test file
330+
run: |
331+
mkdir -p src
332+
cat > src/app.js << 'EOF'
333+
function test() { return 42; }
334+
EOF
335+
336+
- name: Run dry-run mode
337+
uses: ./
338+
with:
339+
auto: "true"
340+
dry-run: "true"
341+
output-dir: "dist"
342+
343+
- name: Verify no output created
344+
run: |
345+
test ! -d dist || (echo "dist/ should not exist in dry-run" && exit 1)
346+
echo "Dry-run passed - no output created"
347+
348+
test-zero-config-custom-patterns:
349+
name: Test Zero Config Custom Patterns
350+
runs-on: ubuntu-latest
351+
needs: build-action
352+
steps:
353+
- uses: actions/checkout@v4
354+
355+
- name: Download built action
356+
uses: actions/download-artifact@v4
357+
with:
358+
name: action-dist
359+
path: packages/action/dist/
360+
361+
- name: Setup Node.js
362+
uses: actions/setup-node@v4
363+
with:
364+
node-version: "20"
365+
366+
- name: Install compressor
367+
run: |
368+
mkdir -p /tmp/compressors && cd /tmp/compressors
369+
npm init -y
370+
npm install @node-minify/terser
371+
mkdir -p $GITHUB_WORKSPACE/node_modules
372+
cp -r /tmp/compressors/node_modules/* $GITHUB_WORKSPACE/node_modules/
373+
374+
- name: Create files in custom directory
375+
run: |
376+
mkdir -p custom/path
377+
cat > custom/path/main.js << 'EOF'
378+
console.log("custom location");
379+
EOF
380+
381+
- name: Run with custom patterns
382+
uses: ./
383+
with:
384+
auto: "true"
385+
patterns: "custom/**/*.js"
386+
output-dir: "dist"
387+
388+
- name: Verify custom output
389+
run: |
390+
test -f dist/custom/path/main.js || (echo "dist/custom/path/main.js not found" && exit 1)
391+
echo "Custom patterns worked correctly"
392+
234393
test-summary:
235394
name: Summary
236395
runs-on: ubuntu-latest
237-
needs: [test-js-minification, test-css-minification]
396+
needs:
397+
[
398+
test-js-minification,
399+
test-css-minification,
400+
test-zero-config,
401+
test-zero-config-dry-run,
402+
test-zero-config-custom-patterns,
403+
]
238404
steps:
239405
- name: All tests passed
240406
run: echo "All node-minify action tests passed!"

0 commit comments

Comments
 (0)