@w5s/commitlint-config 3.1.6 → 3.1.8

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
@@ -3,7 +3,7 @@ import conventionalChangelogPreset, { Emoji, GitmojiCode } from "@w5s/convention
3
3
  //#region src/meta.ts
4
4
  const meta = Object.freeze({
5
5
  name: "@w5s/commitlint-config",
6
- version: "3.1.6",
6
+ version: "3.1.8",
7
7
  buildNumber: 1
8
8
  });
9
9
  //#endregion
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/meta.ts","../src/plugin.ts","../src/config.ts"],"sourcesContent":["export const meta = Object.freeze({\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 // @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});\n","import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\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<'unicode' | 'emoji'> = (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 { RuleConfigSeverity, type QualifiedRules, type LintOptions } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Error, Warning, Disabled } = RuleConfigSeverity;\n\nconst parserPreset = {\n // eslint-disable-next-line unicorn/no-await-expression-member\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 rules,\n plugins: [gitmojiPlugin],\n};\n"],"mappings":";;;AAAA,MAAa,OAAO,OAAO,OAAO;CAEhC,MAAA;CAEA,SAAA;CAEA,aAAa;AACf,CAAC;;;ACJD,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,QAA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SAAS,CAAC,aAAa;AACzB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/meta.ts","../src/plugin.ts","../src/config.ts"],"sourcesContent":["export const meta = Object.freeze({\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 // @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});\n","import type { Plugin, Rule, RuleConfigCondition } from '@commitlint/types';\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<'unicode' | 'emoji'> = (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 { RuleConfigSeverity, type QualifiedRules, type LintOptions } from '@commitlint/types';\nimport conventionalChangelogPreset from '@w5s/conventional-changelog';\nimport { gitmojiPlugin } from './plugin.js';\n\nconst { Error, Warning, Disabled } = RuleConfigSeverity;\n\nconst parserPreset = {\n // eslint-disable-next-line unicorn/no-await-expression-member\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 rules,\n plugins: [gitmojiPlugin],\n};\n"],"mappings":";;;AAAA,MAAa,OAAO,OAAO,OAAO;CAEhC,MAAA;CAEA,SAAA;CAEA,aAAa;AACf,CAAC;;;ACJD,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,OAAO,SAAS,aAAa;AAyBrC,MAAa,SAAS;CACpB,gBAtBA,aAAa,MAAM,4BAA4B,EAAA,CAAG,OAsBlD;CACA;EAnBA,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;CAKtC;CACA,SAAS,CAAC,aAAa;AACzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/commitlint-config",
3
- "version": "3.1.6",
3
+ "version": "3.1.8",
4
4
  "description": "Commitlint configuration presets",
5
5
  "keywords": [
6
6
  "commitlint",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@commitlint/types": "^21.0.0",
50
- "@w5s/conventional-changelog": "^3.1.6"
50
+ "@w5s/conventional-changelog": "^3.2.0"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@commitlint/cli": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
@@ -64,5 +64,5 @@
64
64
  "access": "public"
65
65
  },
66
66
  "sideEffect": false,
67
- "gitHead": "ab7987a57772b2e7fb3ef7eb4cadb3cedd9cc9ae"
67
+ "gitHead": "9102f7149f4d1faa4a9c96e7e910cbb296bd63e5"
68
68
  }