@cocreate/cli 1.33.2 → 1.33.4

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.33.4](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.33.3...v1.33.4) (2023-06-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([4584784](https://github.com/CoCreate-app/CoCreate-cli/commit/4584784a12c1d996b97c07214a9feeeb4f1c20e8))
7
+
8
+ ## [1.33.3](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.33.2...v1.33.3) (2023-06-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * postintall error ([b255b5c](https://github.com/CoCreate-app/CoCreate-cli/commit/b255b5cf83f9af59994c40b7da966e17f94a8cf5))
14
+
1
15
  ## [1.33.2](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.33.1...v1.33.2) (2023-06-11)
2
16
 
3
17
 
@@ -416,11 +416,6 @@ module.exports = {
416
416
  },
417
417
 
418
418
 
419
-
420
- // {
421
- // 'path': '../CoCreateWS',
422
- // 'repo': 'github.com/CoCreate-app/CoCreateWS.git'
423
- // },
424
419
  // {
425
420
  // 'path': '../CoCreateApi',
426
421
  // 'repo': 'github.com/CoCreate-app/CoCreateApi.git'
@@ -432,7 +427,13 @@ module.exports = {
432
427
  // },
433
428
 
434
429
 
435
- // // Components
430
+ // Server
431
+ {
432
+ 'path': '../CoCreateWS',
433
+ 'repo': 'github.com/CoCreate-app/CoCreateWS.git'
434
+ },
435
+
436
+ // Server Components
436
437
  {
437
438
  'path': '../CoCreate-authenticate',
438
439
  'repo': 'github.com/CoCreate-app/CoCreate-authenticate.git'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/cli",
3
- "version": "1.33.2",
3
+ "version": "1.33.4",
4
4
  "description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
5
5
  "keywords": [
6
6
  "cli",
@@ -60,8 +60,8 @@
60
60
  "@cocreate/cli": "^1.29.3"
61
61
  },
62
62
  "dependencies": {
63
- "@cocreate/cli": "^1.33.0",
64
- "@cocreate/file": "^1.2.5",
63
+ "@cocreate/cli": "^1.33.3",
64
+ "@cocreate/file": "^1.2.8",
65
65
  "glob": "^7.1.7",
66
66
  "prettier": "^2.3.2"
67
67
  }
package/src/coc.js CHANGED
@@ -37,8 +37,8 @@ function getRepositories(path) {
37
37
  }
38
38
  }
39
39
 
40
- const currentRepoPath = path.resolve(process.cwd(), "./CoCreate.config.js");
41
- let packageJsonPath = path.resolve(process.cwd(), './package.json');
40
+ const currentRepoPath = path.resolve(process.cwd(), "CoCreate.config.js");
41
+ let packageJsonPath = path.resolve(process.cwd(), 'package.json');
42
42
  let directory
43
43
 
44
44
  if (config['c'] && fs.existsSync(config['c'])) {
@@ -9,7 +9,7 @@ let pathList, nameList, item = {}, failed = [];
9
9
  module.exports = async function bump(repos, args) {
10
10
  pathList = repos.map(o => o.absolutePath)
11
11
  if (repos.length <= 1) {
12
- let packageJsonPath = path.resolve(process.cwd(), './package.json');
12
+ let packageJsonPath = path.resolve(process.cwd(), 'package.json');
13
13
 
14
14
  if (fs.existsSync(packageJsonPath)) {
15
15
  let json = require(packageJsonPath)
@@ -33,15 +33,14 @@ module.exports = async function bump(repos, args) {
33
33
 
34
34
  } else {
35
35
  nameList = pathList.map(fn => path.basename(fn).toLowerCase());
36
- console.log('namelist', nameList)
37
36
  for (let [index, name] of nameList.entries()) {
38
- getVersions(pathList[index] + '/package.json', `@${name}`)
37
+ getVersions(path.resolve(pathList[index], 'package.json'), `@${name}`)
39
38
  }
40
39
 
41
40
  console.log('bump versions', item)
42
41
 
43
42
  for (let [index, name] of nameList.entries()) {
44
- bumpVersion(pathList[index] + '/package.json', name)
43
+ bumpVersion(path.resolve(pathList[index], 'package.json'), name)
45
44
  }
46
45
 
47
46
  }
@@ -62,28 +61,31 @@ function getVersions(filePath) {
62
61
  }
63
62
 
64
63
  function bumpVersion(filePath, name) {
65
- let object = require(filePath)
66
- if (object) {
67
- let newObject = { ...object }
68
- let dependencies = object.dependencies || {}
69
- let devDependencies = object.devDependencies || {}
70
- for (const name of Object.keys(dependencies)) {
71
- if (item[name]) {
72
- newObject.dependencies[name] = item[name]
64
+ if (fs.existsSync(filePath)) {
65
+
66
+ let object = require(filePath)
67
+ if (object) {
68
+ let newObject = { ...object }
69
+ let dependencies = object.dependencies || {}
70
+ let devDependencies = object.devDependencies || {}
71
+ for (const name of Object.keys(dependencies)) {
72
+ if (item[name]) {
73
+ newObject.dependencies[name] = item[name]
74
+ }
73
75
  }
74
- }
75
76
 
76
- for (const name of Object.keys(devDependencies)) {
77
- if (item[name]) {
78
- newObject.devDependencies[name] = item[name]
77
+ for (const name of Object.keys(devDependencies)) {
78
+ if (item[name]) {
79
+ newObject.devDependencies[name] = item[name]
80
+ }
79
81
  }
80
- }
81
82
 
82
- if (fs.existsSync(filePath)) {
83
- fs.unlinkSync(filePath)
84
- }
83
+ if (fs.existsSync(filePath)) {
84
+ fs.unlinkSync(filePath)
85
+ }
85
86
 
86
- fs.writeFileSync(filePath, JSON.stringify(object, null, 2))
87
+ fs.writeFileSync(filePath, JSON.stringify(object, null, 2))
88
+ }
87
89
  } else {
88
90
  failed.push({ name: 'bump version', des: 'path doesn\'t exist:' + filePath })
89
91
  }