@itcase/config 1.7.3 → 1.7.5
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
|
@@ -35,7 +35,7 @@ function createSemanticReleaseApp({
|
|
|
35
35
|
versionAssets = DEFAULT_VERSION_ASSETS,
|
|
36
36
|
} = {}) {
|
|
37
37
|
return createSemanticReleaseConfig({
|
|
38
|
-
branches,
|
|
38
|
+
branches: branches,
|
|
39
39
|
gitConfig: {
|
|
40
40
|
message:
|
|
41
41
|
'release: publishing new version ${nextRelease.version} [skip ci]',
|
|
@@ -49,7 +49,7 @@ function createSemanticReleaseApp({
|
|
|
49
49
|
npmConfig: {
|
|
50
50
|
npmPublish: false,
|
|
51
51
|
},
|
|
52
|
-
preparePlugins,
|
|
52
|
+
preparePlugins: preparePlugins,
|
|
53
53
|
})
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/* eslint-disable perfectionist/sort-objects */
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { readFile, writeFile } from 'node:fs/promises'
|
|
4
|
+
import { resolve } from 'node:path'
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
createSemanticReleaseConfig,
|
|
8
|
+
releaseNotesGeneratorConfig,
|
|
9
|
+
} from './common.js'
|
|
4
10
|
|
|
5
11
|
const RELEASE_ASSETS = [
|
|
6
12
|
'lerna.json',
|
|
@@ -11,6 +17,22 @@ const RELEASE_ASSETS = [
|
|
|
11
17
|
'packages/*/package-lock.json',
|
|
12
18
|
]
|
|
13
19
|
|
|
20
|
+
async function keepLernaVersionIndependent(_pluginConfig, context) {
|
|
21
|
+
const lernaConfigPath = resolve(context.cwd, 'lerna.json')
|
|
22
|
+
const lernaConfig = JSON.parse(await readFile(lernaConfigPath, 'utf8'))
|
|
23
|
+
|
|
24
|
+
if (lernaConfig.version === 'independent') {
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
lernaConfig.version = 'independent'
|
|
29
|
+
await writeFile(lernaConfigPath, `${JSON.stringify(lernaConfig, null, 2)}\n`)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const keepLernaIndependentPlugin = {
|
|
33
|
+
prepare: keepLernaVersionIndependent,
|
|
34
|
+
}
|
|
35
|
+
|
|
14
36
|
const semanticReleaseMonorepo = createSemanticReleaseConfig({
|
|
15
37
|
branches: ['master'],
|
|
16
38
|
npmConfig: null,
|
|
@@ -18,7 +40,20 @@ const semanticReleaseMonorepo = createSemanticReleaseConfig({
|
|
|
18
40
|
message: 'publish version ${nextRelease.version} [skip ci]',
|
|
19
41
|
assets: RELEASE_ASSETS,
|
|
20
42
|
},
|
|
21
|
-
additionalPlugins: [
|
|
43
|
+
additionalPlugins: [
|
|
44
|
+
[
|
|
45
|
+
'semantic-release-lerna',
|
|
46
|
+
{
|
|
47
|
+
generateNotes: true,
|
|
48
|
+
latch: false,
|
|
49
|
+
...releaseNotesGeneratorConfig,
|
|
50
|
+
host: 'https://github.com',
|
|
51
|
+
commit: 'commit',
|
|
52
|
+
issue: 'issues',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
],
|
|
56
|
+
preparePlugins: [keepLernaIndependentPlugin],
|
|
22
57
|
skipReleaseNotesGenerator: true,
|
|
23
58
|
})
|
|
24
59
|
|