Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): interpolate workspaceRoot in changelog path #22058

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/release/src/independent-projects.test.ts
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
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