@anolilab/semantic-release-preset 3.0.0 → 3.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,16 @@
1
+ ## @anolilab/semantic-release-preset [3.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@3.0.0...@anolilab/semantic-release-preset@3.1.0) (2023-06-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * changed export for npm and no npm semantic-release config ([5af5fd6](https://github.com/anolilab/javascript-style-guide/commit/5af5fd6a35d1e1e88bd55a6cd4795bb1830392ff))
7
+ * transformed package to use cjs and mjs ([500503e](https://github.com/anolilab/javascript-style-guide/commit/500503e7d7e8ad2a8d7a448a94d82b4a0afc52ff))
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * postinstall.ts should use the @anolilab/semantic-release-preset/npm for the extends key ([8975abc](https://github.com/anolilab/javascript-style-guide/commit/8975abc6de5fb2838671c8cae89ebfb5b6fcf21d))
13
+
1
14
  ## @anolilab/semantic-release-preset [3.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/semantic-release-preset@2.2.1...@anolilab/semantic-release-preset@3.0.0) (2023-06-10)
2
15
 
3
16
 
package/README.md CHANGED
@@ -52,7 +52,7 @@ With npm:
52
52
 
53
53
  ```json
54
54
  {
55
- "extends": "@anolilab/semantic-release-preset"
55
+ "extends": "@anolilab/semantic-release-preset/npm"
56
56
  }
57
57
  ```
58
58
 
@@ -60,7 +60,7 @@ Without npm:
60
60
 
61
61
  ```json
62
62
  {
63
- "extends": "@anolilab/semantic-release-preset/.releaserc-without-npm.json"
63
+ "extends": "@anolilab/semantic-release-preset"
64
64
  }
65
65
  ```
66
66
 
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var packageJsonUtils = require('@anolilab/package-json-utils');
5
+ var fs = require('fs');
6
+ var path = require('path');
7
+ var util = require('util');
8
+
9
+ process.env.CI&&process.exit(0);var r=util.promisify(fs.writeFile);console.log("Configuring @anolilab/semantic-release-preset",packageJsonUtils.projectPath,`
10
+ `);var u=()=>{if(packageJsonUtils.pkg&&(packageJsonUtils.hasDevelopmentDep(["multi-semantic-release","@qiwi/multi-semantic-release"])||packageJsonUtils.hasDep(["multi-semantic-release","@qiwi/multi-semantic-release"])))return console.warn("\u26A0\uFE0F found use of multi-semantic-release;"),Promise.resolve();let e=path.join(packageJsonUtils.projectPath,".releaserc.json");return fs.existsSync(e)?(console.warn("\u26A0\uFE0F .releaserc.json already exists;"),Promise.resolve()):r(e,`{
11
+ "extends": "@anolilab/semantic-release-preset/npm"
12
+ }
13
+
14
+ `,"utf-8")},p=()=>{let e=path.join(packageJsonUtils.projectPath,"commitlint.config.js");return fs.existsSync(e)?(console.warn("\u26A0\uFE0F commitlint.config.js already exists;"),Promise.resolve()):r(e,`${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} {
15
+ extends: ["@commitlint/config-conventional"],
16
+ };
17
+
18
+ `,"utf-8")},w=()=>{let e=path.join(packageJsonUtils.projectPath,".czrc");return fs.existsSync(e)?(console.warn("\u26A0\uFE0F .czrc already exists;"),Promise.resolve()):r(e,`{
19
+ "path": "cz-conventional-changelog"
20
+ }
21
+
22
+ `,"utf-8")};(async()=>{try{await u(),await p(),await w(),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);}})();
23
+ //# sourceMappingURL=out.js.map
24
+ //# sourceMappingURL=postinstall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["hasDep","hasDevelopmentDep","packageIsTypeModule","pkg","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writeReleaseRc","releaseRcPath","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":";AAEA,OACC,UAAAA,EAAQ,qBAAAC,EAAmB,uBAAAC,EAAqB,OAAAC,EAAK,eAAAC,MAC/C,+BACP,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,gDAAiDF,EAAa;AAAA,CAAI,EAK9E,IAAMM,EAAiB,IAAM,CACzB,GACIP,IACIF,EAAkB,CAAC,yBAA0B,8BAA8B,CAAC,GAAKD,EAAO,CAAC,yBAA0B,8BAA8B,CAAC,GAEtJ,eAAQ,KAAK,oDAA0C,EAEhD,QAAQ,QAAQ,EAG3B,IAAMW,EAAgBJ,EAAKH,EAAa,iBAAiB,EAEzD,OAAIC,EAAWM,CAAa,GACxB,QAAQ,KAAK,+CAAqC,EAE3C,QAAQ,QAAQ,GASpBF,EAAeE,EANN;AAAA;AAAA;AAAA;AAAA,EAM8B,OAAO,CACzD,EAKMC,EAAwB,IAAM,CAChC,IAAMC,EAAiBN,EAAKH,EAAa,sBAAsB,EAE/D,OAAIC,EAAWQ,CAAc,GACzB,QAAQ,KAAK,oDAA0C,EAEhD,QAAQ,QAAQ,GASpBJ,EAAeI,EANN,GAAGX,EAAsB,iBAAmB;AAAA;AAAA;AAAA;AAAA,EAMb,OAAO,CAC1D,EAKMY,EAAY,IAAM,CACpB,IAAMC,EAAWR,EAAKH,EAAa,OAAO,EAE1C,OAAIC,EAAWU,CAAQ,GACnB,QAAQ,KAAK,qCAA2B,EAEjC,QAAQ,QAAQ,GASpBN,EAAeM,EANN;AAAA;AAAA;AAAA;AAAA,EAMyB,OAAO,CACpD,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAe,EACrB,MAAME,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAEjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["#!/usr/bin/env node\n\nimport {\n hasDep, hasDevelopmentDep, packageIsTypeModule, pkg, projectPath,\n} from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line no-undef\n process.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 = () => {\n if (\n pkg\n && (hasDevelopmentDep([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]) || hasDep([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]))\n ) {\n console.warn(\"⚠️ found use of multi-semantic-release;\");\n\n return Promise.resolve();\n }\n\n const releaseRcPath = join(projectPath, \".releaserc.json\");\n\n if (existsSync(releaseRcPath)) {\n console.warn(\"⚠️ .releaserc.json already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `{\n \"extends\": \"@anolilab/semantic-release-preset/npm\"\n}\n\n`;\n\n return writeFileAsync(releaseRcPath, content, \"utf-8\");\n};\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@commitlint/config-conventional\"],\n};\n\n`;\n\n return writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = () => {\n const filePath = join(projectPath, \".czrc\");\n\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n return writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeReleaseRc();\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n // eslint-disable-next-line no-undef\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n})();\n"]}
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import { projectPath, pkg, hasDevelopmentDep, hasDep, packageIsTypeModule } from '@anolilab/package-json-utils';
3
+ import { writeFile, existsSync } from 'fs';
4
+ import { join } from 'path';
5
+ import { promisify } from 'util';
6
+
7
+ process.env.CI&&process.exit(0);var r=promisify(writeFile);console.log("Configuring @anolilab/semantic-release-preset",projectPath,`
8
+ `);var u=()=>{if(pkg&&(hasDevelopmentDep(["multi-semantic-release","@qiwi/multi-semantic-release"])||hasDep(["multi-semantic-release","@qiwi/multi-semantic-release"])))return console.warn("\u26A0\uFE0F found use of multi-semantic-release;"),Promise.resolve();let e=join(projectPath,".releaserc.json");return existsSync(e)?(console.warn("\u26A0\uFE0F .releaserc.json already exists;"),Promise.resolve()):r(e,`{
9
+ "extends": "@anolilab/semantic-release-preset/npm"
10
+ }
11
+
12
+ `,"utf-8")},p=()=>{let e=join(projectPath,"commitlint.config.js");return existsSync(e)?(console.warn("\u26A0\uFE0F commitlint.config.js already exists;"),Promise.resolve()):r(e,`${packageIsTypeModule?"export default":"module.exports ="} {
13
+ extends: ["@commitlint/config-conventional"],
14
+ };
15
+
16
+ `,"utf-8")},w=()=>{let e=join(projectPath,".czrc");return existsSync(e)?(console.warn("\u26A0\uFE0F .czrc already exists;"),Promise.resolve()):r(e,`{
17
+ "path": "cz-conventional-changelog"
18
+ }
19
+
20
+ `,"utf-8")};(async()=>{try{await u(),await p(),await w(),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);}})();
21
+ //# sourceMappingURL=out.js.map
22
+ //# sourceMappingURL=postinstall.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["hasDep","hasDevelopmentDep","packageIsTypeModule","pkg","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writeReleaseRc","releaseRcPath","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":";AAEA,OACC,UAAAA,EAAQ,qBAAAC,EAAmB,uBAAAC,EAAqB,OAAAC,EAAK,eAAAC,MAC/C,+BACP,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,gDAAiDF,EAAa;AAAA,CAAI,EAK9E,IAAMM,EAAiB,IAAM,CACzB,GACIP,IACIF,EAAkB,CAAC,yBAA0B,8BAA8B,CAAC,GAAKD,EAAO,CAAC,yBAA0B,8BAA8B,CAAC,GAEtJ,eAAQ,KAAK,oDAA0C,EAEhD,QAAQ,QAAQ,EAG3B,IAAMW,EAAgBJ,EAAKH,EAAa,iBAAiB,EAEzD,OAAIC,EAAWM,CAAa,GACxB,QAAQ,KAAK,+CAAqC,EAE3C,QAAQ,QAAQ,GASpBF,EAAeE,EANN;AAAA;AAAA;AAAA;AAAA,EAM8B,OAAO,CACzD,EAKMC,EAAwB,IAAM,CAChC,IAAMC,EAAiBN,EAAKH,EAAa,sBAAsB,EAE/D,OAAIC,EAAWQ,CAAc,GACzB,QAAQ,KAAK,oDAA0C,EAEhD,QAAQ,QAAQ,GASpBJ,EAAeI,EANN,GAAGX,EAAsB,iBAAmB;AAAA;AAAA;AAAA;AAAA,EAMb,OAAO,CAC1D,EAKMY,EAAY,IAAM,CACpB,IAAMC,EAAWR,EAAKH,EAAa,OAAO,EAE1C,OAAIC,EAAWU,CAAQ,GACnB,QAAQ,KAAK,qCAA2B,EAEjC,QAAQ,QAAQ,GASpBN,EAAeM,EANN;AAAA;AAAA;AAAA;AAAA,EAMyB,OAAO,CACpD,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAe,EACrB,MAAME,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAEjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["#!/usr/bin/env node\n\nimport {\n hasDep, hasDevelopmentDep, packageIsTypeModule, pkg, projectPath,\n} from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line no-undef\n process.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 = () => {\n if (\n pkg\n && (hasDevelopmentDep([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]) || hasDep([\"multi-semantic-release\", \"@qiwi/multi-semantic-release\"]))\n ) {\n console.warn(\"⚠️ found use of multi-semantic-release;\");\n\n return Promise.resolve();\n }\n\n const releaseRcPath = join(projectPath, \".releaserc.json\");\n\n if (existsSync(releaseRcPath)) {\n console.warn(\"⚠️ .releaserc.json already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `{\n \"extends\": \"@anolilab/semantic-release-preset/npm\"\n}\n\n`;\n\n return writeFileAsync(releaseRcPath, content, \"utf-8\");\n};\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@commitlint/config-conventional\"],\n};\n\n`;\n\n return writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = () => {\n const filePath = join(projectPath, \".czrc\");\n\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return Promise.resolve();\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n return writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeReleaseRc();\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n // eslint-disable-next-line no-undef\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n // eslint-disable-next-line no-undef\n process.exit(1);\n }\n})();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/semantic-release-preset",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Anolilab Coding Standard for semantic-release.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -34,20 +34,35 @@
34
34
  "name": "Daniel Bannert",
35
35
  "email": "d.bannert@anolilab.de"
36
36
  },
37
- "type": "module",
38
- "main": ".releaserc-with-npm.json",
37
+ "exports": {
38
+ ".": {
39
+ "require": "./config/without-npm.json",
40
+ "import": "./config/without-npm.json"
41
+ },
42
+ "./npm": {
43
+ "require": "./config/with-npm.json",
44
+ "import": "./config/with-npm.json"
45
+ },
46
+ "./package.json": "./package.json"
47
+ },
48
+ "main": "config/without-npm.json",
49
+ "source": "src/postinstall.ts",
39
50
  "files": [
40
- "lib",
51
+ "dist",
41
52
  "README.md",
42
53
  "CHANGELOG.md",
43
54
  "LICENSE.md",
44
- ".releaserc-with-npm.json",
45
- ".releaserc-without-npm.json"
55
+ "config/with-npm.json",
56
+ "config/without-npm.json"
46
57
  ],
47
58
  "scripts": {
48
- "postinstall": "node lib/postinstall.js"
59
+ "build": "cross-env NODE_ENV=development tsup",
60
+ "build:prod": "cross-env NODE_ENV=production tsup",
61
+ "clean": "rimraf node_modules dist",
62
+ "postinstall": "node ./skip.js || node ./dist/postinstall.js"
49
63
  },
50
64
  "dependencies": {
65
+ "@anolilab/package-json-utils": "1.2.0",
51
66
  "@commitlint/cli": "^17.6.5",
52
67
  "@commitlint/config-conventional": "^17.6.5",
53
68
  "@commitlint/core": "^17.6.5",
@@ -75,21 +90,5 @@
75
90
  "publishConfig": {
76
91
  "access": "public",
77
92
  "provenance": true
78
- },
79
- "pnpm": {
80
- "overrides": {
81
- "glob-parent@<5.1.2": ">=5.1.2",
82
- "minimist@<1.2.6": ">=1.2.6",
83
- "chrono-node@<2.2.4": ">=2.2.4",
84
- "yargs-parser@>=6.0.0 <13.1.2": ">=13.1.2",
85
- "trim@<0.0.3": ">=0.0.3",
86
- "trim-newlines@<3.0.1": ">=3.0.1",
87
- "moment@<2.29.2": ">=2.29.2",
88
- "semver-regex@<3.1.4": ">=3.1.4",
89
- "got@<11.8.5": ">=11.8.5",
90
- "moment@>=2.18.0 <2.29.4": ">=2.29.4",
91
- "ansi-regex@>=3.0.0 <3.0.1": ">=3.0.1",
92
- "ansi-regex@>=4.0.0 <4.1.1": ">=4.1.1"
93
- }
94
93
  }
95
94
  }
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { existsSync, readFileSync, writeFile } from "node:fs";
4
- import { join, resolve } from "node:path";
5
- import { promisify } from "node:util";
6
-
7
- // eslint-disable-next-line no-undef
8
- if (process.env.CI) {
9
- // eslint-disable-next-line no-undef
10
- process.exit(0);
11
- }
12
-
13
- const writeFileAsync = promisify(writeFile);
14
-
15
- // get the path to the host project.
16
- // eslint-disable-next-line no-undef
17
- const projectPath = resolve(process.cwd(), "..", "..", "..");
18
-
19
- console.log("Configuring @anolilab/semantic-release-preset", projectPath, "\n");
20
-
21
- /**
22
- * Writes .releaserc.json if it doesn't exist. Warns if it exists.
23
- */
24
- const writeReleaserc = () => {
25
- const packageJsonPath = join(projectPath, "package.json");
26
-
27
- if (existsSync(packageJsonPath)) {
28
- const packageJsonContent = readFileSync(packageJsonPath, "utf8");
29
-
30
- if (packageJsonContent.includes("multi-semantic-release")) {
31
- console.warn("⚠️ found use of multi-semantic-release;");
32
-
33
- return Promise.resolve();
34
- }
35
- }
36
-
37
- const filePath = join(projectPath, ".releaserc.json");
38
-
39
- if (existsSync(filePath)) {
40
- console.warn("⚠️ .releaserc.json already exists;");
41
-
42
- return Promise.resolve();
43
- }
44
-
45
- const content = `{
46
- "extends": "@anolilab/semantic-release-preset"
47
- }
48
- `;
49
-
50
- return writeFileAsync(filePath, content, "utf-8");
51
- };
52
-
53
- /**
54
- * Writes commitlint.config.cjs if it doesn't exist. Warns if it exists.
55
- */
56
- const writeCommitlintConfig = () => {
57
- const filePath = join(projectPath, "commitlint.config.cjs");
58
-
59
- if (existsSync(filePath)) {
60
- console.warn("⚠️ commitlint.config.cjs already exists;");
61
-
62
- return Promise.resolve();
63
- }
64
-
65
- const content = `module.exports = {
66
- extends: ["@commitlint/config-conventional"],
67
- };
68
-
69
- `;
70
-
71
- return writeFileAsync(filePath, content, "utf-8");
72
- };
73
-
74
- /**
75
- * Writes .czrc if it doesn't exist. Warns if it exists.
76
- */
77
- const writeCzrc = () => {
78
- const filePath = join(projectPath, ".czrc");
79
-
80
- if (existsSync(filePath)) {
81
- console.warn("⚠️ .czrc already exists;");
82
-
83
- return Promise.resolve();
84
- }
85
-
86
- const content = `{
87
- "path": "cz-conventional-changelog"
88
- }
89
-
90
- `;
91
-
92
- return writeFileAsync(filePath, content, "utf-8");
93
- };
94
-
95
- // eslint-disable-next-line unicorn/prefer-top-level-await
96
- (async () => {
97
- try {
98
- await writeReleaserc();
99
- await writeCommitlintConfig();
100
- await writeCzrc();
101
-
102
- console.log("😎 Everything went well, have fun!");
103
- // eslint-disable-next-line no-undef
104
- process.exit(0);
105
- } catch (error) {
106
- console.log("😬 something went wrong:");
107
- console.error(error.message);
108
- // eslint-disable-next-line no-undef
109
- process.exit(1);
110
- }
111
- })();