@crowdstrike/commitlint 8.0.1 → 8.0.3

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.
Files changed (2) hide show
  1. package/package.json +10 -10
  2. package/src/index.js +8 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdstrike/commitlint",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "commitlint settings for CrowdStrike",
5
5
  "bin": {
6
6
  "commitlint": "bin/index.js"
@@ -41,14 +41,14 @@
41
41
  "node": ">=18.12"
42
42
  },
43
43
  "dependencies": {
44
- "@commitlint/config-conventional": "^18.0.0",
45
- "@commitlint/format": "^18.0.0",
46
- "@commitlint/lint": "^18.0.0",
47
- "@commitlint/load": "^18.0.0",
48
- "@commitlint/read": "^18.0.0",
44
+ "@commitlint/config-conventional": "^19.0.0",
45
+ "@commitlint/format": "^19.0.0",
46
+ "@commitlint/lint": "^19.0.0",
47
+ "@commitlint/load": "^19.0.0",
48
+ "@commitlint/read": "^19.0.0",
49
49
  "commitlint-format-junit": "^1.1.4",
50
50
  "debug": "^4.1.1",
51
- "execa": "^8.0.0",
51
+ "execa": "^9.0.0",
52
52
  "yargs": "^17.0.0"
53
53
  },
54
54
  "devDependencies": {
@@ -61,13 +61,13 @@
61
61
  "eslint-plugin-mocha": "^10.0.0",
62
62
  "eslint-plugin-node": "^11.0.0",
63
63
  "git-fixtures": "^8.0.0",
64
- "mocha": "^10.0.0",
64
+ "mocha": "^11.0.0",
65
65
  "mocha-helpers": "^9.0.0",
66
66
  "remark-cli": "^12.0.0",
67
- "remark-preset-lint-crowdstrike": "^3.0.0",
67
+ "remark-preset-lint-crowdstrike": "^4.0.0",
68
68
  "renovate-config-standard": "^2.0.0",
69
69
  "standard-node-template": "6.0.0",
70
70
  "standard-version": "^9.1.0",
71
- "yargs-help-output": "^4.0.0"
71
+ "yargs-help-output": "^5.0.0"
72
72
  }
73
73
  }
package/src/index.js CHANGED
@@ -1,9 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const load = require('@commitlint/load').default;
4
- const read = require('@commitlint/read').default;
5
- const lint = require('@commitlint/lint').default;
6
- const { format } = require('@commitlint/format');
7
3
  const formatJunit = require('commitlint-format-junit');
8
4
  const {
9
5
  getCurrentBranch,
@@ -23,6 +19,10 @@ function doesReportMatchErrorSchema(report, schema) {
23
19
  }
24
20
 
25
21
  async function runCommitLint(commit) {
22
+ const { default: load } = await import('@commitlint/load');
23
+ const { default: read } = await import('@commitlint/read');
24
+ const { default: lint } = await import('@commitlint/lint');
25
+
26
26
  let { rules, parserPreset } = await load();
27
27
 
28
28
  let opts = parserPreset ? { parserOpts: parserPreset.parserOpts } : {};
@@ -64,7 +64,7 @@ async function runCommitLint(commit) {
64
64
  process.exitCode = 1;
65
65
  }
66
66
 
67
- return _format({
67
+ return await _format({
68
68
  valid: !didFailLinting,
69
69
  errorCount,
70
70
  warningCount: 0,
@@ -72,7 +72,9 @@ async function runCommitLint(commit) {
72
72
  });
73
73
  }
74
74
 
75
- function _format(payload) {
75
+ async function _format(payload) {
76
+ const { default: format } = await import('@commitlint/format');
77
+
76
78
  let _format;
77
79
  if (process.env.COMMITLINT_REPORTER === 'junit') {
78
80
  _format = formatJunit;