@@ -8,9 +8,9 @@ import { splitPath } from "../lib/paths";
88
99// Package-related can be for 'build'.
1010const PACKAGE_DIRS = [
11- // Rust
12- ".cargo" ,
13- ] ,
11+ // Rust
12+ ".cargo" ,
13+ ] ,
1414 PACKAGE_NAMES = [
1515 // Python
1616 "requirements.txt" ,
@@ -56,29 +56,29 @@ const PACKAGE_DIRS = [
5656
5757// Build system (scripts, configurations or tools) and package dependencies.
5858const BUILD_NAMES = [
59- // Docker
60- ".dockerignore" ,
61- "Dockerfile" ,
62- "docker-compose.yml" ,
63-
64- // Make
65- "GNUmakefile" ,
66- "makefile" ,
67- "Makefile" ,
68-
69- // Ruby Rake - based on rake CLI message.
70- "rakefile" ,
71- "Rakefile" ,
72- "rakefile.rb" ,
73- "Rakefile.rb" ,
74-
75- "package.json" , // Not necessarily package-related but always build-related.
76-
77- // Java
78- "gradlew" ,
79- "grailsw" ,
80- "micronaut-cli.yml" ,
81- ] ,
59+ // Docker
60+ ".dockerignore" ,
61+ "Dockerfile" ,
62+ "docker-compose.yml" ,
63+
64+ // Make
65+ "GNUmakefile" ,
66+ "makefile" ,
67+ "Makefile" ,
68+
69+ // Ruby Rake - based on rake CLI message.
70+ "rakefile" ,
71+ "Rakefile" ,
72+ "rakefile.rb" ,
73+ "Rakefile.rb" ,
74+
75+ "package.json" , // Not necessarily package-related but always build-related.
76+
77+ // Java
78+ "gradlew" ,
79+ "grailsw" ,
80+ "micronaut-cli.yml" ,
81+ ] ,
8282 BUILD_EXTENSIONS = [
8383 // Ruby installation
8484 ".gemspec" ,
@@ -150,34 +150,34 @@ const CI_DIRS = [".circleci", ".github/workflows"],
150150// It might be easier to leave out this list and assume everything is a script
151151// unless it is a doc, markdown file or config.
152152const SCRIPT_EXTENSIONS = [
153- ".html" ,
153+ ".html" ,
154154
155- ".css" ,
156- ".less" ,
157- ".scss" ,
155+ ".css" ,
156+ ".less" ,
157+ ".scss" ,
158158
159- ".js" ,
160- ".jsx" ,
161- ".ts" ,
162- ".tsx" ,
163- ".mjs" ,
159+ ".js" ,
160+ ".jsx" ,
161+ ".ts" ,
162+ ".tsx" ,
163+ ".mjs" ,
164164
165- ".py" ,
165+ ".py" ,
166166
167- ".rb" ,
167+ ".rb" ,
168168
169- ".java" ,
170- ".jar" ,
169+ ".java" ,
170+ ".jar" ,
171171
172- ".c" ,
173- ".h" ,
172+ ".c" ,
173+ ".h" ,
174174
175- ".rs" ,
175+ ".rs" ,
176176
177- ".go" ,
177+ ".go" ,
178178
179- ".php" ,
180- ] ,
179+ ".php" ,
180+ ] ,
181181 // For "Update 5 shell scripts"
182182 SHELL_SCRIPT_EXTENSION = ".sh" ;
183183
@@ -194,9 +194,9 @@ const DOCS_DIRS = [
194194 ".github/ISSUE_TEMPLATE" ,
195195 ".github/PULL_REQUEST_TEMPLATE" ,
196196] ;
197- // Anything in `/docs` will be covered already so this is for the root and any subdirectories. Don't
198- // worry about .rst as those are already cover as always docs. While `.md` could be content for a
199- // static site or docs site.
197+ // Anything in `/docs` will be covered already so this is for the root and any
198+ // subdirectories. Don't worry about .rst as those are already cover as always
199+ // docs. While `.md` could be content for a static site or docs site.
200200const DOC_NAMES = [
201201 "README" ,
202202 "README.md" ,
@@ -233,8 +233,8 @@ const DOC_NAMES = [
233233 *
234234 * This ignores the action such as create/delete file.
235235 *
236- * For move or rename cases, the input path is assumed to be the `to` path path as that would more
237- * useful than knowing the `from` path.
236+ * For move or rename cases, the input path is assumed to be the `to` path path
237+ * as that would more useful than knowing the `from` path.
238238 */
239239export class ConventionalCommit {
240240 atRoot : boolean ;
@@ -281,6 +281,7 @@ export class ConventionalCommit {
281281 dir . includes ( "test/" ) ||
282282 dir . includes ( "tests/" ) ||
283283 dir . includes ( "spec/" ) ||
284+ dir . includes ( "__mocks__/" ) ||
284285 dir . startsWith ( "unit" ) ||
285286 this . name . includes ( ".test." ) ||
286287 this . name . includes ( ".spec." ) ||
@@ -368,9 +369,10 @@ export class ConventionalCommit {
368369 *
369370 * Relies on both the action performed and the path.
370371 *
371- * Don't distinguish `ACTION.M` vs `ACTION.A`, as it could be a fix or feature. So just use
372- * unknown/null value. Though it could be set as always feature or docs as a general rule or config
373- * option on the project level or extension level.
372+ * Don't distinguish `ACTION.M` vs `ACTION.A`, as it could be a fix or feature.
373+ * So just use unknown/null value. Though it could be set as always feature or
374+ * docs as a general rule or config option on the project level or extension
375+ * level.
374376 */
375377export function getConventionType (
376378 action : ACTION ,
0 commit comments