Skip to content

Commit

Permalink
fix: use name from package json within the patch
Browse files Browse the repository at this point in the history
To make myself more familiar with wiby I started testing with two repos created for testing purposes.

The [dependency repo my-dependency-id-a](https://github.com/ghinks/my-dependency-id-a) and the [parent consuming it](https://github.com/ghinks/my-parent)

the target modules would be @gvhinks/my-dependency-id-a and the parent @gvhinks/my-parent.

What I found was that the name from the package.json should be used and not the repo name in the patch.
  • Loading branch information
ghinks committed Dec 30, 2020
1 parent e9df289 commit 1ba89dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = async function ({ dependents }) {
throw new Error(`${parentPkgInfo.owner}/${parentPkgJSON.name} not found in the package.json of ${dependentPkgInfo.owner}/${dependentPkgInfo.name}`)
}

const patchedPackageJSON = applyPatch(commitURL, parentPkgInfo.name, dependentPkgJSON)
const patchedPackageJSON = applyPatch(commitURL, parentPkgJSON.name, dependentPkgJSON)
await pushPatch(patchedPackageJSON, dependentPkgInfo.owner, dependentPkgInfo.name, parentPkgJSON.name)
}
}
Expand Down

0 comments on commit 1ba89dd

Please sign in to comment.