Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changesets #4154

Merged
merged 15 commits into from
Mar 31, 2021
Merged
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
13 changes: 13 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.5.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [["slate", "slate-history", "slate-hyperscript", "slate-react"]],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"useCalculatedVersionForSnapshots": true
}
}
8 changes: 8 additions & 0 deletions .changeset/lovely-rats-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'slate': patch
'slate-history': patch
'slate-hyperscript': patch
'slate-react': patch
---

**Start using [🦋 Changesets](https://github.com/atlassian/changesets) to manage releases.** Going forward, whenever a pull request is made that fixes or adds functionality to Slate, it will need to be accompanied by a changset Markdown file describing the change. These files will be automatically used in the release process when bump the versions of Slate and compiling the changelog.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ If your change is non-trivial, please include a description of how the new logic
- [ ] The tests pass with `yarn test`.
- [ ] The linter passes with `yarn lint`. (Fix errors with `yarn fix`.)
- [ ] The relevant examples still work. (Run examples with `yarn start`.)
- [ ] You've [added a changeset](https://github.com/atlassian/changesets/blob/master/docs/adding-a-changeset.md) if changing functionality. (Add one with `yarn changeset add`.)

36 changes: 36 additions & 0 deletions .github/workflows/auto-release-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Auto-release @dev

on:
push:
branches:
- master

jobs:
release:
name: Auto-release @dev
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn

- name: Prepare release
run: yarn prerelease

- name: Release to @dev channel
run: |
yarn changeset version --snapshot
yarn changeset publish --tag dev
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/create-release-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create release PR

on:
push:
branches:
- master

jobs:
release:
name: Create release PR
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn

- name: Prepare release
run: yarn prerelease

# https://github.com/changesets/action
- name: Create release pull request
uses: changesets/action@master
with:
publish: yarn changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflows/release.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/concepts/11-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Slate supports typing of one Slate document model (ie. one set of custom `Editor

**Warning:** You must define `CustomTypes` when using TypeScript or Slate will display typing errors.


## Defining `Editor`, `Element` and `Text` Types

To define a custom `Element` or `Text` type, extend the `CustomTypes` interface in the `slate` module like this.
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"release:latest": "yarn prerelease && lerna publish --force-publish",
"release:next": "yarn prerelease && lerna publish --dist-tag next --force-publish",
"release:experimental": "yarn prerelease && lerna publish --dist-tag experimental",
"internal:release:next": "yarn prerelease && lerna publish --dist-tag next --force-publish --conventional-commits --yes",
"internal:release:next": "yarn prerelease && yarn changeset publish --tag next",
"serve": "cd ./site && next",
"start": "npm-run-all --parallel --print-label watch serve",
"test": "mocha --require ./config/babel/register.cjs ./packages/*/test/index.js",
Expand All @@ -45,6 +45,7 @@
"@babel/preset-typescript": "^7.7.4",
"@babel/register": "^7.7.4",
"@babel/runtime": "^7.7.4",
"@changesets/cli": "^2.14.1",
"@types/lodash": "^4.14.149",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.14",
Expand Down
Loading