Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/zone.js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="0.10.2"></a>
## [0.10.2](https://github.com/angular/angular/compare/zone.js-0.10.1...zone.js-0.10.2) (2019-08-13)


### Features

* **zone.js:** support Promise.allSettled ([#31849](https://github.com/angular/angular/issues/31849)) ([96cbcd6](https://github.com/angular/angular/commit/96cbcd6))



<a name="0.10.1"></a>
## [0.10.1](https://github.com/angular/angular/compare/zone.js-0.10.0...zone.js-0.10.1) (2019-08-02)

Expand Down
49 changes: 37 additions & 12 deletions packages/zone.js/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,53 @@ yarn webdriver-sauce-test
Releasing
---------

For example, the current version is `0.9.1`, and we want to release a new version `0.10.0`.
Releasing `zone.js` is a two step process.

- create a new tag in `angular` repo. The `tag` must be `zone.js-<version>`, so in this example we need to create the tag `zone.js-0.10.0`.
1. Create a PR which updates the changelog, and get it merged using normal merge process.
2. Once the PR is merged check out the merge SHA of the PR and release `zone.js` from that SHA and tag it.

#### 1. Creating a PR for release

```
$ export TAG=zone.js-0.10.0
$ git tag $TAG
export PREVIOUS_ZONE_TAG=`git tag -l 'zone.js-*' | tail -n1`
export VERSION=`(cd packages/zone.js; npm version patch --no-git-tag-version)`
export VERSION=${VERSION#v}
export TAG="zone.js-${VERSION}"
echo "Releasing zone.js version ${TAG}. Last release was ${PREVIOUS_ZONE_TAG}."
yarn gulp changelog:zonejs
```

- Create PR to update `changelog` of zone.js, we need to define the previous tag which will be the current version.
Inspect the `packages/zone.js/CHANGELOG.md` for any issues and than commit it with this command.

Create a dry run build to make sure everything is ready.

```
$ export PREVIOUS_ZONE_TAG=zone.js-0.9.1
$ yarn gulp changelog:zonejs
yarn bazel --output_base=$(mktemp -d) run //packages/zone.js:npm_package.pack --workspace_status_command="echo BUILD_SCM_VERSION $VERSION"
```

- deploy to npm
If everything looks good commit the changes and push them to your origin to create a PR.

To make a `dry-run`, run the following commands.
```
$ VERSION=<version>
$ yarn bazel --output_base=$(mktemp -d) run //packages/zone.js:npm_package.pack --workspace_status_command="echo BUILD_SCM_VERSION $VERSION"
git co -b "release_${TAG}"
git add packages/zone.js/CHANGELOG.md packages/zone.js/package.json
git ci -m "release: cut the ${TAG} release"
git push origin "release_${TAG}"
```

If everything looks fine, replace `.pack` with `.publish` to push to the npm registry.

#### 2. Cutting a release

Check out the SHA on master which has the changelog commit of the zone.js

```
git fetch upstream
export VERSION=`(node -e "console.log(require('./packages/zone.js/package.json').version)")`
export TAG="zone.js-${VERSION}"
export SHA=`git log upstream/master --oneline -n 1000 | grep "release: cut the ${TAG} release" | cut -f 1 -d " "`
git co ${SHA}
yarn bazel \
--output_base=$(mktemp -d) run //packages/zone.js:npm_package.publish \
--workspace_status_command="echo BUILD_SCM_VERSION $VERSION"
git tag ${TAG} ${SHA}
git push upstream ${TAG}
```
2 changes: 1 addition & 1 deletion packages/zone.js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zone.js",
"version": "0.0.0-PLACEHOLDER",
"version": "0.10.2",
"description": "Zones for JavaScript",
"main": "dist/zone-node.js",
"browser": "dist/zone.js",
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp-tasks/changelog-zonejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = (gulp) => () => {
extendedRegexp: true,
grep: '^[^(]+\\(zone\\.js\\)',
from: ptag,
to: tag,
to: 'HEAD',
}))
.pipe(gulp.dest('./packages/zone.js/'));
};