@w5s/commitlint-config 3.14.0 → 3.16.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/dist/index.js CHANGED
@@ -79,9 +79,9 @@ const config = {
79
79
  //#endregion
80
80
  //#region src/meta.ts
81
81
  const meta = Object.freeze({
82
- buildNumber: 1,
82
+ buildNumber: 1787664484,
83
83
  name: "@w5s/commitlint-config",
84
- version: "3.14.0"
84
+ version: "3.16.0"
85
85
  });
86
86
  //#endregion
87
87
  export { config as default, meta };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/plugin.ts","../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\n\nimport { Emoji, GitmojiCode } from '@w5s/conventional-changelog';\n\nconst $if =\n (when: RuleConfigCondition | undefined = 'always') =>\n (cond: boolean) =>\n when === 'always' ? cond : !cond;\n\nexport const typeGitmojiStyle: Rule<'emoji' | 'unicode'> = (parsed, when = 'always', value = 'unicode') => {\n const type = parsed['type'];\n const isUnicode = type != null && Emoji.isUnicode(type);\n const isEmoji = type != null && Emoji.isText(type);\n\n return value === 'unicode'\n ? $if(when)(isUnicode)\n ? [true]\n : [false, `Type should ${when} be an unicode character`]\n : $if(when)(isEmoji)\n ? [true]\n : [false, `Type should ${when} be an valid :emoji:`];\n};\n\nexport const typeValidGitmoji: Rule = (parsed, when = 'always') => {\n const type = parsed['type'];\n const isValidGitmoji = type != null && GitmojiCode.isValid(type);\n\n return $if(when)(isValidGitmoji)\n ? [true]\n : [false, `Type should ${when} be an valid gitmoji (see https://gitmoji.dev)`];\n};\n\n/**\n * Gitmoji plugins\n */\nexport const gitmojiPlugin: Plugin = {\n rules: {\n 'type-gitmoji-style': typeGitmojiStyle,\n 'type-valid-gitmoji': typeValidGitmoji,\n },\n};\n","import { type LintOptions, type QualifiedRules, RuleConfigSeverity } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\n\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Disabled, Error, Warning } = RuleConfigSeverity;\n\nconst parserPreset = {\n\n parserOpts: (await conventionalChangelogPreset()).parser as any,\n} satisfies LintOptions;\n\nconst rules: QualifiedRules = {\n 'body-leading-blank': [Warning, 'always'],\n 'body-max-line-length': [Error, 'always', 100],\n 'footer-leading-blank': [Warning, 'always'],\n 'footer-max-line-length': [Error, 'always', 100],\n 'header-max-length': [Error, 'always', 100],\n 'scope-case': [Error, 'always', 'lower-case'],\n 'subject-case': [Error, 'always', ['sentence-case']],\n 'subject-empty': [Error, 'never'],\n 'subject-exclamation-mark': [Error, 'never'],\n 'subject-full-stop': [Error, 'never', '.'],\n 'type-case': [Error, 'always', 'lower-case'],\n 'type-empty': [Error, 'never'],\n 'type-enum': [Disabled],\n 'type-gitmoji-style': [Error, 'always', 'unicode'],\n 'type-valid-gitmoji': [Error, 'always'],\n};\n\nexport const config = {\n parserPreset,\n plugins: [gitmojiPlugin],\n rules,\n};\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;;AAIA,MAAM,OACH,OAAwC,cACtC,SACC,SAAS,WAAW,OAAO,CAAC;AAElC,MAAa,oBAA+C,QAAQ,OAAO,UAAU,QAAQ,cAAc;CACzG,MAAM,OAAO,OAAO;CACpB,MAAM,YAAY,QAAQ,QAAQ,MAAM,UAAU,IAAI;CACtD,MAAM,UAAU,QAAQ,QAAQ,MAAM,OAAO,IAAI;CAEjD,OAAO,UAAU,Y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CAEb,MAAA;CAEA,SAAA;AACF,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/plugin.ts","../src/config.ts","../src/meta.ts"],"sourcesContent":["import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\n\nimport { Emoji, GitmojiCode } from '@w5s/conventional-changelog';\n\nconst $if =\n (when: RuleConfigCondition | undefined = 'always') =>\n (cond: boolean) =>\n when === 'always' ? cond : !cond;\n\nexport const typeGitmojiStyle: Rule<'emoji' | 'unicode'> = (parsed, when = 'always', value = 'unicode') => {\n const type = parsed['type'];\n const isUnicode = type != null && Emoji.isUnicode(type);\n const isEmoji = type != null && Emoji.isText(type);\n\n return value === 'unicode'\n ? $if(when)(isUnicode)\n ? [true]\n : [false, `Type should ${when} be an unicode character`]\n : $if(when)(isEmoji)\n ? [true]\n : [false, `Type should ${when} be an valid :emoji:`];\n};\n\nexport const typeValidGitmoji: Rule = (parsed, when = 'always') => {\n const type = parsed['type'];\n const isValidGitmoji = type != null && GitmojiCode.isValid(type);\n\n return $if(when)(isValidGitmoji)\n ? [true]\n : [false, `Type should ${when} be an valid gitmoji (see https://gitmoji.dev)`];\n};\n\n/**\n * Gitmoji plugins\n */\nexport const gitmojiPlugin: Plugin = {\n rules: {\n 'type-gitmoji-style': typeGitmojiStyle,\n 'type-valid-gitmoji': typeValidGitmoji,\n },\n};\n","import { type LintOptions, type QualifiedRules, RuleConfigSeverity } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\n\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Disabled, Error, Warning } = RuleConfigSeverity;\n\nconst parserPreset = {\n\n // eslint-disable-next-line ts/no-unsafe-assignment\n parserOpts: (await conventionalChangelogPreset()).parser as any,\n} satisfies LintOptions;\n\nconst rules: QualifiedRules = {\n 'body-leading-blank': [Warning, 'always'],\n 'body-max-line-length': [Error, 'always', 100],\n 'footer-leading-blank': [Warning, 'always'],\n 'footer-max-line-length': [Error, 'always', 100],\n 'header-max-length': [Error, 'always', 100],\n 'scope-case': [Error, 'always', 'lower-case'],\n 'subject-case': [Error, 'always', ['sentence-case']],\n 'subject-empty': [Error, 'never'],\n 'subject-exclamation-mark': [Error, 'never'],\n 'subject-full-stop': [Error, 'never', '.'],\n 'type-case': [Error, 'always', 'lower-case'],\n 'type-empty': [Error, 'never'],\n 'type-enum': [Disabled],\n 'type-gitmoji-style': [Error, 'always', 'unicode'],\n 'type-valid-gitmoji': [Error, 'always'],\n};\n\nexport const config = {\n parserPreset,\n plugins: [gitmojiPlugin],\n rules,\n};\n","export const meta = Object.freeze({\n // @ts-ignore - these variables are injected at build time\n buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,\n // @ts-ignore - these variables are injected at build time\n name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,\n // @ts-ignore - these variables are injected at build time\n version: (typeof __PACKAGE_VERSION__ === 'undefined' ? '' : __PACKAGE_VERSION__) as string,\n});\n"],"mappings":";;;AAIA,MAAM,OACH,OAAwC,cACtC,SACC,SAAS,WAAW,OAAO,CAAC;AAElC,MAAa,oBAA+C,QAAQ,OAAO,UAAU,QAAQ,cAAc;CACzG,MAAM,OAAO,OAAO;CACpB,MAAM,YAAY,QAAQ,QAAQ,MAAM,UAAU,IAAI;CACtD,MAAM,UAAU,QAAQ,QAAQ,MAAM,OAAO,IAAI;CAEjD,OAAO,UAAU,YACb,IAAI,IAAI,CAAC,CAAC,SAAS,IACjB,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,yBAAyB,IACvD,IAAI,IAAI,CAAC,CAAC,OAAO,IACf,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,qBAAqB;AACzD;AAEA,MAAa,oBAA0B,QAAQ,OAAO,aAAa;CACjE,MAAM,OAAO,OAAO;CACpB,MAAM,iBAAiB,QAAQ,QAAQ,YAAY,QAAQ,IAAI;CAE/D,OAAO,IAAI,IAAI,CAAC,CAAC,cAAc,IAC3B,CAAC,IAAI,IACL,CAAC,OAAO,eAAe,KAAK,+CAA+C;AACjF;;;;AAKA,MAAa,gBAAwB,EACnC,OAAO;CACL,sBAAsB;CACtB,sBAAsB;AACxB,EACF;;;ACnCA,MAAM,EAAE,UAAU,OAAO,YAAY;AA0BrC,MAAa,SAAS;CACpB,gBAtBA,aAAa,MAAM,4BAA4B,EAAA,CAAG,OAsBlD;CACA,SAAS,CAAC,aAAa;CACvB;EApBA,sBAAsB,CAAC,SAAS,QAAQ;EACxC,wBAAwB;GAAC;GAAO;GAAU;EAAG;EAC7C,wBAAwB,CAAC,SAAS,QAAQ;EAC1C,0BAA0B;GAAC;GAAO;GAAU;EAAG;EAC/C,qBAAqB;GAAC;GAAO;GAAU;EAAG;EAC1C,cAAc;GAAC;GAAO;GAAU;EAAY;EAC5C,gBAAgB;GAAC;GAAO;GAAU,CAAC,eAAe;EAAC;EACnD,iBAAiB,CAAC,OAAO,OAAO;EAChC,4BAA4B,CAAC,OAAO,OAAO;EAC3C,qBAAqB;GAAC;GAAO;GAAS;EAAG;EACzC,aAAa;GAAC;GAAO;GAAU;EAAY;EAC3C,cAAc,CAAC,OAAO,OAAO;EAC7B,aAAa,CAAC,QAAQ;EACtB,sBAAsB;GAAC;GAAO;GAAU;EAAS;EACjD,sBAAsB,CAAC,OAAO,QAAQ;CAMtC;AACF;;;ACnCA,MAAa,OAAO,OAAO,OAAO;CAEhC,aAAA;CAEA,MAAA;CAEA,SAAA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/commitlint-config",
3
- "version": "3.14.0",
3
+ "version": "3.16.0",
4
4
  "description": "Commitlint configuration presets",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@commitlint/types": "^21.0.0",
41
- "@w5s/conventional-changelog": "^3.15.0"
41
+ "@w5s/conventional-changelog": "^3.17.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@commitlint/cli": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "dcf9e4d187060ae2e9c33250078634bd88735d0b"
57
+ "gitHead": "86fbbb9dc5e541529173a897bda1c0aa3efa0ec1"
58
58
  }
package/src/config.ts CHANGED
@@ -7,6 +7,7 @@ const { Disabled, Error, Warning } = RuleConfigSeverity;
7
7
 
8
8
  const parserPreset = {
9
9
 
10
+ // eslint-disable-next-line ts/no-unsafe-assignment
10
11
  parserOpts: (await conventionalChangelogPreset()).parser as any,
11
12
  } satisfies LintOptions;
12
13
 
package/src/meta.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export const meta = Object.freeze({
2
2
  // @ts-ignore - these variables are injected at build time
3
- buildNumber: 1 as number, // (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,
3
+ buildNumber: (typeof __PACKAGE_BUILD_NUMBER__ === 'undefined' ? 0 : __PACKAGE_BUILD_NUMBER__) as number,
4
4
  // @ts-ignore - these variables are injected at build time
5
5
  name: (typeof __PACKAGE_NAME__ === 'undefined' ? '' : __PACKAGE_NAME__) as string,
6
6
  // @ts-ignore - these variables are injected at build time