Skip to content

Commit a629ec7

Browse files
authoredJan 8, 2025··
Migrate to changesets (#607)
1 parent 7980958 commit a629ec7

9 files changed

+1067
-3493
lines changed
 

‎.changeset/config.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "enisdenjo/graphql-ws" }
6+
],
7+
"commit": false,
8+
"access": "public",
9+
"baseBranch": "master",
10+
"snapshot": {
11+
"useCalculatedVersion": true,
12+
"prereleaseTemplate": "{tag}-{commit}"
13+
}
14+
}

‎.changeset/strange-rice-flow.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'graphql-ws': patch
3+
---
4+
5+
Release with [changesets](https://github.com/changesets/changesets)
6+
7+
This version does not contain any code changes.

‎.github/workflows/build-and-release.yml

-78
This file was deleted.

‎.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
snapshot:
13+
if: github.event_name == 'pull_request'
14+
name: Snapshot
15+
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@v1
16+
with:
17+
node-version-file: .node-version
18+
buildScript: build
19+
npmTag: ${{ github.event.pull_request.title == 'Upcoming Release Changes' && 'rc' || 'alpha' }}
20+
restoreDeletedChangesets: ${{ github.event.pull_request.title == 'Upcoming Release Changes' && true || false }}
21+
secrets:
22+
githubToken: ${{ secrets.BOT_GITHUB_TOKEN }}
23+
npmToken: ${{ secrets.NPM_TOKEN }}
24+
stable:
25+
if: github.ref == 'refs/heads/main'
26+
name: Stable
27+
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@v1
28+
with:
29+
node-version-file: .node-version
30+
releaseScript: yarn build && yarn changeset publish
31+
secrets:
32+
githubToken: ${{ secrets.BOT_GITHUB_TOKEN }}
33+
npmToken: ${{ secrets.NPM_TOKEN }}

‎.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ CHANGELOG.md
88
.next
99
website/src/pages/docs
1010
website/algolia-lockfile.json
11+
.changeset/*
12+
!.changeset/config.json

‎.releaserc

-28
This file was deleted.

‎CHANGELOG.md

+246-348
Large diffs are not rendered by default.

‎package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,25 @@
9191
"check:lint": "eslint 'src'",
9292
"check:type": "tsc --noEmit",
9393
"test": "vitest",
94+
"changeset": "changeset",
9495
"build:esm": "tsc -b tsconfig.esm.json && node scripts/esm-post-process.mjs",
9596
"build:cjs": "tsc -b tsconfig.cjs.json",
9697
"build:umd": "rollup --bundleConfigAsCjs --config rollup.config.ts --configPlugin typescript && gzip umd/graphql-ws.min.js -c > umd/graphql-ws.min.js.gz",
9798
"build": "yarn build:esm && yarn build:cjs && yarn build:umd && yarn postbuild",
9899
"postbuild": "node scripts/fix-declaration-directives.mjs",
99100
"prepack": "npm pkg delete workspaces",
100-
"postpack": "npm pkg set 'workspaces[]=website'",
101-
"release": "semantic-release",
101+
"postpack": "npm pkg set --no-json workspaces[]=. workspaces[]=website",
102102
"gendocs": "typedoc --options typedoc.js src/ && node scripts/post-gendocs.mjs"
103103
},
104104
"peerDependencies": {
105105
"graphql": ">=0.11 <=16"
106106
},
107107
"devDependencies": {
108+
"@changesets/changelog-github": "^0.5.0",
109+
"@changesets/cli": "^2.27.11",
108110
"@fastify/websocket": "^9.0.0",
109111
"@rollup/plugin-terser": "^0.4.4",
110112
"@rollup/plugin-typescript": "^11.1.6",
111-
"@semantic-release/changelog": "^6.0.3",
112-
"@semantic-release/git": "^10.0.1",
113113
"@types/eslint": "^8.56.10",
114114
"@types/glob": "^8.1.0",
115115
"@types/ws": "^8.5.10",
@@ -126,7 +126,6 @@
126126
"prettier": "^3.2.5",
127127
"replacestream": "^4.0.3",
128128
"rollup": "^4.14.3",
129-
"semantic-release": "^23.0.8",
130129
"subscriptions-transport-ws": "^0.11.0",
131130
"tslib": "^2.6.2",
132131
"typedoc": "^0.25.13",
@@ -138,6 +137,7 @@
138137
"ws7": "npm:ws@^7.5.9"
139138
},
140139
"workspaces": [
140+
".",
141141
"website"
142142
]
143143
}

‎yarn.lock

+760-3,034
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.