balm-core 5.0.1 → 5.0.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/lib/balm.js CHANGED
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
5
5
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
@@ -1,6 +1,6 @@
1
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import dotenv from 'dotenv';
@@ -39,9 +39,9 @@ function gulpImagemin(customPlugins) {
39
39
  const plugins = customPlugins ?? getDefaultPlugins();
40
40
  (async () => {
41
41
  try {
42
- const data = await imagemin.buffer(file.contents, {
42
+ const data = Buffer.from(await imagemin.buffer(file.contents, {
43
43
  plugins
44
- });
44
+ }));
45
45
  const originalSize = file.contents.length;
46
46
  const optimizedSize = data.length;
47
47
  const saved = originalSize - optimizedSize;
@@ -1,6 +1,6 @@
1
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  // Reference `gulp-replace@1.1.4`
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class BalmTask {
@@ -31,6 +31,7 @@ class BalmTask {
31
31
  }
32
32
  get src() {
33
33
  return gulp.src(this.input, Object.assign({
34
+ encoding: false,
34
35
  allowEmpty: true
35
36
  }, this.gulpSrcOptions)).pipe(BalmJS.plugins.plumber(error => {
36
37
  BalmJS.logger.error(`${this.name} task`, error.message);
@@ -32,6 +32,7 @@ class BalmStyleTask extends BalmTask {
32
32
  const taskName = `${this.name} task`;
33
33
  const shouldUseSourceMap = !(BalmJS.config.env.isProd || BalmJS.config.styles.minify);
34
34
  let stream = gulp.src(this.input, Object.assign({
35
+ encoding: false,
35
36
  sourcemaps: shouldUseSourceMap,
36
37
  allowEmpty: true
37
38
  }, this.gulpSrcOptions)).pipe(BalmJS.plugins.plumber(function (error) {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import gulpSize from 'gulp-size';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import revAll from 'gulp-rev-all';
@@ -18,6 +18,11 @@ class CacheTask extends BalmJS.BalmTask {
18
18
  });
19
19
  this.defaultInput = [...defaultIncludes, ...defaultExcludes, ...(BalmJS.config.inFrontend ? [node.path.join(BalmJS.config.dest.base, '*.html')] : []), ...customIncludes, ...customExcludes];
20
20
  this.defaultOutput = BalmJS.config.inFrontend ? BalmJS.config.dest.base : BalmJS.config.dest.static;
21
+
22
+ // fix for gulp@5
23
+ this.gulpSrcOptions = {
24
+ base: BalmJS.config.dest.base
25
+ };
21
26
  }
22
27
  }
23
28
  export default CacheTask;
@@ -1,8 +1,8 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
5
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
6
6
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
7
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
8
8
  import { deleteAsync } from 'del';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class EndTask extends BalmJS.BalmTask {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class ExtraTask extends BalmJS.BalmTask {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class FontTask extends BalmJS.BalmTask {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { getDefaultImagePlugins } from '../../plugins/imagemin.js';
@@ -9,6 +9,7 @@ class ImageTask extends BalmJS.BalmTask {
9
9
  this.init();
10
10
  const balmImage = () => {
11
11
  return gulp.src(BalmJS.file.absPaths(this.input), {
12
+ encoding: false,
12
13
  since: gulp.lastRun(balmImage)
13
14
  }).pipe(BalmJS.plugins.plumber(error => {
14
15
  BalmJS.logger.error(`${this.name} task`, error);
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class LintTask extends BalmJS.BalmTask {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class MediaTask extends BalmJS.BalmTask {
@@ -1,8 +1,8 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
5
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
4
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
5
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
6
6
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
7
7
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
8
8
  import { build } from 'modernizr';
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  import { deleteAsync } from 'del';
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import mergeStream from '../../utilities/merge-stream.js';
@@ -77,7 +77,9 @@ class SpriteTask extends BalmJS.BalmTask {
77
77
  });
78
78
  spriteConfig.params = _classPrivateFieldGet(_getParams, this).call(this, spriteItem, spriteOptions);
79
79
  gulp.task(BalmJS.toNamespace(spriteTaskName), () => {
80
- const spriteData = gulp.src(spriteConfig.input).pipe(BalmJS.plugins.plumber(error => {
80
+ const spriteData = gulp.src(spriteConfig.input, {
81
+ encoding: false
82
+ }).pipe(BalmJS.plugins.plumber(error => {
81
83
  BalmJS.logger.error(`${this.name} task`, error.message);
82
84
  })).pipe($.spritesmith(spriteConfig.params));
83
85
  const imgStream = spriteData.img.pipe(gulp.dest(spriteConfig.imgOutput));
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class StartTask extends BalmJS.BalmTask {
@@ -1,4 +1,4 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
2
2
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
3
3
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
4
4
  class WorkboxSwTask extends BalmJS.BalmTask {
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import { PUBLIC_URL } from '../../config/constants.js';
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import mergeStream from '../../utilities/merge-stream.js';
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import { deleteAsync } from 'del';
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import detectPort from '../../utilities/detect-port.js';
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  var _urlProcessing = /*#__PURE__*/new WeakMap();
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
4
4
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
5
5
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
4
4
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
5
5
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
@@ -1,5 +1,5 @@
1
- function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
2
- function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
1
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
2
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
3
3
  function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
4
4
  function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
5
5
  import util from 'node:util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -44,17 +44,17 @@
44
44
  "@rollup/plugin-terser": "^0.4.4",
45
45
  "ansi-colors": "^4.1.3",
46
46
  "async": "^3.2.5",
47
- "autoprefixer": "^10.4.19",
47
+ "autoprefixer": "^10.4.20",
48
48
  "babel-loader": "^9.1.3",
49
49
  "browser-sync": "^3.0.2",
50
50
  "connect-history-api-fallback": "^2.0.0",
51
- "css-loader": "^7.1.1",
52
- "css-minimizer-webpack-plugin": "^6.0.0",
53
- "cssnano": "^7.0.1",
51
+ "css-loader": "^7.1.2",
52
+ "css-minimizer-webpack-plugin": "^7.0.0",
53
+ "cssnano": "^7.0.5",
54
54
  "del": "^7.1.0",
55
55
  "dotenv": "^16.4.5",
56
56
  "dotenv-expand": "^11.0.6",
57
- "esbuild": "^0.20.0",
57
+ "esbuild": "^0.23.0",
58
58
  "fancy-log": "^2.0.0",
59
59
  "gulp-eslint": "^6.0.0",
60
60
  "gulp-if": "^3.0.0",
@@ -64,47 +64,47 @@
64
64
  "gulp-size": "^5.0.0",
65
65
  "gulp-useref": "^5.0.0",
66
66
  "gulp-zip": "^6.0.0",
67
- "gulp.spritesmith": "^6.13.0",
68
- "html-loader": "^5.0.0",
67
+ "gulp.spritesmith": "^6.13.1",
68
+ "html-loader": "^5.1.0",
69
69
  "html-minifier": "^4.0.0",
70
70
  "html-webpack-plugin": "^5.6.0",
71
71
  "http-proxy-middleware": "^3.0.0",
72
- "imagemin": "^8.0.1",
72
+ "imagemin": "^9.0.0",
73
73
  "istextorbinary": "^9.5.0",
74
74
  "less": "^4.2.0",
75
75
  "mini-css-extract-plugin": "^2.9.0",
76
- "modernizr": "^3.13.0",
76
+ "modernizr": "^3.13.1",
77
77
  "parents": "^1.0.1",
78
78
  "plugin-error": "^2.0.1",
79
- "postcss": "^8.4.38",
79
+ "postcss": "^8.4.41",
80
80
  "postcss-flexbugs-fixes": "^5.0.2",
81
81
  "postcss-import": "^16.1.0",
82
- "postcss-load-config": "^5.1.0",
82
+ "postcss-load-config": "^6.0.1",
83
83
  "postcss-loader": "^8.1.1",
84
- "postcss-preset-env": "^9.5.11",
84
+ "postcss-preset-env": "^10.0.1",
85
85
  "pretty-bytes": "^6.1.1",
86
86
  "readable-stream": "^4.5.2",
87
87
  "replace-ext": "^2.0.0",
88
- "rollup": "^4.17.2",
89
- "sass": "^1.76.0",
90
- "sass-loader": "^14.2.1",
91
- "semver": "^7.6.0",
88
+ "rollup": "^4.20.0",
89
+ "sass": "^1.77.8",
90
+ "sass-loader": "^16.0.0",
91
+ "semver": "^7.6.3",
92
92
  "ssh2": "^1.15.0",
93
93
  "strip-ansi": "^7.1.0",
94
94
  "style-loader": "^4.0.0",
95
- "tailwindcss": "^3.4.3",
96
- "terser": "^5.30.4",
95
+ "tailwindcss": "^3.4.10",
96
+ "terser": "^5.31.6",
97
97
  "terser-webpack-plugin": "^5.3.10",
98
98
  "through2": "^4.0.2",
99
99
  "through2-concurrent": "^2.0.0",
100
- "tslib": "^2.6.2",
100
+ "tslib": "^2.6.3",
101
101
  "vinyl-sourcemaps-apply": "^0.2.1",
102
- "webpack": "^5.91.0",
102
+ "webpack": "^5.93.0",
103
103
  "webpack-bundle-analyzer": "^4.10.2",
104
- "webpack-dev-middleware": "^7.2.1",
104
+ "webpack-dev-middleware": "^7.3.0",
105
105
  "webpack-hot-middleware": "^2.26.1",
106
- "webpack-merge": "^5.10.0",
107
- "workbox-build": "^7.1.0"
106
+ "webpack-merge": "^6.0.1",
107
+ "workbox-build": "^7.1.1"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@types/async": "3",
@@ -112,11 +112,12 @@
112
112
  "@types/express": "4",
113
113
  "@types/fancy-log": "2",
114
114
  "@types/html-minifier": "4",
115
- "@types/imagemin": "8",
115
+ "@types/imagemin": "9",
116
116
  "@types/parents": "1",
117
117
  "@types/postcss-flexbugs-fixes": "5",
118
118
  "@types/readable-stream": "4",
119
119
  "@types/replace-ext": "2",
120
+ "@types/semver": "7",
120
121
  "@types/through2-concurrent": "2",
121
122
  "@types/webpack-bundle-analyzer": "4",
122
123
  "@types/webpack-hot-middleware": "2"
@@ -130,5 +131,5 @@
130
131
  "engines": {
131
132
  "node": ">=18.12.0"
132
133
  },
133
- "gitHead": "619d0e68949929109878b5237814761d987af55a"
134
+ "gitHead": "c0b70cc1a9042401efbdc47d4a2eee59f1f2df1b"
134
135
  }
@@ -38,9 +38,9 @@ function gulpImagemin(customPlugins) {
38
38
  const plugins = customPlugins ?? getDefaultPlugins();
39
39
  (async () => {
40
40
  try {
41
- const data = await imagemin.buffer(file.contents, {
41
+ const data = Buffer.from(await imagemin.buffer(file.contents, {
42
42
  plugins
43
- });
43
+ }));
44
44
  const originalSize = file.contents.length;
45
45
  const optimizedSize = data.length;
46
46
  const saved = originalSize - optimizedSize;
@@ -27,6 +27,7 @@ class BalmTask {
27
27
  get src() {
28
28
  return gulp
29
29
  .src(this.input, Object.assign({
30
+ encoding: false,
30
31
  allowEmpty: true
31
32
  }, this.gulpSrcOptions))
32
33
  .pipe(BalmJS.plugins.plumber((error) => {
@@ -37,6 +37,7 @@ class BalmStyleTask extends BalmTask {
37
37
  const shouldUseSourceMap = !(BalmJS.config.env.isProd || BalmJS.config.styles.minify);
38
38
  let stream = gulp
39
39
  .src(this.input, Object.assign({
40
+ encoding: false,
40
41
  sourcemaps: shouldUseSourceMap,
41
42
  allowEmpty: true
42
43
  }, this.gulpSrcOptions))
@@ -37,6 +37,9 @@ class CacheTask extends BalmJS.BalmTask {
37
37
  this.defaultOutput = BalmJS.config.inFrontend
38
38
  ? BalmJS.config.dest.base
39
39
  : BalmJS.config.dest.static;
40
+ this.gulpSrcOptions = {
41
+ base: BalmJS.config.dest.base
42
+ };
40
43
  }
41
44
  }
42
45
  export default CacheTask;
@@ -7,6 +7,7 @@ class ImageTask extends BalmJS.BalmTask {
7
7
  const balmImage = () => {
8
8
  return gulp
9
9
  .src(BalmJS.file.absPaths(this.input), {
10
+ encoding: false,
10
11
  since: gulp.lastRun(balmImage)
11
12
  })
12
13
  .pipe(BalmJS.plugins.plumber((error) => {
@@ -67,7 +67,7 @@ class SpriteTask extends BalmJS.BalmTask {
67
67
  spriteConfig.params = __classPrivateFieldGet(this, _SpriteTask_getParams, "f").call(this, spriteItem, spriteOptions);
68
68
  gulp.task(BalmJS.toNamespace(spriteTaskName), () => {
69
69
  const spriteData = gulp
70
- .src(spriteConfig.input)
70
+ .src(spriteConfig.input, { encoding: false })
71
71
  .pipe(BalmJS.plugins.plumber((error) => {
72
72
  BalmJS.logger.error(`${this.name} task`, error.message);
73
73
  }))