-
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.
feat: add new @changesets/write package to separate writing changesets (
#292) * feat: add new @changesets/write package to separate writing changesets * chore: add changesets * Update README.md * Update README.md * Add @babel/runtime * Changeset nits Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
- Loading branch information
1 parent
2363366
commit 41e2e3d
Showing
15 changed files
with
99 additions
and
13 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,5 @@ | ||
--- | ||
"@changesets/types": minor | ||
--- | ||
|
||
Add new `Changeset` type |
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 @@ | ||
--- | ||
"@changesets/cli": patch | ||
--- | ||
|
||
Use `@changesets/write` for writing changesets internally |
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 @@ | ||
--- | ||
"@changesets/parse": patch | ||
--- | ||
|
||
Fix `repository` field in package.json |
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 @@ | ||
--- | ||
"@changesets/write": minor | ||
--- | ||
|
||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# @changesets/write | ||
|
||
Writes a changeset to a file. | ||
|
||
```js | ||
import write from "@changesets/write"; | ||
|
||
const changeset = { | ||
"summary": "A description of a minor change", | ||
"releases": [ | ||
{ "name": "@changesets/something", "type": "minor" }, | ||
{ "name": "@changesets/something-else", "type": "patch" } | ||
] | ||
}; | ||
|
||
const uniqueId = await write(changeset, cwd); | ||
console.log(uniqueId); // orange-foxes-waggle | ||
``` | ||
|
||
For example, it can convert: | ||
|
||
```json | ||
{ | ||
"summary": "A description of a minor change", | ||
"releases": [ | ||
{ "name": "@changesets/something", "type": "minor" }, | ||
{ "name": "@changesets/something-else", "type": "patch" } | ||
] | ||
} | ||
``` | ||
|
||
to | ||
|
||
```markdown | ||
--- | ||
"@changesets/something": minor | ||
"@changesets/something-else": patch | ||
--- | ||
|
||
A description of a minor change | ||
``` | ||
|
||
This package will take care of generating a unique id for the changeset. |
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,20 @@ | ||
{ | ||
"name": "@changesets/write", | ||
"version": "0.0.0", | ||
"description": "Writes a changeset to a file", | ||
"main": "dist/write.cjs.js", | ||
"module": "dist/write.esm.js", | ||
"license": "MIT", | ||
"repository": "https://github.com/changesets/changesets/tree/master/packages/write", | ||
"dependencies": { | ||
"@babel/runtime": "^7.4.4", | ||
"@changesets/types": "^0.4.0", | ||
"fs-extra": "^7.0.1", | ||
"human-id": "^1.0.2", | ||
"prettier": "^1.18.2" | ||
}, | ||
"devDependencies": { | ||
"@changesets/parse": "*", | ||
"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