monorepo-next 7.1.2 → 7.2.0

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/README.md CHANGED
@@ -120,6 +120,7 @@ Options:
120
120
  --bump-files
121
121
  [array] [default: ["package.json","bower.json","manifest.json","package-lock.j
122
122
  son","npm-shrinkwrap.json"]]
123
+ --default-branch [string] [default: "master"]
123
124
 
124
125
  next run
125
126
 
@@ -41,12 +41,16 @@ module.exports = {
41
41
  default: defaults.scripts,
42
42
  },
43
43
  'package-files': {
44
- default: defaults.packageFiles,
45
44
  type: 'array',
45
+ default: defaults.packageFiles,
46
46
  },
47
47
  'bump-files': {
48
- default: defaults.bumpFiles,
49
48
  type: 'array',
49
+ default: defaults.bumpFiles,
50
+ },
51
+ 'default-branch': {
52
+ type: 'string',
53
+ default: 'master',
50
54
  },
51
55
  },
52
56
  async handler(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monorepo-next",
3
- "version": "7.1.2",
3
+ "version": "7.2.0",
4
4
  "description": "Detach monorepo packages from normal linking",
5
5
  "bin": {
6
6
  "next": "bin/next.js"
@@ -30,7 +30,7 @@
30
30
  "yarn"
31
31
  ],
32
32
  "scripts": {
33
- "lint:git": "commitlint",
33
+ "lint:git": "commitlint --default-branch main",
34
34
  "lint:js": "eslint . --ext js,json",
35
35
  "lint:md": "remark -f README.md",
36
36
  "start": "node bin/next",
@@ -73,7 +73,7 @@
73
73
  "yargs": "^17.0.0"
74
74
  },
75
75
  "devDependencies": {
76
- "@crowdstrike/commitlint": "^4.0.0",
76
+ "@crowdstrike/commitlint": "^5.0.0",
77
77
  "chai": "^4.2.0",
78
78
  "chai-as-promised": "^7.1.1",
79
79
  "eslint": "^8.0.0",
@@ -89,7 +89,7 @@
89
89
  "remark-cli": "^10.0.0",
90
90
  "remark-preset-lint-crowdstrike": "^2.0.0",
91
91
  "renovate-config-standard": "^2.0.0",
92
- "sinon": "^11.0.0",
92
+ "sinon": "^12.0.0",
93
93
  "sinon-chai": "^3.5.0",
94
94
  "standard-node-template": "2.0.0",
95
95
  "yargs-help-output": "^2.0.0"
package/src/release.js CHANGED
@@ -30,6 +30,7 @@ async function release({
30
30
  scripts = builder['scripts'].default,
31
31
  packageFiles = builder['package-files'].default,
32
32
  bumpFiles = builder['bump-files'].default,
33
+ defaultBranch = builder['default-branch'].default,
33
34
  versionOverride,
34
35
  preCommitCallback = () => {},
35
36
  prePushCallback = () => {},
@@ -38,7 +39,7 @@ async function release({
38
39
  publishOverride,
39
40
  } = {}) {
40
41
  let currentBranch = await getCurrentBranch(cwd);
41
- if (currentBranch !== 'master') {
42
+ if (currentBranch !== defaultBranch) {
42
43
  return;
43
44
  }
44
45