@anolilab/semantic-release-preset 8.0.2 → 8.1.0

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
+ ## @anolilab/semantic-release-preset [8.1.0](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-preset@8.0.3...@anolilab/semantic-release-preset@8.1.0) (2024-05-23)
2
+
3
+
4
+ ### Features
5
+
6
+ * moved semantic-release preset, added new presets for yarn and pnpm ([#26](https://github.com/anolilab/semantic-release/issues/26)) ([7c057c4](https://github.com/anolilab/semantic-release/commit/7c057c45977c00a06c057a360a13a7f1993d808d))
7
+
8
+ ## @anolilab/semantic-release-preset [8.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@8.0.2...@anolilab/semantic-release-preset@8.0.3) (2023-12-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update deps ([e75d029](https://github.com/anolilab/javascript-style-guide/commit/e75d02912fe8c0333f9fa30726f517638ac62ff7))
14
+
1
15
  ## @anolilab/semantic-release-preset [8.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@8.0.1...@anolilab/semantic-release-preset@8.0.2) (2023-11-02)
2
16
 
3
17
 
package/README.md CHANGED
@@ -48,6 +48,8 @@ We use the following plugins within the Semantic Release ecosystem:
48
48
  - [@semantic-release/github][4]
49
49
  - [@semantic-release/npm][7] (optional)
50
50
  - [@semantic-release/release-notes-generator][2]
51
+ - [@anolilab/semantic-release-pnpm][8] (optional)
52
+ - [semantic-release-yarn][9] (optional)
51
53
 
52
54
  ## Summary
53
55
 
@@ -58,7 +60,7 @@ This shareable configuration performs the following actions:
58
60
  3. Create or update a changelog file generated by step 2 ([@semantic-release/changelog][3])
59
61
  4. Update the package version to the next release version
60
62
  5. Commit release assets to the project’s git repository with the commit message chore(release): ${nextRelease.version} [skip ci] ${nextRelease.notes}.
61
- 6. Publish a npm release ([@semantic-release/npm][4]) (optional)
63
+ 6. Publish a npm release with ([@semantic-release/npm][4] or [@anolilab/semantic-release-pnpm][8] or [semantic-release-yarn][9]) (optional)
62
64
  7. Publish a GitHub release and comment on released Pull Requests/Issues ([@semantic-release/github][4])
63
65
 
64
66
  ## Usage
@@ -67,9 +69,9 @@ When installing this package for the first time, the following shareable configu
67
69
 
68
70
  > Note: If the script detects an existing `.releaserc.json` file, it will not overwrite it.
69
71
 
70
- > Note: It can happen that the postinstall script dont run, then you have to add the `.releaserc.json` manually.
72
+ > Note: It can happen that the postinstall script don't run, then you have to add the `.releaserc.json` manually.
71
73
 
72
- With npm:
74
+ Npm release with [@semantic-release/npm][4]:
73
75
 
74
76
  ```json
75
77
  {
@@ -77,7 +79,23 @@ With npm:
77
79
  }
78
80
  ```
79
81
 
80
- Without npm:
82
+ Npm release with [@anolilab/semantic-release-pnpm][8]:
83
+
84
+ ```json
85
+ {
86
+ "extends": "@anolilab/semantic-release-preset/pnpm"
87
+ }
88
+ ```
89
+
90
+ Npm release with [semantic-release-yarn][9]:
91
+
92
+ ```json
93
+ {
94
+ "extends": "@anolilab/semantic-release-preset/yarn"
95
+ }
96
+ ```
97
+
98
+ Without npm release:
81
99
 
82
100
  ```json
83
101
  {
@@ -192,6 +210,7 @@ No problem, just add the following to your `.releaserc.json`:
192
210
  ```
193
211
 
194
212
  Find out how to configure the plugin [here](https://github.com/ghusse/semantic-release-npm-deprecate-old-versions).
213
+
195
214
  </details>
196
215
 
197
216
  <details>
@@ -259,7 +278,7 @@ The following will do just that, immediately after something is merged into `mai
259
278
  Here’s an example workflow configuration that runs your tests and publishes a new version for new commits on `main` branch:
260
279
 
261
280
  <details>
262
- <summary>Single semantic-release example with yarn</summary>
281
+ <summary>Single semantic-release example with yarn, (you can do the same with pnpm or npm)</summary>
263
282
 
264
283
  ```yaml
265
284
  # https://help.github.com/en/categories/automating-your-workflow-with-github-actions
@@ -580,6 +599,8 @@ The anolilab javascript-style-guide is open-sourced software licensed under the
580
599
  [5]: https://github.com/semantic-release/exec
581
600
  [6]: https://github.com/semantic-release/git
582
601
  [7]: https://github.com/semantic-release/npm
602
+ [8]: https://github.com/anolilab/semantic-release-pnpm
603
+ [9]: https://github.com/hongaar/semantic-release-yarn
583
604
  [license-image]: https://img.shields.io/npm/l/@anolilab/semantic-release-preset?color=blueviolet&style=for-the-badge
584
605
  [license-url]: LICENSE.md "license"
585
606
  [npm-image]: https://img.shields.io/npm/v/@anolilab/semantic-release-preset/latest.svg?style=for-the-badge&logo=npm
@@ -0,0 +1,61 @@
1
+ {
2
+ "branches": [
3
+ "+([0-9])?(.{+([0-9]),x}).x",
4
+ "main",
5
+ "next",
6
+ "next-major",
7
+ {
8
+ "name": "beta",
9
+ "prerelease": true
10
+ },
11
+ {
12
+ "name": "alpha",
13
+ "prerelease": true
14
+ }
15
+ ],
16
+ "plugins": [
17
+ [
18
+ "@semantic-release/commit-analyzer",
19
+ {
20
+ "preset": "conventionalcommits"
21
+ }
22
+ ],
23
+ [
24
+ "@semantic-release/release-notes-generator",
25
+ {
26
+ "preset": "conventionalcommits",
27
+ "presetConfig": {
28
+ "types": [
29
+ { "type": "feat", "section": "Features" },
30
+ { "type": "feature", "section": "Features" },
31
+ { "type": "fix", "section": "Bug Fixes" },
32
+ { "type": "perf", "section": "Performance Improvements" },
33
+ { "type": "revert", "section": "Reverts" },
34
+ { "type": "docs", "section": "Documentation", "hidden": false },
35
+ { "type": "style", "section": "Styles", "hidden": false },
36
+ { "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
37
+ { "type": "refactor", "section": "Code Refactoring", "hidden": false },
38
+ { "type": "test", "section": "Tests", "hidden": false },
39
+ { "type": "build", "section": "Build System", "hidden": false },
40
+ { "type": "ci", "section": "Continuous Integration", "hidden": false }
41
+ ]
42
+ }
43
+ }
44
+ ],
45
+ "@semantic-release/changelog",
46
+ "@anolilab/semantic-release-pnpm",
47
+ [
48
+ "@semantic-release/git",
49
+ {
50
+ "message": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}"
51
+ }
52
+ ],
53
+ [
54
+ "@semantic-release/github",
55
+ {
56
+ "successComment": false,
57
+ "failComment": false
58
+ }
59
+ ]
60
+ ]
61
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "branches": [
3
+ "+([0-9])?(.{+([0-9]),x}).x",
4
+ "main",
5
+ "next",
6
+ "next-major",
7
+ {
8
+ "name": "beta",
9
+ "prerelease": true
10
+ },
11
+ {
12
+ "name": "alpha",
13
+ "prerelease": true
14
+ }
15
+ ],
16
+ "plugins": [
17
+ [
18
+ "@semantic-release/commit-analyzer",
19
+ {
20
+ "preset": "conventionalcommits"
21
+ }
22
+ ],
23
+ [
24
+ "@semantic-release/release-notes-generator",
25
+ {
26
+ "preset": "conventionalcommits",
27
+ "presetConfig": {
28
+ "types": [
29
+ { "type": "feat", "section": "Features" },
30
+ { "type": "feature", "section": "Features" },
31
+ { "type": "fix", "section": "Bug Fixes" },
32
+ { "type": "perf", "section": "Performance Improvements" },
33
+ { "type": "revert", "section": "Reverts" },
34
+ { "type": "docs", "section": "Documentation", "hidden": false },
35
+ { "type": "style", "section": "Styles", "hidden": false },
36
+ { "type": "chore", "section": "Miscellaneous Chores", "hidden": false },
37
+ { "type": "refactor", "section": "Code Refactoring", "hidden": false },
38
+ { "type": "test", "section": "Tests", "hidden": false },
39
+ { "type": "build", "section": "Build System", "hidden": false },
40
+ { "type": "ci", "section": "Continuous Integration", "hidden": false }
41
+ ]
42
+ }
43
+ }
44
+ ],
45
+ "@semantic-release/changelog",
46
+ "semantic-release-yarn",
47
+ [
48
+ "@semantic-release/git",
49
+ {
50
+ "message": "chore(release): ${nextRelease.gitTag} [skip ci]\\n\\n${nextRelease.notes}"
51
+ }
52
+ ],
53
+ [
54
+ "@semantic-release/github",
55
+ {
56
+ "successComment": false,
57
+ "failComment": false
58
+ }
59
+ ]
60
+ ]
61
+ }
package/package.json CHANGED
@@ -1,99 +1,147 @@
1
1
  {
2
- "name": "@anolilab/semantic-release-preset",
3
- "version": "8.0.2",
4
- "description": "Anolilab Coding Standard for semantic-release.",
5
- "keywords": [
6
- "anolilab",
7
- "semantic-release",
8
- "semantic-release-config",
9
- "changelog",
10
- "publish",
11
- "release",
12
- "npm",
13
- "github",
14
- "git",
15
- "@semantic-release/changelog",
16
- "@semantic-release/commit-analyzer",
17
- "@semantic-release/exec",
18
- "@semantic-release/git",
19
- "@semantic-release/github",
20
- "@semantic-release/npm",
21
- "@semantic-release/release-notes-generator"
22
- ],
23
- "homepage": "https://anolilab.com/nodejs/packages/semantic-release-preset",
24
- "repository": {
25
- "type": "git",
26
- "url": "https://github.com/anolilab/javascript-style-guide.git",
27
- "directory": "packages/semantic-release-preset"
2
+ "name": "@anolilab/semantic-release-preset",
3
+ "version": "8.1.0",
4
+ "description": "Semantic-release predefined presets.",
5
+ "keywords": [
6
+ "anolilab",
7
+ "semantic-release",
8
+ "semantic-release-config",
9
+ "changelog",
10
+ "publish",
11
+ "release",
12
+ "npm",
13
+ "pnpm",
14
+ "github",
15
+ "git",
16
+ "@anolilab/semantic-release-pnpm",
17
+ "@semantic-release/changelog",
18
+ "@semantic-release/commit-analyzer",
19
+ "@semantic-release/exec",
20
+ "@semantic-release/git",
21
+ "@semantic-release/github",
22
+ "@semantic-release/npm",
23
+ "@semantic-release/release-notes-generator"
24
+ ],
25
+ "homepage": "https://github.com/anolilab/semantic-release/tree/main/packages/semantic-release-preset",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/anolilab/semantic-release.git",
29
+ "directory": "packages/semantic-release-preset"
30
+ },
31
+ "funding": [
32
+ {
33
+ "type": "github",
34
+ "url": "https://github.com/sponsors/prisis"
28
35
  },
29
- "funding": [
30
- {
31
- "type": "github",
32
- "url": "https://github.com/sponsors/prisis"
33
- },
34
- {
35
- "type": "consulting",
36
- "url": "https://anolilab.com/support"
37
- }
38
- ],
39
- "license": "MIT",
40
- "author": {
41
- "name": "Daniel Bannert",
42
- "email": "d.bannert@anolilab.de"
43
- },
44
- "exports": {
45
- ".": {
46
- "require": "./config/without-npm.json",
47
- "import": "./config/without-npm.json"
48
- },
49
- "./npm": {
50
- "require": "./config/with-npm.json",
51
- "import": "./config/with-npm.json"
52
- },
53
- "./package.json": "./package.json"
36
+ {
37
+ "type": "consulting",
38
+ "url": "https://anolilab.com/support"
39
+ }
40
+ ],
41
+ "license": "MIT",
42
+ "author": {
43
+ "name": "Daniel Bannert",
44
+ "email": "d.bannert@anolilab.de"
45
+ },
46
+ "exports": {
47
+ ".": {
48
+ "require": "./config/without-npm.json",
49
+ "import": "./config/without-npm.json"
54
50
  },
55
- "main": "config/without-npm.json",
56
- "source": "src/postinstall.ts",
57
- "files": [
58
- "dist",
59
- "skip.js",
60
- "README.md",
61
- "CHANGELOG.md",
62
- "LICENSE.md",
63
- "config/with-npm.json",
64
- "config/without-npm.json"
65
- ],
66
- "scripts": {
67
- "build": "cross-env NODE_ENV=development tsup",
68
- "build:prod": "cross-env NODE_ENV=production tsup",
69
- "clean": "rimraf node_modules dist",
70
- "postinstall": "node ./skip.js || node ./dist/postinstall.js"
51
+ "./npm": {
52
+ "require": "./config/with-npm.json",
53
+ "import": "./config/with-npm.json"
71
54
  },
72
- "dependencies": {
73
- "@anolilab/package-json-utils": "3.0.9",
74
- "@semantic-release/changelog": "^6.0.3",
75
- "@semantic-release/commit-analyzer": "11.0.0",
76
- "@semantic-release/exec": "^6.0.3",
77
- "@semantic-release/git": "^10.0.1",
78
- "@semantic-release/github": "^9.2.1",
79
- "@semantic-release/npm": "^11.0.0",
80
- "@semantic-release/release-notes-generator": "12.0.0",
81
- "conventional-changelog-conventionalcommits": "7.0.2"
55
+ "./pnpm": {
56
+ "require": "./config/with-pnpm.json",
57
+ "import": "./config/with-pnpm.json"
82
58
  },
83
- "devDependencies": {
84
- "rimraf": "^5.0.5",
85
- "semantic-release": "^22.0.6",
86
- "tsup": "^7.2.0",
87
- "vitest": "^0.34.6"
59
+ "./yarn": {
60
+ "require": "./config/with-yarn.json",
61
+ "import": "./config/with-yarn.json"
88
62
  },
89
- "peerDependencies": {
90
- "semantic-release": ">=22"
63
+ "./package.json": "./package.json"
64
+ },
65
+ "main": "config/without-npm.json",
66
+ "source": "src/postinstall.ts",
67
+ "files": [
68
+ "README.md",
69
+ "CHANGELOG.md",
70
+ "LICENSE.md",
71
+ "config"
72
+ ],
73
+ "dependencies": {
74
+ "@semantic-release/changelog": "^6.0.3",
75
+ "@semantic-release/commit-analyzer": "11.1.0",
76
+ "@semantic-release/exec": "^6.0.3",
77
+ "@semantic-release/git": "^10.0.1",
78
+ "@semantic-release/github": "^10.0.5",
79
+ "@semantic-release/release-notes-generator": "12.1.0",
80
+ "conventional-changelog-conventionalcommits": "7.0.2"
81
+ },
82
+ "devDependencies": {
83
+ "@anolilab/eslint-config": "^15.0.3",
84
+ "@anolilab/prettier-config": "^5.0.14",
85
+ "@anolilab/semantic-release-pnpm": "1.1.0",
86
+ "@babel/core": "^7.24.5",
87
+ "@rushstack/eslint-plugin-security": "^0.8.1",
88
+ "@secretlint/secretlint-rule-preset-recommend": "^8.2.4",
89
+ "conventional-changelog-conventionalcommits": "7.0.2",
90
+ "cross-env": "^7.0.3",
91
+ "eslint": "^8.57.0",
92
+ "eslint-plugin-deprecation": "^2.0.0",
93
+ "eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
94
+ "eslint-plugin-mdx": "^3.1.5",
95
+ "prettier": "^3.2.5",
96
+ "rimraf": "^5.0.7",
97
+ "secretlint": "8.1.2",
98
+ "semantic-release": "^23.1.1",
99
+ "sort-package-json": "^2.10.0",
100
+ "typescript": "^5.4.5"
101
+ },
102
+ "peerDependencies": {
103
+ "@anolilab/semantic-release-pnpm": "1.1.0",
104
+ "@semantic-release/npm": "^11.0.2",
105
+ "semantic-release": "^20.0 || ^21.0 || >=22.0.3",
106
+ "semantic-release-yarn": "^3.0.2"
107
+ },
108
+ "peerDependenciesMeta": {
109
+ "@anolilab/semantic-release-pnpm": {
110
+ "optional": true
91
111
  },
92
- "engines": {
93
- "node": "^18.17 || >=20.6.1"
112
+ "@semantic-release/npm": {
113
+ "optional": true
94
114
  },
95
- "publishConfig": {
96
- "access": "public",
97
- "provenance": true
115
+ "semantic-release-yarn": {
116
+ "optional": true
98
117
  }
99
- }
118
+ },
119
+ "engines": {
120
+ "node": "^18.17 || >=20.6.1"
121
+ },
122
+ "os": [
123
+ "darwin",
124
+ "linux",
125
+ "win32"
126
+ ],
127
+ "publishConfig": {
128
+ "access": "public",
129
+ "provenance": true
130
+ },
131
+ "scripts": {
132
+ "build": "echo 'There is no need for build' && exit 0",
133
+ "build:prod": "echo 'There is no need for build' && exit 0",
134
+ "clean": "rimraf node_modules dist .eslintcache",
135
+ "dev": "echo 'There is no need for dev' && exit 0",
136
+ "lint:eslint": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs",
137
+ "lint:eslint:fix": "eslint . --ext js,cjs,mjs,jsx,ts,tsx,json,yaml,yml,md,mdx --max-warnings=0 --config .eslintrc.cjs --fix",
138
+ "lint:packagejson": "publint --strict",
139
+ "lint:prettier": "prettier --config=.prettierrc.cjs --check .",
140
+ "lint:prettier:fix": "prettier --config=.prettierrc.cjs --write .",
141
+ "lint:types": "echo 'There is no need for types' && exit 0",
142
+ "test": "echo 'There is no need for test' && exit 0",
143
+ "test:coverage": "echo 'There is no need for test' && exit 0",
144
+ "test:ui": "echo 'There is no need for test' && exit 0",
145
+ "test:watch": "echo 'There is no need for test' && exit 0"
146
+ }
147
+ }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- var fs = require('fs');
4
- var path = require('path');
5
- var process = require('process');
6
- var util = require('util');
7
- var packageJsonUtils = require('@anolilab/package-json-utils');
8
-
9
- process.env.CI!==void 0&&process.exit(0);var f=util.promisify(fs.writeFile);console.log("Configuring @anolilab/semantic-release-preset",packageJsonUtils.projectPath,`
10
- `);var u=async()=>{if(packageJsonUtils.pkg!==void 0&&(packageJsonUtils.hasDevDependencies(["multi-semantic-release","@qiwi/multi-semantic-release"])||packageJsonUtils.hasDependencies(["multi-semantic-release","@qiwi/multi-semantic-release"]))){console.warn("\u26A0\uFE0F found use of multi-semantic-release;");return}let e=path.join(packageJsonUtils.projectPath,".releaserc.json");if(fs.existsSync(e)){console.warn("\u26A0\uFE0F .releaserc.json already exists;");return}await f(e,`{
11
- "extends": "@anolilab/semantic-release-preset/npm"
12
- }
13
-
14
- `,"utf-8");};(async()=>{try{await u(),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),process.exit(1);}})();
15
- //# sourceMappingURL=out.js.map
16
- //# sourceMappingURL=postinstall.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","hasDependencies","hasDevDependencies","pkg","projectPath","writeFileAsync","writeReleaseRc","releaseRcPath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,mBAAAC,EAAiB,sBAAAC,EAAoB,OAAAC,EAAK,eAAAC,MAAmB,+BAElEN,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMM,EAAiBL,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,gDAAiDQ,EAAa;AAAA,CAAI,EAK9E,IAAME,EAAiB,SAAY,CAC/B,GACIH,IAAQ,SACPD,EAAmB,CAAC,yBAA0B,8BAA8B,CAAC,GAC1ED,EAAgB,CAAC,yBAA0B,8BAA8B,CAAC,GAChF,CACE,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAEA,IAAMM,EAAgBV,EAAKO,EAAa,iBAAiB,EAGzD,GAAIT,EAAWY,CAAa,EAAG,CAC3B,QAAQ,KAAK,+CAAqC,EAElD,MACJ,CAQA,MAAMF,EAAeE,EANL;AAAA;AAAA;AAAA;AAAA,EAM6B,OAAO,CACxD,GAGC,SAAY,CACT,GAAI,CACA,MAAMD,EAAe,EAErB,QAAQ,IAAI,4CAAqC,EAEjDP,EAAK,CAAC,CACV,OAASS,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBT,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { hasDependencies, hasDevDependencies, pkg, projectPath } from \"@anolilab/package-json-utils\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/semantic-release-preset\", projectPath, \"\\n\");\n\n/**\n * Writes .releaserc.json if it doesn't exist. Warns if it exists.\n */\nconst writeReleaseRc = async () => {\n if (\n pkg !== undefined &&\n (hasDevDependencies([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]) ||\n hasDependencies([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]))\n ) {\n console.warn(\"⚠️ found use of multi-semantic-release;\");\n\n return;\n }\n\n const releaseRcPath = join(projectPath, \".releaserc.json\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(releaseRcPath)) {\n console.warn(\"⚠️ .releaserc.json already exists;\");\n\n return;\n }\n\n const content = `{\n \"extends\": \"@anolilab/semantic-release-preset/npm\"\n}\n\n`;\n\n await writeFileAsync(releaseRcPath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeReleaseRc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
@@ -1,14 +0,0 @@
1
- import { writeFile, existsSync } from 'fs';
2
- import { join } from 'path';
3
- import { env, exit } from 'process';
4
- import { promisify } from 'util';
5
- import { projectPath, pkg, hasDevDependencies, hasDependencies } from '@anolilab/package-json-utils';
6
-
7
- env.CI!==void 0&&exit(0);var f=promisify(writeFile);console.log("Configuring @anolilab/semantic-release-preset",projectPath,`
8
- `);var u=async()=>{if(pkg!==void 0&&(hasDevDependencies(["multi-semantic-release","@qiwi/multi-semantic-release"])||hasDependencies(["multi-semantic-release","@qiwi/multi-semantic-release"]))){console.warn("\u26A0\uFE0F found use of multi-semantic-release;");return}let e=join(projectPath,".releaserc.json");if(existsSync(e)){console.warn("\u26A0\uFE0F .releaserc.json already exists;");return}await f(e,`{
9
- "extends": "@anolilab/semantic-release-preset/npm"
10
- }
11
-
12
- `,"utf-8");};(async()=>{try{await u(),console.log("\u{1F60E} Everything went well, have fun!"),exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),exit(1);}})();
13
- //# sourceMappingURL=out.js.map
14
- //# sourceMappingURL=postinstall.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","hasDependencies","hasDevDependencies","pkg","projectPath","writeFileAsync","writeReleaseRc","releaseRcPath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,mBAAAC,EAAiB,sBAAAC,EAAoB,OAAAC,EAAK,eAAAC,MAAmB,+BAElEN,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMM,EAAiBL,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,gDAAiDQ,EAAa;AAAA,CAAI,EAK9E,IAAME,EAAiB,SAAY,CAC/B,GACIH,IAAQ,SACPD,EAAmB,CAAC,yBAA0B,8BAA8B,CAAC,GAC1ED,EAAgB,CAAC,yBAA0B,8BAA8B,CAAC,GAChF,CACE,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAEA,IAAMM,EAAgBV,EAAKO,EAAa,iBAAiB,EAGzD,GAAIT,EAAWY,CAAa,EAAG,CAC3B,QAAQ,KAAK,+CAAqC,EAElD,MACJ,CAQA,MAAMF,EAAeE,EANL;AAAA;AAAA;AAAA;AAAA,EAM6B,OAAO,CACxD,GAGC,SAAY,CACT,GAAI,CACA,MAAMD,EAAe,EAErB,QAAQ,IAAI,4CAAqC,EAEjDP,EAAK,CAAC,CACV,OAASS,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBT,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { hasDependencies, hasDevDependencies, pkg, projectPath } from \"@anolilab/package-json-utils\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/semantic-release-preset\", projectPath, \"\\n\");\n\n/**\n * Writes .releaserc.json if it doesn't exist. Warns if it exists.\n */\nconst writeReleaseRc = async () => {\n if (\n pkg !== undefined &&\n (hasDevDependencies([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]) ||\n hasDependencies([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]))\n ) {\n console.warn(\"⚠️ found use of multi-semantic-release;\");\n\n return;\n }\n\n const releaseRcPath = join(projectPath, \".releaserc.json\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(releaseRcPath)) {\n console.warn(\"⚠️ .releaserc.json already exists;\");\n\n return;\n }\n\n const content = `{\n \"extends\": \"@anolilab/semantic-release-preset/npm\"\n}\n\n`;\n\n await writeFileAsync(releaseRcPath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeReleaseRc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
package/skip.js DELETED
@@ -1,7 +0,0 @@
1
- if (process.env.SKIP_BUILD) {
2
- // eslint-disable-next-line unicorn/no-process-exit
3
- process.exit(0);
4
- } else {
5
- // eslint-disable-next-line unicorn/no-process-exit
6
- process.exit(1);
7
- }