@changesets/apply-release-plan
Advanced tools
Comparing version 6.0.3 to 6.0.4
# @changesets/apply-release-plan | ||
## 6.0.4 | ||
### Patch Changes | ||
- [#900](https://github.com/changesets/changesets/pull/900) [`7d998ee`](https://github.com/changesets/changesets/commit/7d998eeb16064b5442ebc49ad31dec7b841d504e) Thanks [@sdirosa](https://github.com/sdirosa)! - Fixed an issue with generating changelogs not being skipped when the `changelog` config option was set to `false`. | ||
- Updated dependencies [[`7d998ee`](https://github.com/changesets/changesets/commit/7d998eeb16064b5442ebc49ad31dec7b841d504e)]: | ||
- @changesets/config@2.1.1 | ||
## 6.0.3 | ||
@@ -4,0 +13,0 @@ |
@@ -364,2 +364,8 @@ 'use strict'; | ||
async function getNewChangelogEntry(releasesWithPackage, changesets, config, cwd) { | ||
if (!config.changelog) { | ||
return Promise.resolve(releasesWithPackage.map(release => _objectSpread2(_objectSpread2({}, release), {}, { | ||
changelog: null | ||
}))); | ||
} | ||
let getChangelogFuncs = { | ||
@@ -369,20 +375,16 @@ getReleaseLine: () => Promise.resolve(""), | ||
}; | ||
let changelogOpts; | ||
const changelogOpts = config.changelog[1]; | ||
let changesetPath = path__default['default'].join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom__default['default'](changesetPath, config.changelog[0]); | ||
if (config.changelog) { | ||
changelogOpts = config.changelog[1]; | ||
let changesetPath = path__default['default'].join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom__default['default'](changesetPath, config.changelog[0]); | ||
let possibleChangelogFunc = require(changelogPath); | ||
let possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if (typeof possibleChangelogFunc.getReleaseLine === "function" && typeof possibleChangelogFunc.getDependencyReleaseLine === "function") { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
if (typeof possibleChangelogFunc.getReleaseLine === "function" && typeof possibleChangelogFunc.getDependencyReleaseLine === "function") { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
@@ -389,0 +391,0 @@ |
@@ -200,13 +200,14 @@ "use strict"; | ||
async function getNewChangelogEntry(releasesWithPackage, changesets, config, cwd) { | ||
let changelogOpts, getChangelogFuncs = { | ||
if (!config.changelog) return Promise.resolve(releasesWithPackage.map((release => _objectSpread2(_objectSpread2({}, release), {}, { | ||
changelog: null | ||
})))); | ||
let getChangelogFuncs = { | ||
getReleaseLine: () => Promise.resolve(""), | ||
getDependencyReleaseLine: () => Promise.resolve("") | ||
}; | ||
if (config.changelog) { | ||
changelogOpts = config.changelog[1]; | ||
let changesetPath = path__default.default.join(cwd, ".changeset"), changelogPath = resolveFrom__default.default(changesetPath, config.changelog[0]), possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default && (possibleChangelogFunc = possibleChangelogFunc.default), | ||
"function" != typeof possibleChangelogFunc.getReleaseLine || "function" != typeof possibleChangelogFunc.getDependencyReleaseLine) throw new Error("Could not resolve changelog generation functions"); | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} | ||
const changelogOpts = config.changelog[1]; | ||
let changesetPath = path__default.default.join(cwd, ".changeset"), changelogPath = resolveFrom__default.default(changesetPath, config.changelog[0]), possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default && (possibleChangelogFunc = possibleChangelogFunc.default), | ||
"function" != typeof possibleChangelogFunc.getReleaseLine || "function" != typeof possibleChangelogFunc.getDependencyReleaseLine) throw new Error("Could not resolve changelog generation functions"); | ||
getChangelogFuncs = possibleChangelogFunc; | ||
let commits = await getCommitsThatAddChangesets(changesets.map((cs => cs.id)), cwd), moddedChangesets = changesets.map(((cs, i) => _objectSpread2(_objectSpread2({}, cs), {}, { | ||
@@ -213,0 +214,0 @@ commit: commits[i] |
@@ -349,2 +349,8 @@ import { defaultConfig } from '@changesets/config'; | ||
async function getNewChangelogEntry(releasesWithPackage, changesets, config, cwd) { | ||
if (!config.changelog) { | ||
return Promise.resolve(releasesWithPackage.map(release => _objectSpread2(_objectSpread2({}, release), {}, { | ||
changelog: null | ||
}))); | ||
} | ||
let getChangelogFuncs = { | ||
@@ -354,20 +360,16 @@ getReleaseLine: () => Promise.resolve(""), | ||
}; | ||
let changelogOpts; | ||
const changelogOpts = config.changelog[1]; | ||
let changesetPath = path.join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom(changesetPath, config.changelog[0]); | ||
if (config.changelog) { | ||
changelogOpts = config.changelog[1]; | ||
let changesetPath = path.join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom(changesetPath, config.changelog[0]); | ||
let possibleChangelogFunc = require(changelogPath); | ||
let possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if (typeof possibleChangelogFunc.getReleaseLine === "function" && typeof possibleChangelogFunc.getDependencyReleaseLine === "function") { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
if (typeof possibleChangelogFunc.getReleaseLine === "function" && typeof possibleChangelogFunc.getDependencyReleaseLine === "function") { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
@@ -374,0 +376,0 @@ |
{ | ||
"name": "@changesets/apply-release-plan", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"description": "Takes a release plan and applies it to packages", | ||
@@ -11,3 +11,3 @@ "main": "dist/apply-release-plan.cjs.js", | ||
"@babel/runtime": "^7.10.4", | ||
"@changesets/config": "^2.1.0", | ||
"@changesets/config": "^2.1.1", | ||
"@changesets/get-version-range-type": "^0.3.2", | ||
@@ -14,0 +14,0 @@ "@changesets/git": "^1.4.1", |
@@ -183,2 +183,11 @@ import { | ||
) { | ||
if (!config.changelog) { | ||
return Promise.resolve( | ||
releasesWithPackage.map(release => ({ | ||
...release, | ||
changelog: null | ||
})) | ||
); | ||
} | ||
let getChangelogFuncs: ChangelogFunctions = { | ||
@@ -188,21 +197,19 @@ getReleaseLine: () => Promise.resolve(""), | ||
}; | ||
let changelogOpts: any; | ||
if (config.changelog) { | ||
changelogOpts = config.changelog[1]; | ||
let changesetPath = path.join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom(changesetPath, config.changelog[0]); | ||
let possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if ( | ||
typeof possibleChangelogFunc.getReleaseLine === "function" && | ||
typeof possibleChangelogFunc.getDependencyReleaseLine === "function" | ||
) { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
const changelogOpts = config.changelog[1]; | ||
let changesetPath = path.join(cwd, ".changeset"); | ||
let changelogPath = resolveFrom(changesetPath, config.changelog[0]); | ||
let possibleChangelogFunc = require(changelogPath); | ||
if (possibleChangelogFunc.default) { | ||
possibleChangelogFunc = possibleChangelogFunc.default; | ||
} | ||
if ( | ||
typeof possibleChangelogFunc.getReleaseLine === "function" && | ||
typeof possibleChangelogFunc.getDependencyReleaseLine === "function" | ||
) { | ||
getChangelogFuncs = possibleChangelogFunc; | ||
} else { | ||
throw new Error("Could not resolve changelog generation functions"); | ||
} | ||
@@ -209,0 +216,0 @@ let commits = await getCommitsThatAddChangesets( |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167421
3909
Updated@changesets/config@^2.1.1