propagate-cli 1.9.31 → 1.9.33
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_3.js +1 -26
- package/bin/configuration/version_1_7.js +1 -27
- package/bin/configuration/version_1_9.js +3 -2
- package/bin/configuration.js +13 -33
- package/bin/versions.js +3 -7
- package/package.json +2 -2
- package/bin/configuration/version_1_0.js +0 -40
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() {
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { VERSION_1_3 } = require("../versions")
|
|
4
|
-
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults"),
|
|
5
|
-
git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
6
|
-
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
7
|
-
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
|
8
|
-
defaultShellCommands = {
|
|
9
|
-
git,
|
|
10
|
-
build,
|
|
11
|
-
publish
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function createConfiguration() {
|
|
15
|
-
const version = VERSION_1_3, ///
|
|
16
|
-
directories = [],
|
|
17
|
-
shellCommands = defaultShellCommands, ///
|
|
18
|
-
ignoredDependencies = [],
|
|
19
|
-
configuration = {
|
|
20
|
-
version,
|
|
21
|
-
directories,
|
|
22
|
-
shellCommands,
|
|
23
|
-
ignoredDependencies
|
|
24
|
-
} ;
|
|
25
|
-
|
|
26
|
-
return configuration;
|
|
27
|
-
}
|
|
3
|
+
const { VERSION_1_3 } = require("../versions");
|
|
28
4
|
|
|
29
5
|
function migrateConfigurationToVersion_1_3(configuration) {
|
|
30
6
|
const version = VERSION_1_3,
|
|
@@ -39,6 +15,5 @@ function migrateConfigurationToVersion_1_3(configuration) {
|
|
|
39
15
|
}
|
|
40
16
|
|
|
41
17
|
module.exports = {
|
|
42
|
-
createConfiguration,
|
|
43
18
|
migrateConfigurationToVersion_1_3
|
|
44
19
|
};
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { VERSION_1_7 } = require("../versions")
|
|
4
|
-
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults"),
|
|
5
|
-
git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
6
|
-
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
7
|
-
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
|
8
|
-
defaultShellCommands = {
|
|
9
|
-
git,
|
|
10
|
-
build,
|
|
11
|
-
publish
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function createConfiguration() {
|
|
15
|
-
const version = VERSION_1_7, ///
|
|
16
|
-
directories = [],
|
|
17
|
-
shellCommands = defaultShellCommands, ///
|
|
18
|
-
ignoredDependencies = [],
|
|
19
|
-
forcedDependencyRelations = [],
|
|
20
|
-
configuration = {
|
|
21
|
-
version,
|
|
22
|
-
directories,
|
|
23
|
-
shellCommands,
|
|
24
|
-
ignoredDependencies,
|
|
25
|
-
forcedDependencyRelations
|
|
26
|
-
} ;
|
|
27
|
-
|
|
28
|
-
return configuration;
|
|
29
|
-
}
|
|
3
|
+
const { VERSION_1_7 } = require("../versions");
|
|
30
4
|
|
|
31
5
|
function migrateConfigurationToVersion_1_7(configuration) {
|
|
32
6
|
const version = VERSION_1_7,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { VERSION_1_9 } = require("../versions"),
|
|
4
|
-
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_INSTALL_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults")
|
|
5
|
-
|
|
4
|
+
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_INSTALL_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults");
|
|
5
|
+
|
|
6
|
+
const git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
6
7
|
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
7
8
|
install = DEFAULT_INSTALL_SHELL_COMMANDS, ///
|
|
8
9
|
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
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/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.33",
|
|
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,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"argumentative": "^2.0.15",
|
|
17
|
-
"necessary": "^11.
|
|
17
|
+
"necessary": "^11.9.0",
|
|
18
18
|
"occam-directed-graphs": "^3.0.50",
|
|
19
19
|
"sudo": "^1.0.3"
|
|
20
20
|
},
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { VERSION_1_0 } = require("../versions"),
|
|
4
|
-
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults"),
|
|
5
|
-
git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
6
|
-
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
7
|
-
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
|
8
|
-
defaultShellCommands = {
|
|
9
|
-
git,
|
|
10
|
-
build,
|
|
11
|
-
publish
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function createConfiguration() {
|
|
15
|
-
const version = VERSION_1_0, ///
|
|
16
|
-
directories = [],
|
|
17
|
-
shellCommands = defaultShellCommands, ///
|
|
18
|
-
configuration = {
|
|
19
|
-
version,
|
|
20
|
-
directories,
|
|
21
|
-
shellCommands
|
|
22
|
-
} ;
|
|
23
|
-
|
|
24
|
-
return configuration;
|
|
25
|
-
}
|
|
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
|
-
module.exports = {
|
|
38
|
-
createConfiguration,
|
|
39
|
-
migrateConfigurationToVersion_1_0
|
|
40
|
-
};
|