Skip to content

Commit 34cc896

Browse files
authored
chore: use changesets for version management (#477)
1 parent 551dd0e commit 34cc896

File tree

7 files changed

+1425
-30
lines changed

7 files changed

+1425
-30
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "prettier/eslint-plugin-prettier"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"baseBranch": "master",
13+
"updateInternalDependencies": "patch",
14+
"ignore": []
15+
}

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
78

89
jobs:
@@ -11,8 +12,13 @@ jobs:
1112
runs-on: ubuntu-latest
1213
strategy:
1314
matrix:
14-
eslint-version: [7, 8]
15-
node-version: [12, 14, 16]
15+
eslint-version:
16+
- 7
17+
- 8
18+
node-version:
19+
- 12
20+
- 14
21+
- 16
1622

1723
steps:
1824
- uses: actions/checkout@v3
@@ -26,7 +32,7 @@ jobs:
2632
run: yarn upgrade eslint@${{ matrix.eslint-version }}
2733

2834
- name: Install
29-
run: yarn install
35+
run: yarn --frozen-lockfile
3036

3137
- name: Test
32-
run: yarn run test
38+
run: yarn test

.github/workflows/pkg-size.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Package Size Report
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
pkg-size-report:
10+
name: Package Size Report
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16.x
21+
cache: yarn --frozen-lockfile
22+
23+
- name: Package Size Report
24+
uses: pkg-size/action@v1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Node.js 16.x
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16.x
20+
cache: yarn
21+
22+
- name: Install Dependencies
23+
run: yarn --frozen-lockfile
24+
25+
- name: Create Release Pull Request or Publish to npm
26+
id: changesets
27+
uses: changesets/action@v1
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@
99
"prettier"
1010
],
1111
"author": "Teddy Katz",
12+
"contributors": [
13+
"JounQin (https://github.com/JounQin) <[email protected]>"
14+
],
1215
"files": [
1316
"eslint-plugin-prettier.js"
1417
],
1518
"main": "eslint-plugin-prettier.js",
1619
"scripts": {
1720
"lint": "eslint .",
18-
"test": "npm run lint && mocha",
19-
"format": "yarn run prettier '**/*.{js,json,md,yml}' --write && yarn run lint --fix",
20-
"generate-release": "node-release-script"
21+
"test": "yarn lint && mocha",
22+
"format": "yarn prettier '**/*.{js,json,md,yml}' --write && yarn lint --fix",
23+
"release": "changeset release",
24+
"prerelease": "yarn format && yarn test"
2125
},
2226
"repository": {
2327
"type": "git",
@@ -35,8 +39,9 @@
3539
"prettier": ">=2.0.0"
3640
},
3741
"devDependencies": {
42+
"@changesets/changelog-github": "^0.4.5",
43+
"@changesets/cli": "^2.23.0",
3844
"@graphql-eslint/eslint-plugin": "^2.5.0",
39-
"@not-an-aardvark/node-release-script": "^0.1.0",
4045
"@typescript-eslint/parser": "^5.29.0",
4146
"eslint": "^8.18.0",
4247
"eslint-config-not-an-aardvark": "^2.1.0",

0 commit comments

Comments
 (0)