@dhis2/cli-utils 5.1.1-beta.1 → 5.2.0-alpha.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.
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "engines": {
7
7
  "node": ">=12"
8
8
  },
9
- "version": "5.1.1-beta.1",
9
+ "version": "5.2.0-alpha.3",
10
10
  "main": "src/index.js",
11
11
  "author": "Viktor Varland <viktor@dhis2.org>",
12
12
  "contributors": [
@@ -19,17 +19,21 @@
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/exec": "^7.1.0",
26
+ "@semantic-release/git": "^10.0.1",
27
+ "@semantic-release/github": "^11.0.3",
28
+ "@semantic-release/npm": "^12.0.2",
29
+ "@semantic-release/release-notes-generator": "^14.0.3",
30
+ "aggregate-error": "^5.0.0",
28
31
  "dhis2-uid": "^0.1.2",
29
32
  "ejs": "^3.0.1",
33
+ "glob": "^11.0.3",
30
34
  "inquirer": "^7.1.0",
31
35
  "jsondiffpatch": "^0.4.1",
32
- "semantic-release": "^17.4.4",
36
+ "semantic-release": "^24.2.7",
33
37
  "tape": "^4.13.2"
34
38
  },
35
39
  "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,6 @@ function publisher(target = '', packages) {
32
32
  '@semantic-release/npm',
33
33
  {
34
34
  pkgRoot: path.dirname(pkgJsonPath),
35
- npmPublish: false,
36
35
  },
37
36
  ]
38
37
  })
@@ -77,7 +76,7 @@ const handler = async ({ publish }) => {
77
76
  ),
78
77
  packages
79
78
  .map(pkgJsonPath =>
80
- path.join(path.dirname(pkgJsonPath), 'yarn.lock')
79
+ path.join(path.dirname(pkgJsonPath), 'pnpm-lock.yaml')
81
80
  )
82
81
  .filter(existsSync)
83
82
  .map(pkgJsonPath =>
@@ -89,6 +88,12 @@ const handler = async ({ publish }) => {
89
88
  },
90
89
  ]
91
90
 
91
+ const updateLockFile = [
92
+ '@semantic-release/exec',
93
+ {
94
+ verifyCOnditionsCmd: 'pnpm install', // ToDo: make it independent of npm
95
+ },
96
+ ]
92
97
  const deferPlugin = require('../support/semantic-release-defer-release')
93
98
 
94
99
  // Order matters here!
@@ -97,6 +102,7 @@ const handler = async ({ publish }) => {
97
102
  '@semantic-release/commit-analyzer',
98
103
  '@semantic-release/release-notes-generator',
99
104
  updateDepsPlugin,
105
+ updateLockFile,
100
106
  changelogPlugin,
101
107
  ...publisher(publish, packages),
102
108
  gitPlugin,
@@ -120,6 +126,7 @@ const handler = async ({ publish }) => {
120
126
  }
121
127
 
122
128
  try {
129
+ console.log(semanticRelease)
123
130
  const result = await semanticRelease(options, config)
124
131
 
125
132
  if (result) {
@@ -161,3 +168,5 @@ module.exports = {
161
168
  },
162
169
  },
163
170
  }
171
+
172
+ // 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