Skip to content

Commit

Permalink
feat(release): interpolate workspaceRoot in changelog path (nrwl#22058)
Browse files Browse the repository at this point in the history
  • Loading branch information
fahslaj committed Mar 1, 2024
1 parent 9f44282 commit 7eec912
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions e2e/release/src/independent-projects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ describe('nx release - independent projects', () => {
integrity: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
total files: 4
Would publish to http://localhost:4873 with tag "latest", but [dry-run] was set
Would publish to ${e2eRegistryUrl} with tag "latest", but [dry-run] was set
Expand Down Expand Up @@ -871,7 +871,7 @@ describe('nx release - independent projects', () => {
integrity: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
total files: 4
Would publish to http://localhost:4873 with tag "latest", but [dry-run] was set
Would publish to ${e2eRegistryUrl} with tag "latest", but [dry-run] was set
Expand Down
6 changes: 5 additions & 1 deletion packages/nx/src/command-line/release/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,10 @@ async function applyChangesAndExit(
function resolveChangelogRenderer(
changelogRendererPath: string
): ChangelogRenderer {
const interpolatedChangelogRendererPath = interpolate(changelogRendererPath, {
workspaceRoot,
});

// Try and load the provided (or default) changelog renderer
let changelogRenderer: ChangelogRenderer;
let cleanupTranspiler = () => {};
Expand All @@ -637,7 +641,7 @@ function resolveChangelogRenderer(
if (rootTsconfigPath) {
cleanupTranspiler = registerTsProject(rootTsconfigPath);
}
const r = require(changelogRendererPath);
const r = require(interpolatedChangelogRendererPath);
changelogRenderer = r.default || r;
} catch {
} finally {
Expand Down

0 comments on commit 7eec912

Please sign in to comment.