File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ export default async function applyReleasePlan(
6868 releasePlan : ReleasePlan ,
6969 packages : Packages ,
7070 config : Config = defaultConfig ,
71- snapshot ?: string | boolean
71+ snapshot ?: string | boolean ,
72+ contextDir ?: string
7273) {
7374 let cwd = packages . root . dir ;
7475
@@ -97,7 +98,8 @@ export default async function applyReleasePlan(
9798 releasesWithPackage ,
9899 changesets ,
99100 config ,
100- cwd
101+ cwd ,
102+ contextDir
101103 ) ;
102104
103105 if ( releasePlan . preState !== undefined && snapshot === undefined ) {
@@ -189,7 +191,8 @@ async function getNewChangelogEntry(
189191 releasesWithPackage : ModCompWithPackage [ ] ,
190192 changesets : NewChangeset [ ] ,
191193 config : Config ,
192- cwd : string
194+ cwd : string ,
195+ contextDir = __dirname
193196) {
194197 if ( ! config . changelog ) {
195198 return Promise . resolve (
@@ -212,7 +215,7 @@ async function getNewChangelogEntry(
212215 try {
213216 changelogPath = resolveFrom ( changesetPath , config . changelog [ 0 ] ) ;
214217 } catch {
215- changelogPath = resolveFrom ( __dirname , config . changelog [ 0 ] ) ;
218+ changelogPath = resolveFrom ( contextDir , config . changelog [ 0 ] ) ;
216219 }
217220
218221 let possibleChangelogFunc = require ( changelogPath ) ;
Original file line number Diff line number Diff line change @@ -85,7 +85,8 @@ export default async function version(
8585 releasePlan ,
8686 packages ,
8787 releaseConfig ,
88- options . snapshot
88+ options . snapshot ,
89+ __dirname
8990 ) ;
9091
9192 const [ { getVersionMessage } , commitOpts ] = getCommitFunctions (
You can’t perform that action at this time.
0 commit comments