@releasekit/notes 0.40.0 → 0.41.1
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/dist/{aggregator-74VELOCJ.js → aggregator-NMUD72J2.js} +2 -2
- package/dist/{chunk-EWEPFCCT.js → chunk-FI3F2ND5.js} +13 -2
- package/dist/{chunk-WTOR47NP.js → chunk-YO6KWOCB.js} +1 -1
- package/dist/{chunk-PD3MCPPQ.js → chunk-ZGFPTVWY.js} +454 -244
- package/dist/cli.js +2 -2
- package/dist/index.js +3 -3
- package/docs/configuration.md +3 -3
- package/docs/llm-providers.md +4 -4
- package/docs/llm-release-notes.md +2 -2
- package/docs/monorepo.md +1 -1
- package/package.json +3 -3
|
@@ -6,6 +6,7 @@ import * as path2 from "path";
|
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
import { minimatch } from "minimatch";
|
|
9
|
+
import * as path3 from "path";
|
|
9
10
|
function parseGitHubOwnerRepo(repoUrl) {
|
|
10
11
|
const scpMatch = repoUrl.match(/^git@github\.com:([^/]+)\/(.+?)(?:\.git)?$/);
|
|
11
12
|
if (scpMatch) return { owner: scpMatch[1], repo: scpMatch[2] };
|
|
@@ -160,10 +161,19 @@ var EXIT_CODES = {
|
|
|
160
161
|
VERSION_ERROR: 8,
|
|
161
162
|
PUBLISH_ERROR: 9
|
|
162
163
|
};
|
|
164
|
+
function isPathWithinRoot(root, target) {
|
|
165
|
+
const resolvedRoot = path3.resolve(root);
|
|
166
|
+
const resolvedTarget = path3.resolve(target);
|
|
167
|
+
if (resolvedTarget === resolvedRoot) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
const relative2 = path3.relative(resolvedRoot, resolvedTarget);
|
|
171
|
+
return relative2 !== ".." && !relative2.startsWith(`..${path3.sep}`) && !path3.isAbsolute(relative2);
|
|
172
|
+
}
|
|
163
173
|
|
|
164
174
|
// src/output/markdown.ts
|
|
165
175
|
import * as fs3 from "fs";
|
|
166
|
-
import * as
|
|
176
|
+
import * as path4 from "path";
|
|
167
177
|
var DEFAULT_FIRST_RELEASE_TEXT = "_First release of ${packageName}._";
|
|
168
178
|
function firstReleaseLine(context, config) {
|
|
169
179
|
if (!context.isFirstRelease || config === false) return void 0;
|
|
@@ -441,7 +451,7 @@ function writeMarkdown(outputPath, contexts, config, dryRun, options) {
|
|
|
441
451
|
info(content);
|
|
442
452
|
return;
|
|
443
453
|
}
|
|
444
|
-
const dir =
|
|
454
|
+
const dir = path4.dirname(outputPath);
|
|
445
455
|
if (!fs3.existsSync(dir)) {
|
|
446
456
|
fs3.mkdirSync(dir, { recursive: true });
|
|
447
457
|
}
|
|
@@ -473,6 +483,7 @@ export {
|
|
|
473
483
|
debug,
|
|
474
484
|
ReleaseKitError,
|
|
475
485
|
EXIT_CODES,
|
|
486
|
+
isPathWithinRoot,
|
|
476
487
|
formatVersion,
|
|
477
488
|
renderMarkdown,
|
|
478
489
|
prependVersion,
|