propagate-cli 1.9.67 → 1.10.0
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/configuration/version_1_10.js +53 -0
- package/bin/configuration/version_1_9.js +1 -30
- package/bin/configuration.js +22 -4
- package/bin/release.js +31 -1
- package/bin/versions.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { VERSION_1_10 } = require("../versions"),
|
|
4
|
+
{ DEFAULT_GIT_SHELL_COMMANDS, DEFAULT_INSTALL_SHELL_COMMANDS, DEFAULT_BUILD_SHELL_COMMANDS, DEFAULT_PUBLISH_SHELL_COMMANDS } = require("../defaults");
|
|
5
|
+
|
|
6
|
+
function createConfiguration() {
|
|
7
|
+
const git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
8
|
+
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
9
|
+
install = DEFAULT_INSTALL_SHELL_COMMANDS, ///
|
|
10
|
+
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
|
11
|
+
version = VERSION_1_10, ///
|
|
12
|
+
directories = [],
|
|
13
|
+
shellCommands = {
|
|
14
|
+
git,
|
|
15
|
+
build,
|
|
16
|
+
install,
|
|
17
|
+
publish
|
|
18
|
+
},
|
|
19
|
+
ignoredBuilds = [],
|
|
20
|
+
ignoredPublishes = [],
|
|
21
|
+
ignoredDependencies = [],
|
|
22
|
+
forcedDependencyRelations = [],
|
|
23
|
+
configuration = {
|
|
24
|
+
version,
|
|
25
|
+
directories,
|
|
26
|
+
shellCommands,
|
|
27
|
+
ignoredBuilds,
|
|
28
|
+
ignoredPublishes,
|
|
29
|
+
ignoredDependencies,
|
|
30
|
+
forcedDependencyRelations
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return configuration;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function migrateConfigurationToVersion_1_10(configuration) {
|
|
37
|
+
const version = VERSION_1_10, ///
|
|
38
|
+
ignoredBuilds = [],
|
|
39
|
+
ignoredPublishes = [];
|
|
40
|
+
|
|
41
|
+
configuration = Object.assign(configuration, {
|
|
42
|
+
version,
|
|
43
|
+
ignoredBuilds,
|
|
44
|
+
ignoredPublishes
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return configuration;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
createConfiguration,
|
|
52
|
+
migrateConfigurationToVersion_1_10
|
|
53
|
+
};
|
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { VERSION_1_9 } = require("../versions"),
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
const git = DEFAULT_GIT_SHELL_COMMANDS, ///
|
|
7
|
-
build = DEFAULT_BUILD_SHELL_COMMANDS, ///
|
|
8
|
-
install = DEFAULT_INSTALL_SHELL_COMMANDS, ///
|
|
9
|
-
publish = DEFAULT_PUBLISH_SHELL_COMMANDS, ///
|
|
10
|
-
defaultShellCommands = {
|
|
11
|
-
git,
|
|
12
|
-
build,
|
|
13
|
-
install,
|
|
14
|
-
publish
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
function createConfiguration() {
|
|
18
|
-
const version = VERSION_1_9, ///
|
|
19
|
-
directories = [],
|
|
20
|
-
shellCommands = defaultShellCommands, ///
|
|
21
|
-
ignoredDependencies = [],
|
|
22
|
-
forcedDependencyRelations = [],
|
|
23
|
-
configuration = {
|
|
24
|
-
version,
|
|
25
|
-
directories,
|
|
26
|
-
shellCommands,
|
|
27
|
-
ignoredDependencies,
|
|
28
|
-
forcedDependencyRelations
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return configuration;
|
|
32
|
-
}
|
|
4
|
+
{ DEFAULT_INSTALL_SHELL_COMMANDS } = require("../defaults");
|
|
33
5
|
|
|
34
6
|
function migrateConfigurationToVersion_1_9(configuration) {
|
|
35
7
|
const version = VERSION_1_9;
|
|
@@ -51,6 +23,5 @@ function migrateConfigurationToVersion_1_9(configuration) {
|
|
|
51
23
|
}
|
|
52
24
|
|
|
53
25
|
module.exports = {
|
|
54
|
-
createConfiguration,
|
|
55
26
|
migrateConfigurationToVersion_1_9
|
|
56
27
|
};
|
package/bin/configuration.js
CHANGED
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
const { versionUtilities, configurationUtilities } = require("necessary");
|
|
4
4
|
|
|
5
5
|
const { PROPAGATE } = require("./constants"),
|
|
6
|
-
{ createConfiguration } = require("./configuration/
|
|
6
|
+
{ createConfiguration } = require("./configuration/version_1_10"),
|
|
7
7
|
{ migrateConfigurationToVersion_1_3 } = require("./configuration/version_1_3"),
|
|
8
8
|
{ migrateConfigurationToVersion_1_7 } = require("./configuration/version_1_7"),
|
|
9
9
|
{ migrateConfigurationToVersion_1_9 } = require("./configuration/version_1_9"),
|
|
10
|
+
{ migrateConfigurationToVersion_1_10 } = require("./configuration/version_1_10"),
|
|
10
11
|
{ CONFIGURATION_FILE_DOES_NOT_EXIST_MESSAGE } = require("./messages"),
|
|
11
|
-
{ VERSION_1_0, VERSION_1_3, VERSION_1_7, VERSION_1_9 } = require("./versions");
|
|
12
|
+
{ VERSION_1_0, VERSION_1_3, VERSION_1_7, VERSION_1_9, VERSION_1_10 } = require("./versions");
|
|
12
13
|
|
|
13
14
|
const { rc } = configurationUtilities,
|
|
14
15
|
{ migrate } = versionUtilities,
|
|
@@ -30,6 +31,20 @@ function retrieveShellCommands() {
|
|
|
30
31
|
return shellCommands;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
function retrieveIgnoredBuilds() {
|
|
35
|
+
const configuration = readConfigurationFile(),
|
|
36
|
+
{ ignoredBuilds } = configuration;
|
|
37
|
+
|
|
38
|
+
return ignoredBuilds;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function retrieveIgnoredPublishes() {
|
|
42
|
+
const configuration = readConfigurationFile(),
|
|
43
|
+
{ ignoredPublishes } = configuration;
|
|
44
|
+
|
|
45
|
+
return ignoredPublishes;
|
|
46
|
+
}
|
|
47
|
+
|
|
33
48
|
function retrieveIgnoredDependencies() {
|
|
34
49
|
const configuration = readConfigurationFile(),
|
|
35
50
|
{ ignoredDependencies } = configuration;
|
|
@@ -83,9 +98,10 @@ function migrateConfigurationFile() {
|
|
|
83
98
|
const migrationMap = {
|
|
84
99
|
[ VERSION_1_0 ]: migrateConfigurationToVersion_1_3,
|
|
85
100
|
[ VERSION_1_3 ]: migrateConfigurationToVersion_1_7,
|
|
86
|
-
[ VERSION_1_7 ] :migrateConfigurationToVersion_1_9
|
|
101
|
+
[ VERSION_1_7 ] :migrateConfigurationToVersion_1_9,
|
|
102
|
+
[ VERSION_1_9 ] :migrateConfigurationToVersion_1_10
|
|
87
103
|
},
|
|
88
|
-
latestVersion =
|
|
104
|
+
latestVersion = VERSION_1_10;
|
|
89
105
|
|
|
90
106
|
json = migrate(json, migrationMap, latestVersion);
|
|
91
107
|
|
|
@@ -112,6 +128,8 @@ function assertConfigurationFileExists() {
|
|
|
112
128
|
module.exports = {
|
|
113
129
|
retrieveDirectories,
|
|
114
130
|
retrieveShellCommands,
|
|
131
|
+
retrieveIgnoredBuilds,
|
|
132
|
+
retrieveIgnoredPublishes,
|
|
115
133
|
retrieveIgnoredDependencies,
|
|
116
134
|
retrieveForcedDependencyRelations,
|
|
117
135
|
updateDirectories,
|
package/bin/release.js
CHANGED
|
@@ -4,7 +4,7 @@ const Version = require("./version");
|
|
|
4
4
|
|
|
5
5
|
const { execute } = require("./utilities/shell"),
|
|
6
6
|
{ readPackageJSONFile } = require("./utilities/packageJSON"),
|
|
7
|
-
{ retrieveShellCommands } = require("./configuration");
|
|
7
|
+
{ retrieveShellCommands, retrieveIgnoredBuilds, retrieveIgnoredPublishes } = require("./configuration");
|
|
8
8
|
|
|
9
9
|
class Release {
|
|
10
10
|
constructor(name, version, dependencyMap, devDependencyMap, subDirectoryPath) {
|
|
@@ -82,6 +82,21 @@ class Release {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
build(quietly, callback) {
|
|
85
|
+
const ignoredBuilds = retrieveIgnoredBuilds(),
|
|
86
|
+
names = ignoredBuilds,
|
|
87
|
+
namesIncludesName = names.includes(this.name),
|
|
88
|
+
buildIgnored = namesIncludesName; ///
|
|
89
|
+
|
|
90
|
+
if (buildIgnored) {
|
|
91
|
+
console.log(`Ignoring the '${this.name}' build.`);
|
|
92
|
+
|
|
93
|
+
const success = true;
|
|
94
|
+
|
|
95
|
+
callback(success);
|
|
96
|
+
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
85
100
|
let shellCommands = retrieveShellCommands();
|
|
86
101
|
|
|
87
102
|
const { build } = shellCommands,
|
|
@@ -93,6 +108,21 @@ class Release {
|
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
publish(quietly, callback) {
|
|
111
|
+
const ignoredPublishes = retrieveIgnoredPublishes(),
|
|
112
|
+
names = ignoredPublishes,
|
|
113
|
+
namesIncludesName = names.includes(this.name),
|
|
114
|
+
publishIgnored = namesIncludesName; ///
|
|
115
|
+
|
|
116
|
+
if (publishIgnored) {
|
|
117
|
+
console.log(`Ignoring the '${this.name}' publish.`);
|
|
118
|
+
|
|
119
|
+
const success = true;
|
|
120
|
+
|
|
121
|
+
callback(success);
|
|
122
|
+
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
96
126
|
let shellCommands = retrieveShellCommands();
|
|
97
127
|
|
|
98
128
|
const { publish } = shellCommands,
|
package/bin/versions.js
CHANGED
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
const VERSION_1_0 = "1.0",
|
|
4
4
|
VERSION_1_3 = "1.3",
|
|
5
5
|
VERSION_1_7 = "1.7",
|
|
6
|
-
VERSION_1_9 = "1.9"
|
|
6
|
+
VERSION_1_9 = "1.9",
|
|
7
|
+
VERSION_1_10 = "1.10";
|
|
7
8
|
|
|
8
9
|
module.exports = {
|
|
9
10
|
VERSION_1_0,
|
|
10
11
|
VERSION_1_3,
|
|
11
12
|
VERSION_1_7,
|
|
12
|
-
VERSION_1_9
|
|
13
|
+
VERSION_1_9,
|
|
14
|
+
VERSION_1_10
|
|
13
15
|
};
|
package/package.json
CHANGED