@clickview/ship-it 0.0.36 → 0.0.37-dev.1

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.
@@ -69,18 +69,19 @@ var BumpPackagesTask = /** @class */ (function () {
69
69
  }
70
70
  BumpPackagesTask.prototype.run = function (options) {
71
71
  return __awaiter(this, void 0, void 0, function () {
72
- var _a, branch, isValid, commitFiles, _i, commitFiles_1, file;
72
+ var _a, branch, isValid, commitFiles, _i, commitFiles_1, file, newJsonFile;
73
73
  return __generator(this, function (_b) {
74
74
  switch (_b.label) {
75
75
  case 0:
76
76
  utils_1.Logger.logTask('Bumping clickview npm package versions');
77
77
  this.isReleaseBranch = RELEASE_BRANCH_REGEX.test(options.branchName);
78
78
  this.isHotfixBranch = HOTFIX_BRANCH_REGEX.test(options.branchName);
79
- utils_1.Logger.logTask('Detected that monorepo is currently in a pre-release state');
80
79
  _a = this;
81
80
  return [4 /*yield*/, this.getIsInPrerelease(options.branchName)];
82
81
  case 1:
83
82
  _a.isInPreRelease = _b.sent();
83
+ if (this.isInPreRelease)
84
+ utils_1.Logger.logTask('Detected that monorepo is currently in a pre-release state');
84
85
  return [4 /*yield*/, this.service.getBranch(utils_1.ProjectIds.MONOREPO_PROJECT_ID, options.branchName)];
85
86
  case 2:
86
87
  branch = _b.sent();
@@ -97,6 +98,8 @@ var BumpPackagesTask = /** @class */ (function () {
97
98
  for (_i = 0, commitFiles_1 = commitFiles; _i < commitFiles_1.length; _i++) {
98
99
  file = commitFiles_1[_i];
99
100
  (0, fs_1.writeFileSync)(file.filePath, file.content);
101
+ newJsonFile = JSON.parse(file.content);
102
+ utils_1.Logger.logInfo("Updated version for ".concat(newJsonFile.name, " to ").concat(newJsonFile.version));
100
103
  }
101
104
  utils_1.Logger.logInfo('Committing new versions...');
102
105
  return [4 /*yield*/, this.service.commit(utils_1.ProjectIds.MONOREPO_PROJECT_ID, options.branchName, 'Bump package versions', commitFiles)];
@@ -151,6 +154,7 @@ var BumpPackagesTask = /** @class */ (function () {
151
154
  // Only bump versions for projects with an output directory
152
155
  if (!(0, fs_1.existsSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]) || !(0, fs_1.statSync)(MonorepoPackageJsonFiles_1.MONOREPO_DISTS_MAP[projectId]).isDirectory())
153
156
  continue;
157
+ utils_1.Logger.logInfo("Bumping version for project with ID: ".concat(projectId));
154
158
  var content = '';
155
159
  try {
156
160
  content = (0, fs_1.readFileSync)(packageJsonFilePath, { encoding: 'utf8' });
@@ -202,6 +206,8 @@ var BumpPackagesTask = /** @class */ (function () {
202
206
  case 1:
203
207
  if (!(_i < MONOREPO_PACKAGE_JSON_FILES_1.length)) return [3 /*break*/, 4];
204
208
  file = MONOREPO_PACKAGE_JSON_FILES_1[_i];
209
+ if (!file.includes('projects'))
210
+ return [3 /*break*/, 3];
205
211
  return [4 /*yield*/, this.getFileText(utils_1.ProjectIds.MONOREPO_PROJECT_ID, branchName, file)];
206
212
  case 2:
207
213
  text = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/ship-it",
3
- "version": "0.0.36",
3
+ "version": "0.0.37-dev.1",
4
4
  "description": "Release Manager",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {