Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
snapshot. useCalculatedVersion
a stable option and introduce `…
…snapshot.prereleaseTemplate` option (#858) * Added `getCurrentCommitId` helper * Added snapshotPreidTemplate * added changeset * fix lint * fix ts build issues * moved experimental docs to a new file added docs for all existing experimental flags fixed typos * use regex for replacing placeholders * improve Date mocks in tests * prevent `--snapshot name` without `{tag}` placeholder * fix lint * Allow `--snapshot-preid-template` in cli * simplify cli->assembleReleasePlan interface improve validation for snapshot tags * remove the dateRef from assembleReleasePlan and calcualte it internally * Migrate to unified `snapshot` flag in config * Make `snapshot` stable, avoid breaking changes and keep supporting `useCalculatedVersionForSnapshots` * Tweak `mockGlobalDate` * Refactor code around creating snapshot suffix * Bring back the comment related to 0.0.0 versions used in snapshots by default * Update .changeset/strong-geckos-divide.md * Update .changeset/olive-ducks-camp.md * Fixed `--snapshot-prerelease-template` CLI param in the help string * Remove `null` from `WrittenConfig["snapshot"]["prereleaseTemplate"]` * Juggle some docs and update `schema.json` * Only get the current commit if the template uses the `{commit}` variable Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
- Loading branch information
1 parent
5af3f2f
commit dd9b76f
Showing
21 changed files
with
604 additions
and
135 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,28 @@ | ||
--- | ||
"@changesets/cli": patch | ||
"@changesets/config": patch | ||
--- | ||
|
||
A possibility to use the calculated version for snapshot releases is now stable 🥳 All snapshot-related config parameters are now grouped under a single config property called `snapshot`. | ||
|
||
To migrate, make sure to update your `config.json`. | ||
|
||
Old usage (still works, but comes with a deprecated warning): | ||
|
||
```json | ||
{ | ||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { | ||
"useCalculatedVersionForSnapshots": true | ||
} | ||
} | ||
``` | ||
|
||
New usage: | ||
|
||
```json | ||
{ | ||
"snapshot": { | ||
"useCalculatedVersion": true | ||
} | ||
} | ||
``` |
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": minor | ||
--- | ||
|
||
Added a new config flag for `changesets version --snapshot` mode: `--snapshot-prerelease-template` |
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/git": minor | ||
--- | ||
|
||
Added a new helper function: `getCurrentCommitId` |
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,8 @@ | ||
--- | ||
"@changesets/assemble-release-plan": minor | ||
"@changesets/cli": minor | ||
"@changesets/config": minor | ||
"@changesets/types": minor | ||
--- | ||
|
||
Added a new config option: `snapshot.prereleaseTemplate` for customizing the way snapshot release numbers are being composed. |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"grammarly.selectors": [ | ||
{ | ||
"language": "markdown", | ||
"scheme": "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
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 @@ | ||
# Experimental Options | ||
|
||
All experimental options are configured in `config.json` under `___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH` flag. | ||
|
||
> Please use these experimental flags with caution, and please pay attention to release notes - these config flags might change in patch versions. | ||
## `updateInternalDependents` (type: `'out-of-range' | 'always'`) | ||
|
||
Default value: `out-of-range`. | ||
|
||
The config flag can be used to add dependent packages to the release (if they are not already a part of it) with patch bumps. | ||
|
||
## `onlyUpdatePeerDependentsWhenOutOfRange` (type: `boolean`) | ||
|
||
Default value: `false` | ||
|
||
When set to `true`, Changesets will only bump peer dependents when `peerDependencies` are leaving the range. |
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
Oops, something went wrong.