@clickview/ship-it 0.0.35-rc.2 → 0.0.35-rc.3
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,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a, _b;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MONOREPO_PACKAGE_JSON_FILES = void 0;
|
|
4
|
+
exports.MONOREPO_DISTS_MAP = exports.MONOREPO_PACKAGE_JSON_FILES_MAP = exports.MONOREPO_PACKAGE_JSON_FILES = void 0;
|
|
5
|
+
var ProjectNames_1 = require("./ProjectNames");
|
|
4
6
|
exports.MONOREPO_PACKAGE_JSON_FILES = [
|
|
5
7
|
'packages/libs/analytics/package.json',
|
|
6
8
|
'packages/libs/styles/package.json',
|
|
@@ -15,3 +17,25 @@ exports.MONOREPO_PACKAGE_JSON_FILES = [
|
|
|
15
17
|
'packages/projects/player/package.json',
|
|
16
18
|
'packages/projects/streamable-learning/package.json'
|
|
17
19
|
];
|
|
20
|
+
exports.MONOREPO_PACKAGE_JSON_FILES_MAP = (_a = {},
|
|
21
|
+
_a[ProjectNames_1.PROJECT_NAMES.backend.auth] = 'packages/projects/auth/package.json',
|
|
22
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.curator] = 'packages/projects/curator/package.json',
|
|
23
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.cloud] = 'packages/projects/library-editor/package.json',
|
|
24
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.lite] = 'packages/projects/lite/package.json',
|
|
25
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.online] = 'packages/projects/online/package.json',
|
|
26
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.reports] = 'packages/projects/reports/package.json',
|
|
27
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.exchange] = 'packages/projects/exchange/package.json',
|
|
28
|
+
_a[ProjectNames_1.PROJECT_NAMES.backend.player] = 'packages/projects/player/package.json',
|
|
29
|
+
_a[ProjectNames_1.PROJECT_NAMES.frontend.streamable] = 'packages/projects/streamable-learning/package.json',
|
|
30
|
+
_a);
|
|
31
|
+
exports.MONOREPO_DISTS_MAP = (_b = {},
|
|
32
|
+
_b[ProjectNames_1.PROJECT_NAMES.backend.auth] = 'packages/projects/auth/dist',
|
|
33
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.curator] = 'packages/projects/curator/dist',
|
|
34
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.cloud] = 'packages/projects/library-editor/dist',
|
|
35
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.lite] = 'packages/projects/lite/dist',
|
|
36
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.online] = 'packages/projects/online/dist',
|
|
37
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.reports] = 'packages/projects/reports/dist',
|
|
38
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.exchange] = 'packages/projects/exchange/dist',
|
|
39
|
+
_b[ProjectNames_1.PROJECT_NAMES.backend.player] = 'packages/projects/player/dist',
|
|
40
|
+
_b[ProjectNames_1.PROJECT_NAMES.frontend.streamable] = 'packages/projects/streamable-learning/dist',
|
|
41
|
+
_b);
|
package/lib/src/index.js
CHANGED
|
File without changes
|
|
@@ -146,13 +146,16 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
146
146
|
};
|
|
147
147
|
BumpPackagesTask.prototype.getCommitFiles = function (options) {
|
|
148
148
|
var commitFiles = [];
|
|
149
|
-
for (var _i = 0,
|
|
150
|
-
var
|
|
149
|
+
for (var _i = 0, _a = Object.entries(MonorepoPackageJsonFiles_1.MONOREPO_PACKAGE_JSON_FILES_MAP); _i < _a.length; _i++) {
|
|
150
|
+
var _b = _a[_i], projectId = _b[0], packageJsonFilePath = _b[1];
|
|
151
|
+
// Only bump versions for projects with an output directory
|
|
152
|
+
if (!(0, fs_1.existsSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]) || !(0, fs_1.statSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]).isDirectory())
|
|
153
|
+
continue;
|
|
151
154
|
var content = '';
|
|
152
155
|
try {
|
|
153
|
-
content = (0, fs_1.readFileSync)(
|
|
156
|
+
content = (0, fs_1.readFileSync)(packageJsonFilePath, { encoding: 'utf8' });
|
|
154
157
|
}
|
|
155
|
-
catch (
|
|
158
|
+
catch (_c) {
|
|
156
159
|
/**
|
|
157
160
|
* If the file doesn't exist, ignore the error.
|
|
158
161
|
* This will occur when TC Docker runs this script as it doesn't copy over @clickview/tooling
|
|
@@ -162,7 +165,7 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
162
165
|
var json = JSON.parse(content);
|
|
163
166
|
json.version = this.getNextVersion(json.version, options);
|
|
164
167
|
commitFiles.push({
|
|
165
|
-
filePath:
|
|
168
|
+
filePath: packageJsonFilePath,
|
|
166
169
|
content: JSON.stringify(json, null, 2)
|
|
167
170
|
});
|
|
168
171
|
}
|
|
@@ -190,15 +193,15 @@ var BumpPackagesTask = /** @class */ (function () {
|
|
|
190
193
|
};
|
|
191
194
|
BumpPackagesTask.prototype.getIsInPrerelease = function (branchName) {
|
|
192
195
|
return __awaiter(this, void 0, void 0, function () {
|
|
193
|
-
var _i,
|
|
196
|
+
var _i, MONOREPO_PACKAGE_JSON_FILES_1, file, text, json;
|
|
194
197
|
return __generator(this, function (_a) {
|
|
195
198
|
switch (_a.label) {
|
|
196
199
|
case 0:
|
|
197
|
-
_i = 0,
|
|
200
|
+
_i = 0, MONOREPO_PACKAGE_JSON_FILES_1 = MonorepoPackageJsonFiles_1.MONOREPO_PACKAGE_JSON_FILES;
|
|
198
201
|
_a.label = 1;
|
|
199
202
|
case 1:
|
|
200
|
-
if (!(_i <
|
|
201
|
-
file =
|
|
203
|
+
if (!(_i < MONOREPO_PACKAGE_JSON_FILES_1.length)) return [3 /*break*/, 4];
|
|
204
|
+
file = MONOREPO_PACKAGE_JSON_FILES_1[_i];
|
|
202
205
|
return [4 /*yield*/, this.getFileText(utils_1.ProjectIds.MONOREPO_PROJECT_ID, branchName, file)];
|
|
203
206
|
case 2:
|
|
204
207
|
text = _a.sent();
|