@anolilab/commitlint-config 4.0.0 → 4.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## @anolilab/commitlint-config [4.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/commitlint-config@4.0.1...@anolilab/commitlint-config@4.0.2) (2023-09-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Various project dependencies have been updated to their respective newer versions. This covers multiple packages such as '@babel/cli', '@babel/core', '@nrwl/js', and 'eslint' among others within the package.json file. This upgrade is necessary to ensure the utilization of the most recent features, optimization and security improvements of the updated packages, and it also helps to maintain overall project consistency. ([38535ab](https://github.com/anolilab/javascript-style-guide/commit/38535abf2557680e3f22e1ff74372764ca11c2f1))
7
+
8
+
9
+ ### Styles
10
+
11
+ * cs fixes ([e053d90](https://github.com/anolilab/javascript-style-guide/commit/e053d90a4ab7a6466699c17d5afec1a7adc2459d))
12
+
13
+
14
+
15
+ ### Dependencies
16
+
17
+ * **@anolilab/package-json-utils:** upgraded to 3.0.6
18
+ * **@anolilab/semantic-release-preset:** upgraded to 7.0.3
19
+
20
+ ## @anolilab/commitlint-config [4.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/commitlint-config@4.0.0...@anolilab/commitlint-config@4.0.1) (2023-09-22)
21
+
22
+
23
+
24
+ ### Dependencies
25
+
26
+ * **@anolilab/semantic-release-preset:** upgraded to 7.0.2
27
+
1
28
  ## @anolilab/commitlint-config [4.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/commitlint-config@3.0.6...@anolilab/commitlint-config@4.0.0) (2023-09-21)
2
29
 
3
30
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var a=/^chore\(release\):.*\[skip ci\]/,t={extends:["@commitlint/config-conventional"],ignores:[e=>a.test(e)],rules:{"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"scope-case":[2,"always","lower-case"],"subject-case":[2,"never",["sentence-case","start-case","pascal-case","upper-case"]],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","deps","docs","feat","fix","perf","refactor","revert","security","style","test","translation"]]}},s=t;
3
+ var a=/^chore\(release\):.*\[skip ci\]/u,t={extends:["@commitlint/config-conventional"],ignores:[e=>a.test(e)],rules:{"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"scope-case":[2,"always","lower-case"],"subject-case":[2,"never",["sentence-case","start-case","pascal-case","upper-case"]],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","deps","docs","feat","fix","perf","refactor","revert","security","style","test","translation"]]}},s=t;
4
4
 
5
5
  module.exports = s;
