propagate-cli 1.9.28 → 1.9.30

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.
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
 
3
- const { PROPAGATE_CLI } = require("../constants"),
4
- { getPackageVersion } = require("../utilities/packageJSON");
3
+ const { packageUtilities } = require("necessary");
4
+
5
+ const { PROPAGATE_CLI } = require("../constants");
6
+
7
+ const { getVersion } = packageUtilities;
5
8
 
6
9
  function versionAction() {
7
- const packageVersion = getPackageVersion(),
8
- version = packageVersion; ///
10
+ const version = getVersion(); ///
9
11
 
10
12
  console.log(`${PROPAGATE_CLI} version ${version}`);
11
13
  }
@@ -1,32 +1,17 @@
1
1
  "use strict";
2
2
 
3
- const { pathUtilities, arrayUtilities, fileSystemUtilities } = require("necessary");
3
+ const { pathUtilities, fileSystemUtilities } = require("necessary");
4
4
 
5
5
  const { PACKAGE_JSON } = require("../constants");
6
6
 
7
- const { second } = arrayUtilities,
8
- { concatenatePaths } = pathUtilities,
7
+ const { concatenatePaths } = pathUtilities,
9
8
  { readFile, writeFile, checkFileExists } = fileSystemUtilities;
10
9
 
11
- const utilitiesDirectoryName = __dirname, ///
12
- matches = utilitiesDirectoryName.match(/^(.+)\/bin\/utilities$/),
13
- secondMatch = second(matches),
14
- applicationDirectoryName = secondMatch, ///
15
- packageJSONFilePath = concatenatePaths(applicationDirectoryName, PACKAGE_JSON),
16
- packageJSONFile = readFile(packageJSONFilePath),
17
- packageJSON = JSON.parse(packageJSONFile),
18
- { version } = packageJSON,
19
- packageVersion = version; ///
20
-
21
- function getPackageVersion() {
22
- return packageVersion;
23
- }
24
-
25
10
  function readPackageJSONFile(subDirectoryPath) {
26
11
  let packageJSON = null;
27
12
 
28
13
  try {
29
- const packageJSONFilePath = packageJSONFilePathFromSubDirectoryPath(subDirectoryPath),
14
+ const packageJSONFilePath = concatenatePaths(subDirectoryPath, PACKAGE_JSON),
30
15
  packageJSONFIleExists = checkFileExists(packageJSONFilePath);
31
16
 
32
17
  if (packageJSONFIleExists) {
@@ -47,7 +32,7 @@ function writePackageJSONFile(subDirectoryPath, packageJSON) {
47
32
  let success;
48
33
 
49
34
  try {
50
- const packageJSONFilePath = packageJSONFilePathFromSubDirectoryPath(subDirectoryPath),
35
+ const packageJSONFilePath = concatenatePaths(subDirectoryPath, PACKAGE_JSON),
51
36
  packageJSONContent = JSON.stringify(packageJSON, null, " ") + "\n"; ///
52
37
 
53
38
  writeFile(packageJSONFilePath, packageJSONContent);
@@ -65,13 +50,6 @@ function writePackageJSONFile(subDirectoryPath, packageJSON) {
65
50
  }
66
51
 
67
52
  module.exports = {
68
- getPackageVersion,
69
53
  readPackageJSONFile,
70
54
  writePackageJSONFile
71
55
  };
72
-
73
- function packageJSONFilePathFromSubDirectoryPath(subDirectoryPath) {
74
- const packageJSONFilePath = concatenatePaths(subDirectoryPath, PACKAGE_JSON);
75
-
76
- return packageJSONFilePath;
77
- }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "propagate-cli",
3
3
  "author": "James Smith",
4
- "version": "1.9.28",
4
+ "version": "1.9.30",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/propagate-cli",
7
7
  "description": "Propagate updated packages throughout a project.",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "argumentative": "^2.0.15",
17
- "necessary": "^11.2.2",
18
- "occam-directed-graphs": "^3.0.28"
17
+ "necessary": "^11.8.4",
18
+ "occam-directed-graphs": "^3.0.44"
19
19
  },
20
20
  "scripts": {}
21
21
  }