watchful-cli 1.7.20 → 1.7.21

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  const path = require("path");
4
4
 
5
- const { encode } = require("js-base64");
5
+ const { encodings } = require("necessary");
6
6
 
7
7
  const { SWC_CORE_PATH, BABEL_CORE_PATH } = require("../paths"),
8
8
  { readFile, writeFile, createParentDirectory } = require("../utilities/fileSystem"),
@@ -13,6 +13,8 @@ const { SWC_CORE_PATH, BABEL_CORE_PATH } = require("../paths"),
13
13
  SWC_NOT_INSTALLED_MESSAGE,
14
14
  BABEL_NOT_INSTALLED_MESSAGE } = require("../messages");
15
15
 
16
+ const { BASE64_ENCODING } = encodings;
17
+
16
18
  function createTranspileFileFunction(context) {
17
19
  const { debug, transpiler } = context,
18
20
  transpileFileFunction = (transpiler === BABEL) ?
@@ -124,7 +126,7 @@ function createSWCTranspileFileFunction(debug) {
124
126
  });
125
127
 
126
128
  const mapJSONString = JSON.stringify(mapJSON),
127
- base64EncodedMapJSONString = encode(mapJSONString);
129
+ base64EncodedMapJSONString = Buffer.from(mapJSONString).toString(BASE64_ENCODING);
128
130
 
129
131
  targetFileContent = `${code}
130
132
  ${SOURCE_MAP_PREAMBLE}${base64EncodedMapJSONString}`; ///
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "watchful-cli",
3
3
  "author": "James Smith",
4
- "version": "1.7.20",
4
+ "version": "1.7.21",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/watchful-cli",
7
7
  "description": "Incremental transpilation with bundling.",
@@ -15,7 +15,6 @@
15
15
  "dependencies": {
16
16
  "argumentative": "^2.0.14",
17
17
  "chokidar": "^3.3.1",
18
- "js-base64": "^3.7.2",
19
18
  "necessary": "^11.0.25"
20
19
  },
21
20
  "devDependencies": {},