propagate-cli 1.9.30 → 1.9.32
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/bin/action/initialise.js +1 -1
- package/bin/configuration/version_1_0.js +1 -12
- package/bin/configuration.js +13 -33
- package/bin/releaseGraph.js +7 -7
- package/bin/versions.js +3 -7
- package/package.json +4 -3
package/bin/action/initialise.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const { createConfigurationFile, checkConfigurationFileExists } = require("../configuration"),
|
|
4
4
|
{ FAILED_INITIALISE_MESSAGE, SUCCESSFUL_INITIALISE_MESSAGE } = require("../messages");
|
|
5
5
|
|
|
6
6
|
function initialiseAction() {
|
|
@@ -24,17 +24,6 @@ function createConfiguration() {
|
|
|
24
24
|
return configuration;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function migrateConfigurationToVersion_1_0(configuration) {
|
|
28
|
-
const version = VERSION_1_0;
|
|
29
|
-
|
|
30
|
-
configuration = Object.assign(configuration, {
|
|
31
|
-
version
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return configuration;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
27
|
module.exports = {
|
|
38
|
-
createConfiguration
|
|
39
|
-
migrateConfigurationToVersion_1_0
|
|
28
|
+
createConfiguration
|
|
40
29
|
};
|
package/bin/configuration.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { configurationUtilities } = require("necessary");
|
|
3
|
+
const { versionUtilities, configurationUtilities } = require("necessary");
|
|
4
4
|
|
|
5
5
|
const { PROPAGATE } = require("./constants"),
|
|
6
|
-
{
|
|
6
|
+
{ createConfiguration } = require("./configuration/version_1_9"),
|
|
7
7
|
{ migrateConfigurationToVersion_1_3 } = require("./configuration/version_1_3"),
|
|
8
8
|
{ migrateConfigurationToVersion_1_7 } = require("./configuration/version_1_7"),
|
|
9
|
+
{ migrateConfigurationToVersion_1_9 } = require("./configuration/version_1_9"),
|
|
9
10
|
{ CONFIGURATION_FILE_DOES_NOT_EXIST_MESSAGE } = require("./messages"),
|
|
10
|
-
{
|
|
11
|
-
{ UNVERSIONED, VERSION_1_0, VERSION_1_3, VERSION_1_7, CURRENT_VERSION } = require("./versions");
|
|
11
|
+
{ VERSION_1_0, VERSION_1_3, VERSION_1_7, VERSION_1_9 } = require("./versions");
|
|
12
12
|
|
|
13
13
|
const { rc } = configurationUtilities,
|
|
14
|
+
{ migrate } = versionUtilities,
|
|
14
15
|
{ setRCBaseExtension, checkRCFileExists, updateRCFile, writeRCFile, readRCFile } = rc;
|
|
15
16
|
|
|
16
17
|
setRCBaseExtension(PROPAGATE);
|
|
@@ -75,37 +76,16 @@ function createConfigurationFile() {
|
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
function migrateConfigurationFile() {
|
|
78
|
-
let json = readRCFile()
|
|
79
|
-
configuration = json, ///
|
|
80
|
-
{ version = UNVERSIONED } = configuration;
|
|
79
|
+
let json = readRCFile();
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
const migrationMap = {
|
|
82
|
+
[ VERSION_1_0 ]: migrateConfigurationToVersion_1_3,
|
|
83
|
+
[ VERSION_1_3 ]: migrateConfigurationToVersion_1_7,
|
|
84
|
+
[ VERSION_1_7 ] :migrateConfigurationToVersion_1_9
|
|
85
|
+
},
|
|
86
|
+
latestVersion = VERSION_1_9;
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
case VERSION_1_0 :
|
|
90
|
-
configuration = migrateConfigurationToVersion_1_3(configuration);
|
|
91
|
-
|
|
92
|
-
break;
|
|
93
|
-
|
|
94
|
-
case VERSION_1_3 :
|
|
95
|
-
configuration = migrateConfigurationToVersion_1_7(configuration);
|
|
96
|
-
|
|
97
|
-
break;
|
|
98
|
-
|
|
99
|
-
case VERSION_1_7 :
|
|
100
|
-
configuration = migrateConfigurationToVersion_1_9(configuration);
|
|
101
|
-
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
({ version } = configuration);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
json = configuration; ///
|
|
88
|
+
json = migrate(json, migrationMap, latestVersion);
|
|
109
89
|
|
|
110
90
|
writeRCFile(json);
|
|
111
91
|
}
|
package/bin/releaseGraph.js
CHANGED
|
@@ -96,9 +96,9 @@ class ReleaseGraph {
|
|
|
96
96
|
nameToSubDirectoryPathMap = releaseMap.getNameToSubDirectoryPathMap(),
|
|
97
97
|
vertexNames = subDirectoryPaths; ///
|
|
98
98
|
|
|
99
|
-
dependencyDirectedGraph.
|
|
99
|
+
dependencyDirectedGraph.addVertexesByVertexNames(vertexNames);
|
|
100
100
|
|
|
101
|
-
devDependencyDirectedGraph.
|
|
101
|
+
devDependencyDirectedGraph.addVertexesByVertexNames(vertexNames);
|
|
102
102
|
|
|
103
103
|
subDirectoryPaths.forEach((subDirectoryPath) => {
|
|
104
104
|
const release = releaseMap.retrieveRelease(subDirectoryPath),
|
|
@@ -113,7 +113,7 @@ class ReleaseGraph {
|
|
|
113
113
|
sourceVertexName = dependencySubDirectoryPath, ///
|
|
114
114
|
targetVertexName = subDirectoryPath; ///
|
|
115
115
|
|
|
116
|
-
dependencyDirectedGraph.
|
|
116
|
+
dependencyDirectedGraph.addEdgeBySourceVertexNameAndTargetVertexName(sourceVertexName, targetVertexName);
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
|
|
@@ -125,7 +125,7 @@ class ReleaseGraph {
|
|
|
125
125
|
sourceVertexName = devDependencySubDirectoryPath, ///
|
|
126
126
|
targetVertexName = subDirectoryPath; ///
|
|
127
127
|
|
|
128
|
-
devDependencyDirectedGraph.
|
|
128
|
+
devDependencyDirectedGraph.addEdgeBySourceVertexNameAndTargetVertexName(sourceVertexName, targetVertexName);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
});
|
|
@@ -156,7 +156,7 @@ class ReleaseGraph {
|
|
|
156
156
|
const sourceVertexName = dependencySubDirectoryPath, ///
|
|
157
157
|
targetVertexName = dependentSubDirectoryPath; ///
|
|
158
158
|
|
|
159
|
-
const dependencyDirectedGraphEdgePresent = dependencyDirectedGraph.
|
|
159
|
+
const dependencyDirectedGraphEdgePresent = dependencyDirectedGraph.isEdgePresentBySourceVertexNameAndTargetVertexName(sourceVertexName, targetVertexName),
|
|
160
160
|
dependencyRelationPresent = dependencyDirectedGraphEdgePresent; ///
|
|
161
161
|
|
|
162
162
|
if (dependencyRelationPresent) {
|
|
@@ -165,7 +165,7 @@ class ReleaseGraph {
|
|
|
165
165
|
process.exit(1);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
const devDependencyDirectedGraphEdgePresent = devDependencyDirectedGraph.
|
|
168
|
+
const devDependencyDirectedGraphEdgePresent = devDependencyDirectedGraph.isEdgePresentBySourceVertexNameAndTargetVertexName(sourceVertexName, targetVertexName),
|
|
169
169
|
devDependencyRelationPresent = devDependencyDirectedGraphEdgePresent; ///
|
|
170
170
|
|
|
171
171
|
if (!devDependencyRelationPresent) {
|
|
@@ -175,7 +175,7 @@ class ReleaseGraph {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
if (dependencyRelease) {
|
|
178
|
-
dependencyDirectedGraph.
|
|
178
|
+
dependencyDirectedGraph.addEdgeBySourceVertexNameAndTargetVertexName(sourceVertexName, targetVertexName);
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
|
package/bin/versions.js
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
VERSION_1_0 = "1.0",
|
|
3
|
+
const VERSION_1_0 = "1.0",
|
|
5
4
|
VERSION_1_3 = "1.3",
|
|
6
5
|
VERSION_1_7 = "1.7",
|
|
7
|
-
VERSION_1_9 = "1.9"
|
|
8
|
-
CURRENT_VERSION = VERSION_1_9; ///
|
|
6
|
+
VERSION_1_9 = "1.9";
|
|
9
7
|
|
|
10
8
|
module.exports = {
|
|
11
|
-
UNVERSIONED,
|
|
12
9
|
VERSION_1_0,
|
|
13
10
|
VERSION_1_3,
|
|
14
11
|
VERSION_1_7,
|
|
15
|
-
VERSION_1_9
|
|
16
|
-
CURRENT_VERSION
|
|
12
|
+
VERSION_1_9
|
|
17
13
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "propagate-cli",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.32",
|
|
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,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"argumentative": "^2.0.15",
|
|
17
|
-
"necessary": "^11.
|
|
18
|
-
"occam-directed-graphs": "^3.0.
|
|
17
|
+
"necessary": "^11.9.0",
|
|
18
|
+
"occam-directed-graphs": "^3.0.50",
|
|
19
|
+
"sudo": "^1.0.3"
|
|
19
20
|
},
|
|
20
21
|
"scripts": {}
|
|
21
22
|
}
|