diff --git a/changelog.md b/changelog.md index 2c439f9..6a6bd21 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2024-11-05 - 1.7.7 - fix(core) +Fix dependency resolution in package initialization + +- Corrected the resolution of dependencies from tspublish.json against monorepo's package.json. +- Ensures unlisted dependencies in monorepo's package.json default to its version. + ## 2024-11-05 - 1.7.6 - fix(tspublish) Fix the logging of the number of found publish modules diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 08ec584..d892a74 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tspublish', - version: '1.7.6', + version: '1.7.7', description: 'A tool to publish multiple, concise, and small packages from monorepos, specifically for TypeScript projects within a git environment.' } diff --git a/ts/classes.publishmodule.ts b/ts/classes.publishmodule.ts index 5187d07..cd7bf29 100644 --- a/ts/classes.publishmodule.ts +++ b/ts/classes.publishmodule.ts @@ -48,7 +48,11 @@ export class PublishModule { ...(() => { const resultDependencies = {}; for (const dependency of this.options.tsPublishJson.dependencies) { - resultDependencies[dependency] = monoRepoPackageJson.dependencies[dependency]; + if (monoRepoPackageJson.dependencies[dependency]) { + resultDependencies[dependency] = monoRepoPackageJson.dependencies[dependency]; + } else { + resultDependencies[dependency] = monoRepoPackageJson.version; + } } return resultDependencies; })(),