Skip to content

Commit

Permalink
Debug options
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Dec 16, 2023
1 parent 5911d0c commit 299ae7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/changesets-changelog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ config()
* @param {Record<string, any> | null} options
*/
function validateOptions(options) {
console.log('OPTIONS:', options)
if (!options || !options.repo) {
throw new Error(
'Please provide a repo to this changelog generator like this:\n"changelog": ["@zazen/changesets-changelog", { "repo": "org/repo" }]',
Expand All @@ -24,7 +23,11 @@ function validateOptions(options) {
/** @type {import('@changesets/types').ChangelogFunctions} */
const changelogFunctions = {
async getDependencyReleaseLine(changesets, dependenciesUpdated, options) {
console.log('DEP CHANGE:', changesets)
console.log('DEP OPTIONS:', options)

validateOptions(options)

if (dependenciesUpdated.length === 0) return ''

let changesetCommits = await Promise.all(
Expand All @@ -49,6 +52,9 @@ const changelogFunctions = {
},

async getReleaseLine(changeset, options) {
console.log('CHANGE:', changeset)
console.log('OPTIONS:', options)

validateOptions(options)

let [repoOwner] = options.repo.split('/')
Expand Down

0 comments on commit 299ae7f

Please sign in to comment.