-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Noviny/add read and parse packages for new format (#123)
* initial release Co-Authored-By: Mitchell Hamilton <mitchell@hamil.town>
- Loading branch information
Showing
37 changed files
with
673 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"releases": [ | ||
{ "name": "@changesets/git", "type": "minor" }, | ||
{ "name": "@changesets/parse", "type": "minor" }, | ||
{ "name": "@changesets/read", "type": "minor" }, | ||
{ "name": "@changesets/types", "type": "minor" } | ||
], | ||
"dependents": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"releases": [{ "name": "@changesets/cli", "type": "patch" }], | ||
"dependents": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Move `git` module to be its own external module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# V2 PLanning | ||
|
||
List of planned changes that will require a breaking change to implement. We are fine having multiple majors if something from this list is ready to ship before the others. | ||
|
||
## New changeset format | ||
|
||
We are changing the format of changesets to be a single file, and not include | ||
|
||
### New packages: | ||
|
||
- this package reads from disc or writes to disc | ||
|
||
~ this package does not touch disc | ||
|
||
C has code for it | ||
T has tests | ||
|
||
- ~CT`parse` parse a changeset file contents into a json object `parse(fileContents) => NewChangeset` | ||
- +C`read` read in changesets from `disc read(cwd) => files[].map(parse)` | ||
<!-- - +CT`determineDependents` takes releases, workspaces and dependencies, and returns dependencies that need to be added to the list of dependencies to create a valid ReleasePlan - must be called recursively to 'bottom out' updating dependents | ||
<!-- - +`applyLinks` takes dependents and linked packages, then updates dependents where needed - returns the dependents and if they have been updated --> --> | ||
- ~C`assembleReleasePlan` `assembleReleasePlan(NewChangeset[], Workspace[], DependentsGraph config) => ReleasePlan`, basically takes in the needed info and then repeatedly determines dependents and applies links until neither cause an update | ||
- +C`getReleasePlan` performs `getReleasePlan(cwd) => assembleReleasePlan(all-the-things)` - it's a composition of other packages | ||
- +`applyReleasePlan(releasePlan, cwd)` applies a given release plan to the cwd | ||
- +`apply` `apply(cwd)` assembles release plan, and then applies the release plan (including removing files) (this is just bump, but I keep using the word apply) | ||
|
||
Some notes: | ||
|
||
I think applyLinks and determineDependents will never be particularly useful on their own - both sort of require you to 'bottom out' | ||
afterwards. It's possible that these should just be functions inside `assembleReleasePlan`, which are tested by themselves, but not | ||
shipped by themselves. | ||
|
||
I haven't made a version of `apply` that doesn't touch the disc, as the info you are looking for (new versions of everything) now | ||
exists in the `ReleasePlan` itself in the modified dependents object. Just didn't see much value in it. | ||
|
||
Plan is to get all these packages singing nicely together then do a separate PR that implemements them into the CLI. | ||
|
||
--- | ||
|
||
Old functions packagized for consumption outside of `cli` - not really talking about these, trying not | ||
to change how they work for this PR | ||
|
||
- getDependentsGraph | ||
- getDependencyGraph | ||
- git | ||
- types | ||
|
||
## Rename `bump` to `apply` | ||
|
||
This ended up being wrong - we're trying to eliminate `bump` from our code entirely. It's not a useful term. | ||
|
||
## Redo config options + packagize changelog formats | ||
|
||
Condense them, and make them a JSON only format, that can reference modules | ||
|
||
NB: While this will be a major version change, I'm happy to push this one out to a v3. I am not worried about burning major versions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
|
||
"cool-package": minor | ||
|
||
-- | ||
|
||
Everything is wrong |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"cool-package": minor | ||
--- | ||
|
||
Nice simple summary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"cool-package": minor | ||
--- | ||
|
||
Nice simple summary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"best-package": patch | ||
--- | ||
|
||
I'm amazed we needed to update the best package, because it was already the best |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NOPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"cool-package": minor | ||
--- | ||
|
||
Nice simple summary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/cli/src/commands/release/__tests__/releaseCommand.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@changesets/git", | ||
"version": "0.0.0", | ||
"description": "Some git helpers that changesets use to get information", | ||
"main": "dist/git.cjs.js", | ||
"module": "dist/git.esm.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/changesets/changesets/tree/master/packages/git", | ||
"dependencies": { | ||
"projector-spawn": "^1.0.1", | ||
"get-workspaces": "^0.4.0", | ||
"pkg-dir": "^4.1.0" | ||
}, | ||
"devDependencies": { | ||
"jest-fixtures": "^0.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@changesets/parse", | ||
"version": "0.0.0", | ||
"description": "Parse a changeset file's contents into a usable json object", | ||
"main": "dist/parse.cjs.js", | ||
"module": "dist/parse.esm.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/changesets/changesets/tree/master/packages/read", | ||
"dependencies": { | ||
"js-yaml": "^3.13.1", | ||
"@changesets/types": "^0.0.0" | ||
}, | ||
"devDependencies": { | ||
"jest-fixtures": "^0.5.0", | ||
"outdent": "^0.5.0" | ||
} | ||
} |
Oops, something went wrong.