@dhis2/cli-utils 5.1.1-alpha.1 → 5.2.0-alpha.2

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/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "engines": {
7
7
  "node": ">=12"
8
8
  },
9
- "version": "5.1.1-alpha.1",
9
+ "version": "5.2.0-alpha.2",
10
10
  "main": "src/index.js",
11
11
  "author": "Viktor Varland <viktor@dhis2.org>",
12
12
  "contributors": [
@@ -19,17 +19,20 @@
19
19
  "@dhis2/cli-utils-codemods": "^3.0.0",
20
20
  "@dhis2/cli-utils-cypress": "^9.0.1",
21
21
  "@dhis2/cli-utils-docsite": "^3.1.2",
22
- "@semantic-release/changelog": "^5.0.1",
23
- "@semantic-release/commit-analyzer": "^8.0.1",
24
- "@semantic-release/git": "^9.0.0",
25
- "@semantic-release/github": "^7.2.3",
26
- "@semantic-release/npm": "^7.1.3",
27
- "@semantic-release/release-notes-generator": "^9.0.3",
22
+ "@semantic-release/changelog": "^6.0.3",
23
+ "@semantic-release/commit-analyzer": "^13.0.1",
24
+ "@semantic-release/error": "^4.0.0",
25
+ "@semantic-release/git": "^10.0.1",
26
+ "@semantic-release/github": "^11.0.3",
27
+ "@semantic-release/npm": "^12.0.2",
28
+ "@semantic-release/release-notes-generator": "^14.0.3",
29
+ "aggregate-error": "^5.0.0",
28
30
  "dhis2-uid": "^0.1.2",
29
31
  "ejs": "^3.0.1",
32
+ "glob": "^11.0.3",
30
33
  "inquirer": "^7.1.0",
31
34
  "jsondiffpatch": "^0.4.1",
32
- "semantic-release": "^17.4.4",
35
+ "semantic-release": "^24.2.7",
33
36
  "tape": "^4.13.2"
34
37
  },
35
38
  "publishConfig": {
@@ -1,7 +1,7 @@
1
1
  const { existsSync } = require('fs')
2
2
  const path = require('path')
3
3
  const { reporter } = require('@dhis2/cli-helpers-engine')
4
- const semanticRelease = require('semantic-release')
4
+ const semanticRelease = require('semantic-release').default
5
5
  const getWorkspacePackages = require('../support/getWorkspacePackages')
6
6
 
7
7
  const packageIsPublishable = pkgJsonPath => {
@@ -32,7 +32,7 @@ function publisher(target = '', packages) {
32
32
  '@semantic-release/npm',
33
33
  {
34
34
  pkgRoot: path.dirname(pkgJsonPath),
35
- npmPublish: false,
35
+ // npmPublish: false,
36
36
  },
37
37
  ]
38
38
  })
@@ -77,7 +77,7 @@ const handler = async ({ publish }) => {
77
77
  ),
78
78
  packages
79
79
  .map(pkgJsonPath =>
80
- path.join(path.dirname(pkgJsonPath), 'yarn.lock')
80
+ path.join(path.dirname(pkgJsonPath), 'pnpm-lock.yaml')
81
81
  )
82
82
  .filter(existsSync)
83
83
  .map(pkgJsonPath =>
@@ -120,6 +120,7 @@ const handler = async ({ publish }) => {
120
120
  }
121
121
 
122
122
  try {
123
+ console.log(semanticRelease)
123
124
  const result = await semanticRelease(options, config)
124
125
 
125
126
  if (result) {
@@ -161,3 +162,5 @@ module.exports = {
161
162
  },
162
163
  },
163
164
  }
165
+
166
+ // handler({ publish: 'npm' })
@@ -63,8 +63,12 @@ async function getSchemas(urlLike, { baseUrl, auth, force }) {
63
63
  function sortSchemaObject(a, b) {
64
64
  const aHash = objectHash(a)
65
65
  const bHash = objectHash(b)
66
- if (aHash < bHash) return -1
67
- if (aHash > bHash) return 1
66
+ if (aHash < bHash) {
67
+ return -1
68
+ }
69
+ if (aHash > bHash) {
70
+ return 1
71
+ }
68
72
  return 0
69
73
  }
70
74
 
@@ -61,7 +61,9 @@ function authFromConf(conf = {}, serverConfig = {}) {
61
61
  username: serverConfig.username || conf.username,
62
62
  password: serverConfig.password || conf.password,
63
63
  }
64
- if (auth.username && auth.password) return auth
64
+ if (auth.username && auth.password) {
65
+ return auth
66
+ }
65
67
  return true
66
68
  }
67
69