@jcoreio/toolchain 4.12.2 → 4.12.4

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/githooks.cjs CHANGED
@@ -19,15 +19,17 @@ module.exports = {
19
19
  }
20
20
  try {
21
21
  const parsed = parseCommitMessage(content)
22
- const scope = parsed.scope && parsed.scope[0]
23
- if (
24
- scope &&
25
- monorepoSubpackageJsons &&
26
- !monorepoSubpackageJsons.some((j) => scope === j.name)
27
- ) {
28
- throw new Error(
29
- `invalid scope: ${scope} - scope must be the name of a package in this monorepo`
30
- )
22
+ if (!parsed.merge) {
23
+ const scope = parsed.scope && parsed.scope[0]
24
+ if (
25
+ scope &&
26
+ monorepoSubpackageJsons &&
27
+ !monorepoSubpackageJsons.some((j) => scope === j.name)
28
+ ) {
29
+ throw new Error(
30
+ `invalid scope: ${scope} - scope must be the name of a package in this monorepo`
31
+ )
32
+ }
31
33
  }
32
34
  // eslint-disable-next-line no-console
33
35
  console.error(chalk`{green ✔} validated commit message`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcoreio/toolchain",
3
- "version": "4.12.2",
3
+ "version": "4.12.4",
4
4
  "description": "base JS build toolchain",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,6 +16,9 @@ const validTypes = [
16
16
  ]
17
17
 
18
18
  function parseCommitMessage(message) {
19
+ if (/^merge branch/i.test(message)) {
20
+ return { merge: true }
21
+ }
19
22
  const state = new ParseState(message)
20
23
  const type = state.match(/[^(:! )]+/)
21
24
  if (!type || !validTypes.includes(type[0])) {