1
- import lodash from 'lodash' ;
2
- const { isUndefined} = lodash ;
3
- import { sync as parser } from 'conventional-commits-parser' ;
4
- import filter from 'conventional-commits-filter' ;
5
- import debug from 'debug' ;
6
- import loadParserConfig from './lib/load-parser-config.js' ;
7
- import loadReleaseRules from './lib/load-release-rules.js' ;
8
- import analyzeCommit from './lib/analyze-commit.js' ;
9
- import compareReleaseTypes from './lib/compare-release-types.js' ;
10
- import RELEASE_TYPES from './lib/default-release-types.js' ;
11
- import DEFAULT_RELEASE_RULES from './lib/default-release-rules.js' ;
12
-
13
- debug ( 'semantic-release:commit-analyzer' ) ;
1
+ const { isUndefined} = require ( 'lodash' ) ;
2
+ const parser = require ( 'conventional-commits-parser' ) . sync ;
3
+ const filter = require ( 'conventional-commits-filter' ) ;
4
+ const debug = require ( 'debug' ) ( 'semantic-release:commit-analyzer' ) ;
5
+ const loadParserConfig = require ( './lib/load-parser-config' ) ;
6
+ const loadReleaseRules = require ( './lib/load-release-rules' ) ;
7
+ const analyzeCommit = require ( './lib/analyze-commit' ) ;
8
+ const compareReleaseTypes = require ( './lib/compare-release-types' ) ;
9
+ const RELEASE_TYPES = require ( './lib/default-release-types' ) ;
10
+ const DEFAULT_RELEASE_RULES = require ( './lib/default-release-rules' ) ;
14
11
15
12
/**
16
13
* Determine the type of release to create based on a list of commits.
@@ -28,7 +25,7 @@ debug('semantic-release:commit-analyzer');
28
25
*/
29
26
async function analyzeCommits ( pluginConfig , context ) {
30
27
const { commits, logger} = context ;
31
- const releaseRules = await loadReleaseRules ( pluginConfig , context ) ;
28
+ const releaseRules = loadReleaseRules ( pluginConfig , context ) ;
32
29
const config = await loadParserConfig ( pluginConfig , context ) ;
33
30
let releaseType = null ;
34
31
@@ -82,4 +79,4 @@ async function analyzeCommits(pluginConfig, context) {
82
79
return releaseType ;
83
80
}
84
81
85
- export { analyzeCommits } ;
82
+ module . exports = { analyzeCommits} ;
0 commit comments