monorepo-next 12.5.4 → 13.0.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/package.json +14 -13
- package/src/release.js +20 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "monorepo-next",
|
3
|
-
"version": "
|
3
|
+
"version": "13.0.0",
|
4
4
|
"description": "Detach monorepo packages from normal linking",
|
5
5
|
"bin": {
|
6
6
|
"next": "bin/next.js"
|
@@ -56,21 +56,21 @@
|
|
56
56
|
},
|
57
57
|
"homepage": "https://github.com/CrowdStrike/monorepo-next#readme",
|
58
58
|
"engines": {
|
59
|
-
"node": ">=
|
59
|
+
"node": ">=20.9"
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
|
-
"@npmcli/arborist": "^
|
62
|
+
"@npmcli/arborist": "^9.0.0",
|
63
63
|
"commit-and-tag-version": "12.5.1",
|
64
64
|
"conventional-changelog": "5.1.0",
|
65
65
|
"conventional-recommended-bump": "9.0.0",
|
66
66
|
"debug": "^4.3.1",
|
67
67
|
"execa": "^5.0.0",
|
68
68
|
"glob": "^8.0.0",
|
69
|
-
"inquirer": "^
|
69
|
+
"inquirer": "^12.0.0",
|
70
70
|
"js-yaml": "^4.0.0",
|
71
71
|
"lockfile": "^1.0.4",
|
72
|
-
"minimatch": "^
|
73
|
-
"npm-packlist": "^
|
72
|
+
"minimatch": "^10.0.0",
|
73
|
+
"npm-packlist": "^10.0.0",
|
74
74
|
"rfc6902": "^5.0.0",
|
75
75
|
"sanitize-filename": "^1.6.3",
|
76
76
|
"semver": "^7.5.3",
|
@@ -80,27 +80,28 @@
|
|
80
80
|
},
|
81
81
|
"devDependencies": {
|
82
82
|
"@crowdstrike/commitlint": "^8.0.0",
|
83
|
-
"chai": "^
|
83
|
+
"chai": "^5.0.0",
|
84
84
|
"chai-as-promised": "^7.1.1",
|
85
85
|
"chai-fs": "^2.0.0",
|
86
|
+
"chai-string": "^1.6.0",
|
86
87
|
"common-tags": "^1.8.2",
|
87
88
|
"eslint": "^8.0.0",
|
88
89
|
"eslint-config-crowdstrike": "10.1.0",
|
89
90
|
"eslint-config-crowdstrike-node": "3.0.1",
|
90
|
-
"eslint-plugin-json-files": "^
|
91
|
+
"eslint-plugin-json-files": "^5.0.0",
|
91
92
|
"eslint-plugin-mocha": "^10.2.0",
|
92
93
|
"eslint-plugin-node": "^11.0.0",
|
93
94
|
"fixturify": "^3.0.0",
|
94
95
|
"fs-extra": "^11.1.1",
|
95
|
-
"git-fixtures": "^
|
96
|
-
"mocha": "^
|
97
|
-
"mocha-helpers": "^
|
96
|
+
"git-fixtures": "^9.0.0",
|
97
|
+
"mocha": "^11.0.0",
|
98
|
+
"mocha-helpers": "^10.0.0",
|
98
99
|
"remark-cli": "^12.0.0",
|
99
100
|
"remark-preset-lint-crowdstrike": "^4.0.0",
|
100
101
|
"renovate-config-standard": "^2.0.0",
|
101
|
-
"sinon": "^
|
102
|
+
"sinon": "^21.0.0",
|
102
103
|
"sinon-chai": "^3.5.0",
|
103
|
-
"standard-node-template": "
|
104
|
+
"standard-node-template": "7.2.0",
|
104
105
|
"yargs-help-output": "^5.0.0"
|
105
106
|
}
|
106
107
|
}
|
package/src/release.js
CHANGED
@@ -172,6 +172,7 @@ async function release({
|
|
172
172
|
shell: true,
|
173
173
|
silent,
|
174
174
|
dryRun,
|
175
|
+
cwd,
|
175
176
|
});
|
176
177
|
}
|
177
178
|
}
|
@@ -184,16 +185,18 @@ async function release({
|
|
184
185
|
|
185
186
|
if (await fsExists(path.join(workspaceCwd, 'pnpm-lock.yaml'))) {
|
186
187
|
await module.exports.updatePnpmLockfile({ cwd: workspaceCwd, silent, dryRun });
|
187
|
-
}
|
188
|
-
|
189
|
-
if (!dryRun) {
|
190
|
-
await execa('git', ['add', '-A'], { cwd: workspaceCwd, silent: true });
|
188
|
+
} else if (await fsExists(path.join(workspaceCwd, 'yarn.lock'))) {
|
189
|
+
await module.exports.updateYarnLockfile({ cwd: workspaceCwd, silent, dryRun });
|
191
190
|
}
|
192
191
|
|
193
192
|
await preCommitCallback({ dryRun });
|
194
193
|
|
195
194
|
await handleLifecycleScript('precommit');
|
196
195
|
|
196
|
+
if (!dryRun) {
|
197
|
+
await execa('git', ['add', '-A'], { cwd: workspaceCwd, silent: true });
|
198
|
+
}
|
199
|
+
|
197
200
|
let previousCommit = await getCurrentCommit(workspaceCwd);
|
198
201
|
|
199
202
|
await execa('git', ['commit', '-m', commitMessage], { cwd: workspaceCwd, silent, dryRun });
|
@@ -316,7 +319,20 @@ async function updatePnpmLockfile({ cwd, silent, dryRun }) {
|
|
316
319
|
await execa('pnpm', ['install', '--lockfile-only'], { cwd, silent, dryRun });
|
317
320
|
}
|
318
321
|
|
322
|
+
/**
|
323
|
+
* You could have a case of using external packages which in turn,
|
324
|
+
* reach back into the current monorepo and use its packages.
|
325
|
+
* This could cause package version matches where it uses the local version,
|
326
|
+
* but then during version bumping, the version is now not matching,
|
327
|
+
* and it has to go to NPM to get the old version,
|
328
|
+
* and it needs to update the lockfile.
|
329
|
+
*/
|
330
|
+
async function updateYarnLockfile({ cwd, silent, dryRun }) {
|
331
|
+
await execa('yarn', ['install'], { cwd, silent, dryRun });
|
332
|
+
}
|
333
|
+
|
319
334
|
module.exports = release;
|
320
335
|
module.exports = Object.assign(release, {
|
321
336
|
updatePnpmLockfile,
|
337
|
+
updateYarnLockfile,
|
322
338
|
});
|