jscrambler 8.7.1-next.0 → 8.7.1-next.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/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # jscrambler
2
2
 
3
- ## 8.7.1-next.0
3
+ ## 8.7.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - []: Add filename on webpack-ignore-vendors
8
+
9
+ ## 8.7.1-next.1
4
10
 
5
11
  ### Patch Changes
6
12
 
package/dist/utils.js CHANGED
@@ -56,8 +56,9 @@ const WEBPACK_IGNORE_VENDORS = exports.WEBPACK_IGNORE_VENDORS = 'webpack-ignore-
56
56
  * @param {string} cwd current working directory, passed by argument
57
57
  * @param {string} path file path (file being parsed)
58
58
  * @param {Buffer} buffer file contents
59
+ * @param {string} fileName file name
59
60
  */
60
- function webpackAttachDisableAnnotations(beforeProtection, cwd, path, buffer) {
61
+ function webpackAttachDisableAnnotations(beforeProtection, cwd, path, buffer, fileName) {
61
62
  const {
62
63
  excludeModules
63
64
  } = beforeProtection;
@@ -69,7 +70,7 @@ function webpackAttachDisableAnnotations(beforeProtection, cwd, path, buffer) {
69
70
  range: true
70
71
  });
71
72
  } catch (e) {
72
- console.log("Error on beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): invalid source file."));
73
+ console.log("Error on beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): \"").concat(fileName, "\" could not be parsed."));
73
74
  process.exit(1);
74
75
  }
75
76
  const appendDisableAnnotationAt = [];
@@ -85,7 +86,7 @@ function webpackAttachDisableAnnotations(beforeProtection, cwd, path, buffer) {
85
86
  if (moduleId && excludeModules.has(moduleId)) {
86
87
  appendDisableAnnotationAt.push(node.value.start);
87
88
  if (debug) {
88
- console.debug("beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): ignoring ").concat(excludeModules.get(moduleId)));
89
+ console.debug("beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): ignoring ").concat(excludeModules.get(moduleId), " module on \"").concat(fileName, "\""));
89
90
  }
90
91
  return null;
91
92
  }
@@ -105,12 +106,12 @@ function webpackAttachDisableAnnotations(beforeProtection, cwd, path, buffer) {
105
106
  range: true
106
107
  });
107
108
  } catch (e) {
108
- console.log("Error on beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): ignoring webpack vendors produced an invalid javascript file."));
109
+ console.log("Error on beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): unsupported structure on \"").concat(fileName, "\"."));
109
110
  process.exit(1);
110
111
  }
111
112
  buffer = Buffer.from(s.toString(), 'utf8');
112
113
  }
113
- console.log("beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): ").concat(appendDisableAnnotationAt.length, " module(s) ignored"));
114
+ console.log("beforeProtection (".concat(WEBPACK_IGNORE_VENDORS, "): ").concat(appendDisableAnnotationAt.length, " module(s) ignored for \"").concat(fileName, "\""));
114
115
  return buffer;
115
116
  }
116
117
 
package/dist/zip.js CHANGED
@@ -71,10 +71,10 @@ async function zip(files, cwd, runBeforeProtection) {
71
71
  switch (element.type) {
72
72
  case _utils.APPEND_JS_TYPE:
73
73
  case _utils.PREPEND_JS_TYPE:
74
- buffer = (0, _utils.concatenate)(element, cwd, sPath, buffer);
74
+ buffer = (0, _utils.concatenate)(element, cwd, sPath, buffer, name);
75
75
  break;
76
76
  case _utils.WEBPACK_IGNORE_VENDORS:
77
- buffer = (0, _utils.webpackAttachDisableAnnotations)(element, cwd, sPath, buffer);
77
+ buffer = (0, _utils.webpackAttachDisableAnnotations)(element, cwd, sPath, buffer, name);
78
78
  break;
79
79
  }
80
80
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "8.7.1-next.0",
4
+ "version": "8.7.1-next.2",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <support@jscrambler.com>",
7
7
  "repository": {