Skip to content

Commit 871e751

Browse files
Fix gulp-zip import and add consistent modified time to zip (#138)
* Fix yarn zip failing after gulp-zip 6.x update gulp-zip 6.x switched to ESM exports, so CommonJS require now returns an object with a default property instead of the function directly. Also added explicit modifiedTime option for consistent behavior. Fixes DES-1353 https://claude.ai/code/session_01YXpwhKnsb98MQHXC5c5HLW * Declare Node >=22.12.0 engine requirement gulp-zip 6.x is pure ESM, so require('gulp-zip').default only works on Node 22.12.0+ where synchronous require of ESM is enabled by default. Make the requirement explicit to surface a clear error on older Node versions instead of ERR_REQUIRE_ESM. https://claude.ai/code/session_01YXpwhKnsb98MQHXC5c5HLW * Remove unnecessary modifiedTime option from zip call The modifiedTime: new Date() option was speculative and unneeded. The gulp-zip 6.x default (preserve file stat mtimes) works correctly and matches the effective pre-6.x behavior. https://claude.ai/code/session_01YXpwhKnsb98MQHXC5c5HLW --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 65b90e0 commit 871e751

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {mergeLocales} = require('@tryghost/theme-translations/build');
88
// gulp plugins and utils
99
const livereload = require('gulp-livereload');
1010
const postcss = require('gulp-postcss');
11-
const zip = require('gulp-zip');
11+
const zip = require('gulp-zip').default;
1212
const concat = require('gulp-concat');
1313
const uglify = require('gulp-uglify');
1414
const beeper = require('beeper');

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"demo": "https://source.ghost.io",
55
"version": "1.6.0",
66
"engines": {
7-
"ghost": ">=5.0.0"
7+
"ghost": ">=5.0.0",
8+
"node": ">=22.12.0"
89
},
910
"license": "MIT",
1011
"scripts": {

0 commit comments

Comments
 (0)