@changesets/get-release-plan
Advanced tools
+11
-0
| # @changesets/get-release-plan | ||
| ## 5.0.0-next.5 | ||
| ### Patch Changes | ||
| - Updated dependencies [[`6a05002`](https://github.com/changesets/changesets/commit/6a05002228a06807b1a95da841d1809ae07441bf), [`88f2abb`](https://github.com/changesets/changesets/commit/88f2abb5e14748b08e3441fd871df60dd1c4737f), [`6a05002`](https://github.com/changesets/changesets/commit/6a05002228a06807b1a95da841d1809ae07441bf)]: | ||
| - @changesets/config@4.0.0-next.5 | ||
| - @changesets/types@7.0.0-next.5 | ||
| - @changesets/assemble-release-plan@7.0.0-next.5 | ||
| - @changesets/pre@3.0.0-next.5 | ||
| - @changesets/read@1.0.0-next.5 | ||
| ## 5.0.0-next.4 | ||
@@ -4,0 +15,0 @@ |
+6
-6
| import { assembleReleasePlan } from "@changesets/assemble-release-plan"; | ||
| import { read } from "@changesets/config"; | ||
| import { readConfig } from "@changesets/config"; | ||
| import { readPreState } from "@changesets/pre"; | ||
@@ -9,9 +9,9 @@ import { readChangesets } from "@changesets/read"; | ||
| const packages = await getPackages(cwd); | ||
| const preState = await readPreState(packages.rootDir); | ||
| const readConfig = await read(packages.rootDir, packages); | ||
| const configResult = await readConfig(packages.rootDir, packages); | ||
| if (configResult.config == null) throw new Error(`Invalid configuration:\n ${configResult.errors.join(" \n")}`); | ||
| const config = passedConfig ? { | ||
| ...readConfig, | ||
| ...configResult.config, | ||
| ...passedConfig | ||
| } : readConfig; | ||
| return assembleReleasePlan(await readChangesets(packages.rootDir, sinceRef), packages, config, preState); | ||
| } : configResult.config; | ||
| return assembleReleasePlan(await readChangesets(packages.rootDir, sinceRef), packages, config, await readPreState(packages.rootDir)); | ||
| } | ||
@@ -18,0 +18,0 @@ /** @deprecated Use named export `getReleasePlan` instead */ |
+7
-7
| { | ||
| "name": "@changesets/get-release-plan", | ||
| "version": "5.0.0-next.4", | ||
| "version": "5.0.0-next.5", | ||
| "description": "Reads changesets and adds information on dependents that need bumping", | ||
@@ -17,8 +17,8 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@manypkg/get-packages": "^3.0.0", | ||
| "@changesets/assemble-release-plan": "^7.0.0-next.4", | ||
| "@changesets/config": "^4.0.0-next.4", | ||
| "@changesets/pre": "^3.0.0-next.4", | ||
| "@changesets/read": "^1.0.0-next.4", | ||
| "@changesets/types": "^7.0.0-next.4" | ||
| "@manypkg/get-packages": "^3.1.0", | ||
| "@changesets/assemble-release-plan": "^7.0.0-next.5", | ||
| "@changesets/config": "^4.0.0-next.5", | ||
| "@changesets/pre": "^3.0.0-next.5", | ||
| "@changesets/read": "^1.0.0-next.5", | ||
| "@changesets/types": "^7.0.0-next.5" | ||
| }, | ||
@@ -25,0 +25,0 @@ "engines": { |
+14
-4
| import { assembleReleasePlan } from "@changesets/assemble-release-plan"; | ||
| import { read } from "@changesets/config"; | ||
| import { readConfig } from "@changesets/config"; | ||
| import { readPreState } from "@changesets/pre"; | ||
@@ -14,6 +14,16 @@ import { readChangesets } from "@changesets/read"; | ||
| const packages = await getPackages(cwd); | ||
| const configResult = await readConfig(packages.rootDir, packages); | ||
| if (configResult.config == null) { | ||
| throw new Error( | ||
| `Invalid configuration:\n ${configResult.errors.join(" \n")}`, | ||
| ); | ||
| } | ||
| const config = passedConfig | ||
| ? { ...configResult.config, ...passedConfig } | ||
| : configResult.config; | ||
| const changesets = await readChangesets(packages.rootDir, sinceRef); | ||
| const preState = await readPreState(packages.rootDir); | ||
| const readConfig = await read(packages.rootDir, packages); | ||
| const config = passedConfig ? { ...readConfig, ...passedConfig } : readConfig; | ||
| const changesets = await readChangesets(packages.rootDir, sinceRef); | ||
@@ -20,0 +30,0 @@ return assembleReleasePlan(changesets, packages, config, preState); |
32136
2.76%51
15.91%