6
6
  //# sourceMappingURL=out.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["automaticCommitPattern","config","commitMessage","src_default"],"mappings":"AACA,IAAMA,EAAyB,kCAEzBC,EAAS,CACX,QAAS,CAAC,iCAAiC,EAM3C,QAAS,CAAEC,GAAmCF,EAAuB,KAAKE,CAAa,CAAC,EACxF,MAAO,CACH,qBAAsB,CAAC,EAAG,QAAQ,EAClC,uBAAwB,CAAC,EAAG,SAAU,GAAG,EACzC,uBAAwB,CAAC,EAAG,QAAQ,EACpC,yBAA0B,CAAC,EAAG,SAAU,GAAG,EAC3C,oBAAqB,CAAC,EAAG,SAAU,GAAG,EACtC,aAAc,CAAC,EAAG,SAAU,YAAY,EACxC,eAAgB,CAAC,EAAG,QAAS,CAAC,gBAAiB,aAAc,cAAe,YAAY,CAAC,EACzF,gBAAiB,CAAC,EAAG,OAAO,EAC5B,oBAAqB,CAAC,EAAG,QAAS,GAAG,EACrC,YAAa,CAAC,EAAG,SAAU,YAAY,EACvC,aAAc,CAAC,EAAG,OAAO,EACzB,YAAa,CACT,EACA,SACA,CACI,QACA,QACA,KACA,OACA,OACA,OACA,MACA,OACA,WACA,SACA,WACA,QACA,OACA,aACJ,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["// eslint-disable-next-line unicorn/better-regex\nconst automaticCommitPattern = /^chore\\(release\\):.*\\[skip ci\\]/;\n\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n /**\n * This resolves a linting conflict between commitlint's body-max-line-length\n * due to @semantic-release/git putting release notes in the commit body\n * https://github.com/semantic-release/git/issues/331\n */\n ignores: [(commitMessage: string): boolean => automaticCommitPattern.test(commitMessage)],\n rules: {\n \"body-leading-blank\": [1, \"always\"],\n \"body-max-line-length\": [2, \"always\", 100],\n \"footer-leading-blank\": [1, \"always\"],\n \"footer-max-line-length\": [2, \"always\", 100],\n \"header-max-length\": [2, \"always\", 100],\n \"scope-case\": [2, \"always\", \"lower-case\"],\n \"subject-case\": [2, \"never\", [\"sentence-case\", \"start-case\", \"pascal-case\", \"upper-case\"]],\n \"subject-empty\": [2, \"never\"],\n \"subject-full-stop\": [2, \"never\", \".\"],\n \"type-case\": [2, \"always\", \"lower-case\"],\n \"type-empty\": [2, \"never\"],\n \"type-enum\": [\n 2,\n \"always\",\n [\n \"build\",\n \"chore\",\n \"ci\",\n \"deps\",\n \"docs\",\n \"feat\",\n \"fix\",\n \"perf\",\n \"refactor\",\n \"revert\",\n \"security\",\n \"style\",\n \"test\",\n \"translation\",\n ],\n ],\n },\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["automaticCommitPattern","config","commitMessage","src_default"],"mappings":"AAAA,IAAMA,EAAyB,mCAEzBC,EAAS,CACX,QAAS,CAAC,iCAAiC,EAM3C,QAAS,CAAEC,GAAmCF,EAAuB,KAAKE,CAAa,CAAC,EACxF,MAAO,CACH,qBAAsB,CAAC,EAAG,QAAQ,EAClC,uBAAwB,CAAC,EAAG,SAAU,GAAG,EACzC,uBAAwB,CAAC,EAAG,QAAQ,EACpC,yBAA0B,CAAC,EAAG,SAAU,GAAG,EAC3C,oBAAqB,CAAC,EAAG,SAAU,GAAG,EACtC,aAAc,CAAC,EAAG,SAAU,YAAY,EACxC,eAAgB,CAAC,EAAG,QAAS,CAAC,gBAAiB,aAAc,cAAe,YAAY,CAAC,EACzF,gBAAiB,CAAC,EAAG,OAAO,EAC5B,oBAAqB,CAAC,EAAG,QAAS,GAAG,EACrC,YAAa,CAAC,EAAG,SAAU,YAAY,EACvC,aAAc,CAAC,EAAG,OAAO,EACzB,YAAa,CACT,EACA,SACA,CAAC,QAAS,QAAS,KAAM,OAAQ,OAAQ,OAAQ,MAAO,OAAQ,WAAY,SAAU,WAAY,QAAS,OAAQ,aAAa,CACpI,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["const automaticCommitPattern = /^chore\\(release\\):.*\\[skip ci\\]/u;\n\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n /**\n * This resolves a linting conflict between commitlint's body-max-line-length\n * due to @semantic-release/git putting release notes in the commit body\n * https://github.com/semantic-release/git/issues/331\n */\n ignores: [(commitMessage: string): boolean => automaticCommitPattern.test(commitMessage)],\n rules: {\n \"body-leading-blank\": [1, \"always\"],\n \"body-max-line-length\": [2, \"always\", 100],\n \"footer-leading-blank\": [1, \"always\"],\n \"footer-max-line-length\": [2, \"always\", 100],\n \"header-max-length\": [2, \"always\", 100],\n \"scope-case\": [2, \"always\", \"lower-case\"],\n \"subject-case\": [2, \"never\", [\"sentence-case\", \"start-case\", \"pascal-case\", \"upper-case\"]],\n \"subject-empty\": [2, \"never\"],\n \"subject-full-stop\": [2, \"never\", \".\"],\n \"type-case\": [2, \"always\", \"lower-case\"],\n \"type-empty\": [2, \"never\"],\n \"type-enum\": [\n 2,\n \"always\",\n [\"build\", \"chore\", \"ci\", \"deps\", \"docs\", \"feat\", \"fix\", \"perf\", \"refactor\", \"revert\", \"security\", \"style\", \"test\", \"translation\"],\n ],\n },\n};\n\nexport default config;\n"]}
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var a=/^chore\(release\):.*\[skip ci\]/,t={extends:["@commitlint/config-conventional"],ignores:[e=>a.test(e)],rules:{"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"scope-case":[2,"always","lower-case"],"subject-case":[2,"never",["sentence-case","start-case","pascal-case","upper-case"]],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","deps","docs","feat","fix","perf","refactor","revert","security","style","test","translation"]]}},s=t;
1
+ var a=/^chore\(release\):.*\[skip ci\]/u,t={extends:["@commitlint/config-conventional"],ignores:[e=>a.test(e)],rules:{"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"scope-case":[2,"always","lower-case"],"subject-case":[2,"never",["sentence-case","start-case","pascal-case","upper-case"]],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","deps","docs","feat","fix","perf","refactor","revert","security","style","test","translation"]]}},s=t;
2
2
 
