Skip to content

Commit

Permalink
0.1.1 (#15)
Browse files Browse the repository at this point in the history
* Add notes about version management

* Add a script for conditionally running yarn version check

* Bump version to 0.1.1
  • Loading branch information
smoores-dev authored Mar 10, 2023
1 parent 3759c20 commit fba02e6
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ jobs:
run: yarn check:types

- name: Version
run: yarn version check
run:
git fetch origin main --depth 1 && ./scripts/if-no-version-change.sh
yarn version check
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn version check
./scripts/if-no-version-change.sh yarn version check
2 changes: 0 additions & 2 deletions .yarn/versions/28e691ab.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .yarn/versions/3260a02e.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .yarn/versions/4c3fc6bb.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .yarn/versions/87656097.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .yarn/versions/e7a26c1d.yml

This file was deleted.

13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,16 @@ And you can build output files with `yarn build`.
You can run tests with `yarn test`. If you want to run tests in "watch" mode,
use `yarn test -w`. See the [Jest CLI docs](https://jestjs.io/docs/cli) for more
information.

## Version management

We use yarn's "deferred versioning" release flow, documented
[here](https://yarnpkg.com/features/release-workflow#deferred-versioning). For
any change that affects source code files, developers will be asked at
`git push` time to use `yarn version check -i` to specify what kind of change
(`patch`, `minor`, or `major`) is contained within the release. This version
type will be documented in the form of a new YAML file added to the
`.yarn/versions` directory, which can be reviewed during code review.

Maintainers can then later use `yarn version apply --all` to aggregate the
proposed version bumps and apply them to the `package.json` file.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nytimes/react-prosemirror",
"version": "0.1.0",
"version": "0.1.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/cjs/index.js",
Expand Down
7 changes: 7 additions & 0 deletions scripts/if-no-version-change.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
if git diff origin/main -- package.json | grep -e '^+ *"version":'
then
echo "Not checking version; version was changed in this branch"
else
"$@"
fi

0 comments on commit fba02e6

Please sign in to comment.