Skip to content

Commit

Permalink
Release @sucrase/jest-plugin 2.2.0, update docs on release process
Browse files Browse the repository at this point in the history
  • Loading branch information
alangpierce committed Oct 24, 2021
1 parent 4e59c22 commit 57b8eff
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,13 @@ several smaller packages/projects). Here are the most important directories:
run with `yarn benchmark`.
* The `script` directory has all build scripts (written in TypeScript and
compiled with Sucrase).

## Publishing

The main release script is lives in `script/release.ts`, and also contains
documentation on how to prepare and perform a release. Here's a summary:
* To release the core `sucrase` package, update `package.json` and the
release notes, then run `yarn release`, which also updates the internal
Sucrase dependency and re-publishes the website.
* To release an integration, update the version and release notes, then run
`yarn build` at the top level and `yarn publish` in the integration directory.
6 changes: 6 additions & 0 deletions integrations/jest-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.2.0 (2021-10-24)

* Include inline source maps when transforming code. This fixes debugging in
WebStorm. ([#661])

# 2.1.1 (2021-08-09)

* Add support for Jest 27. ([#640]) (Victor Pontis)
Expand All @@ -11,3 +16,4 @@
* Switch Sucrase dependency to `^3`, update code to use new return type.

[#640]: https://github.com/alangpierce/sucrase/pull/640
[#661]: https://github.com/alangpierce/sucrase/pull/661
2 changes: 1 addition & 1 deletion integrations/jest-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sucrase/jest-plugin",
"version": "2.1.1",
"version": "2.2.0",
"description": "Jest plugin for Sucrase",
"main": "dist/index.js",
"repository": "https://github.com/alangpierce/sucrase/tree/main/integrations/jest-plugin",
Expand Down
10 changes: 9 additions & 1 deletion script/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ import run from "./run";
import sleep from "./sleep";

/**
* To use:
* This script releases the core sucrase package (NOT any integrations). To use:
* 1.) Update package.json to the new version without committing.
* 2.) Add changelog notes for the new version without committing.
* 3.) Run this script with "yarn release" from the root directory.
* 4.) Verify that everything in the commit looks right and push.
*
* To release an integration, take the equivalent manual steps:
* 1.) Update the version in the integration's package.json.
* 2.) Add changelog notes in the integration's CHANGELOG.md.
* 3.) Run "yarn build" at the top level to make sure the integration is fully
* built.
* 4.) Run "yarn publish" in the integration directory.
* 5.) Commit and push the change.
*/
async function main(): Promise<void> {
const packageJSON = JSON.parse((await readFile("./package.json")).toString());
Expand Down

0 comments on commit 57b8eff

Please sign in to comment.