3
3
  export { s as default };
4
4
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["automaticCommitPattern","config","commitMessage","src_default"],"mappings":"AACA,IAAMA,EAAyB,kCAEzBC,EAAS,CACX,QAAS,CAAC,iCAAiC,EAM3C,QAAS,CAAEC,GAAmCF,EAAuB,KAAKE,CAAa,CAAC,EACxF,MAAO,CACH,qBAAsB,CAAC,EAAG,QAAQ,EAClC,uBAAwB,CAAC,EAAG,SAAU,GAAG,EACzC,uBAAwB,CAAC,EAAG,QAAQ,EACpC,yBAA0B,CAAC,EAAG,SAAU,GAAG,EAC3C,oBAAqB,CAAC,EAAG,SAAU,GAAG,EACtC,aAAc,CAAC,EAAG,SAAU,YAAY,EACxC,eAAgB,CAAC,EAAG,QAAS,CAAC,gBAAiB,aAAc,cAAe,YAAY,CAAC,EACzF,gBAAiB,CAAC,EAAG,OAAO,EAC5B,oBAAqB,CAAC,EAAG,QAAS,GAAG,EACrC,YAAa,CAAC,EAAG,SAAU,YAAY,EACvC,aAAc,CAAC,EAAG,OAAO,EACzB,YAAa,CACT,EACA,SACA,CACI,QACA,QACA,KACA,OACA,OACA,OACA,MACA,OACA,WACA,SACA,WACA,QACA,OACA,aACJ,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["// eslint-disable-next-line unicorn/better-regex\nconst automaticCommitPattern = /^chore\\(release\\):.*\\[skip ci\\]/;\n\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n /**\n * This resolves a linting conflict between commitlint's body-max-line-length\n * due to @semantic-release/git putting release notes in the commit body\n * https://github.com/semantic-release/git/issues/331\n */\n ignores: [(commitMessage: string): boolean => automaticCommitPattern.test(commitMessage)],\n rules: {\n \"body-leading-blank\": [1, \"always\"],\n \"body-max-line-length\": [2, \"always\", 100],\n \"footer-leading-blank\": [1, \"always\"],\n \"footer-max-line-length\": [2, \"always\", 100],\n \"header-max-length\": [2, \"always\", 100],\n \"scope-case\": [2, \"always\", \"lower-case\"],\n \"subject-case\": [2, \"never\", [\"sentence-case\", \"start-case\", \"pascal-case\", \"upper-case\"]],\n \"subject-empty\": [2, \"never\"],\n \"subject-full-stop\": [2, \"never\", \".\"],\n \"type-case\": [2, \"always\", \"lower-case\"],\n \"type-empty\": [2, \"never\"],\n \"type-enum\": [\n 2,\n \"always\",\n [\n \"build\",\n \"chore\",\n \"ci\",\n \"deps\",\n \"docs\",\n \"feat\",\n \"fix\",\n \"perf\",\n \"refactor\",\n \"revert\",\n \"security\",\n \"style\",\n \"test\",\n \"translation\",\n ],\n ],\n },\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["automaticCommitPattern","config","commitMessage","src_default"],"mappings":"AAAA,IAAMA,EAAyB,mCAEzBC,EAAS,CACX,QAAS,CAAC,iCAAiC,EAM3C,QAAS,CAAEC,GAAmCF,EAAuB,KAAKE,CAAa,CAAC,EACxF,MAAO,CACH,qBAAsB,CAAC,EAAG,QAAQ,EAClC,uBAAwB,CAAC,EAAG,SAAU,GAAG,EACzC,uBAAwB,CAAC,EAAG,QAAQ,EACpC,yBAA0B,CAAC,EAAG,SAAU,GAAG,EAC3C,oBAAqB,CAAC,EAAG,SAAU,GAAG,EACtC,aAAc,CAAC,EAAG,SAAU,YAAY,EACxC,eAAgB,CAAC,EAAG,QAAS,CAAC,gBAAiB,aAAc,cAAe,YAAY,CAAC,EACzF,gBAAiB,CAAC,EAAG,OAAO,EAC5B,oBAAqB,CAAC,EAAG,QAAS,GAAG,EACrC,YAAa,CAAC,EAAG,SAAU,YAAY,EACvC,aAAc,CAAC,EAAG,OAAO,EACzB,YAAa,CACT,EACA,SACA,CAAC,QAAS,QAAS,KAAM,OAAQ,OAAQ,OAAQ,MAAO,OAAQ,WAAY,SAAU,WAAY,QAAS,OAAQ,aAAa,CACpI,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["const automaticCommitPattern = /^chore\\(release\\):.*\\[skip ci\\]/u;\n\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n /**\n * This resolves a linting conflict between commitlint's body-max-line-length\n * due to @semantic-release/git putting release notes in the commit body\n * https://github.com/semantic-release/git/issues/331\n */\n ignores: [(commitMessage: string): boolean => automaticCommitPattern.test(commitMessage)],\n rules: {\n \"body-leading-blank\": [1, \"always\"],\n \"body-max-line-length\": [2, \"always\", 100],\n \"footer-leading-blank\": [1, \"always\"],\n \"footer-max-line-length\": [2, \"always\", 100],\n \"header-max-length\": [2, \"always\", 100],\n \"scope-case\": [2, \"always\", \"lower-case\"],\n \"subject-case\": [2, \"never\", [\"sentence-case\", \"start-case\", \"pascal-case\", \"upper-case\"]],\n \"subject-empty\": [2, \"never\"],\n \"subject-full-stop\": [2, \"never\", \".\"],\n \"type-case\": [2, \"always\", \"lower-case\"],\n \"type-empty\": [2, \"never\"],\n \"type-enum\": [\n 2,\n \"always\",\n [\"build\", \"chore\", \"ci\", \"deps\", \"docs\", \"feat\", \"fix\", \"perf\", \"refactor\", \"revert\", \"security\", \"style\", \"test\", \"translation\"],\n ],\n },\n};\n\nexport default config;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,0CAA2CI,EAAa;AAAA,CAAI,EAKxE,IAAME,EAAwB,SAAY,CACtC,IAAMC,EAAiBN,EAAKG,EAAa,sBAAsB,EAG/D,GAAIL,EAAWQ,CAAc,EAAG,CAC5B,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAYA,MAAMF,EAAeE,EAVL,GAAGJ,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUhC,OAAO,CACzD,EAKMK,EAAY,SAAY,CAC1B,IAAMC,EAAWR,EAAKG,EAAa,OAAO,EAG1C,GAAIL,EAAWU,CAAQ,EAAG,CACtB,QAAQ,KAAK,qCAA2B,EAExC,MACJ,CAQA,MAAMJ,EAAeI,EANL;AAAA;AAAA;AAAA;AAAA,EAMwB,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMH,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/commitlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = async () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return;\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@anolilab/commitlint-config\"],\n rules: {\n // overwrite rules here\n // or extend rules\n },\n};\n\n`;\n\n await writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = async () => {\n const filePath = join(projectPath, \".czrc\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return;\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,0CAA2CI,EAAa;AAAA,CAAI,EAKxE,IAAME,EAAwB,SAAY,CACtC,IAAMC,EAAiBN,EAAKG,EAAa,sBAAsB,EAG/D,GAAIL,EAAWQ,CAAc,EAAG,CAC5B,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAYA,MAAMF,EAAeE,EAVL,GAAGJ,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUhC,OAAO,CACzD,EAKMK,EAAY,SAAY,CAC1B,IAAMC,EAAWR,EAAKG,EAAa,OAAO,EAG1C,GAAIL,EAAWU,CAAQ,EAAG,CACtB,QAAQ,KAAK,qCAA2B,EAExC,MACJ,CAQA,MAAMJ,EAAeI,EANL;AAAA;AAAA;AAAA;AAAA,EAMwB,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMH,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/commitlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = async () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return;\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@anolilab/commitlint-config\"],\n rules: {\n // overwrite rules here\n // or extend rules\n },\n};\n\n`;\n\n await writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = async () => {\n const filePath = join(projectPath, \".czrc\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return;\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,0CAA2CI,EAAa;AAAA,CAAI,EAKxE,IAAME,EAAwB,SAAY,CACtC,IAAMC,EAAiBN,EAAKG,EAAa,sBAAsB,EAG/D,GAAIL,EAAWQ,CAAc,EAAG,CAC5B,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAYA,MAAMF,EAAeE,EAVL,GAAGJ,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUhC,OAAO,CACzD,EAKMK,EAAY,SAAY,CAC1B,IAAMC,EAAWR,EAAKG,EAAa,OAAO,EAG1C,GAAIL,EAAWU,CAAQ,EAAG,CACtB,QAAQ,KAAK,qCAA2B,EAExC,MACJ,CAQA,MAAMJ,EAAeI,EANL;AAAA;AAAA;AAAA;AAAA,EAMwB,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMH,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/commitlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = async () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return;\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@anolilab/commitlint-config\"],\n rules: {\n // overwrite rules here\n // or extend rules\n },\n};\n\n`;\n\n await writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = async () => {\n const filePath = join(projectPath, \".czrc\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return;\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","writeCommitLintConfig","commitlintPath","writeCzrc","filePath","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,0CAA2CI,EAAa;AAAA,CAAI,EAKxE,IAAME,EAAwB,SAAY,CACtC,IAAMC,EAAiBN,EAAKG,EAAa,sBAAsB,EAG/D,GAAIL,EAAWQ,CAAc,EAAG,CAC5B,QAAQ,KAAK,oDAA0C,EAEvD,MACJ,CAYA,MAAMF,EAAeE,EAVL,GAAGJ,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUhC,OAAO,CACzD,EAKMK,EAAY,SAAY,CAC1B,IAAMC,EAAWR,EAAKG,EAAa,OAAO,EAG1C,GAAIL,EAAWU,CAAQ,EAAG,CACtB,QAAQ,KAAK,qCAA2B,EAExC,MACJ,CAQA,MAAMJ,EAAeI,EANL;AAAA;AAAA;AAAA;AAAA,EAMwB,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CACA,MAAMH,EAAsB,EAC5B,MAAME,EAAU,EAEhB,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/commitlint-config\", projectPath, \"\\n\");\n\n/**\n * Writes commitlint.config.js if it doesn't exist. Warns if it exists.\n */\nconst writeCommitLintConfig = async () => {\n const commitlintPath = join(projectPath, \"commitlint.config.js\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(commitlintPath)) {\n console.warn(\"⚠️ commitlint.config.js already exists;\");\n\n return;\n }\n\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n extends: [\"@anolilab/commitlint-config\"],\n rules: {\n // overwrite rules here\n // or extend rules\n },\n};\n\n`;\n\n await writeFileAsync(commitlintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .czrc if it doesn't exist. Warns if it exists.\n */\nconst writeCzrc = async () => {\n const filePath = join(projectPath, \".czrc\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(filePath)) {\n console.warn(\"⚠️ .czrc already exists;\");\n\n return;\n }\n\n const content = `{\n \"path\": \"cz-conventional-changelog\"\n}\n\n`;\n\n await writeFileAsync(filePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeCommitLintConfig();\n await writeCzrc();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/commitlint-config",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Anolilab´s shareable coding standard config for commitlint.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -53,7 +53,7 @@
53
53
  "postinstall": "node ./skip.js || node ./dist/postinstall.js"
54
54
  },
55
55
  "dependencies": {
56
- "@anolilab/package-json-utils": "3.0.5",
56
+ "@anolilab/package-json-utils": "3.0.6",
57
57
  "@commitlint/config-conventional": "^17.7.0",
58
58
  "@commitlint/core": "^17.7.1",
59
59
  "commitizen": "^4.3.0",
@@ -61,9 +61,9 @@
61
61
  "cz-conventional-changelog": "^3.3.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@anolilab/semantic-release-preset": "7.0.0",
64
+ "@anolilab/semantic-release-preset": "7.0.3",
65
65
  "@commitlint/cli": "^17.7.1",
66
- "rimraf": "^5.0.1",
66
+ "rimraf": "^5.0.2",
67
67
  "tsup": "^7.2.0",
68
68
  "vitest": "^0.34.5"
69
69
  },