Skip to content

Commit 91c396e

Browse files
Merge pull request #25 from sveltejs/setup-changesets
2 parents 4201627 + baad760 commit 91c396e

File tree

14 files changed

+667
-21
lines changed

14 files changed

+667
-21
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/mcp" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/shy-peaches-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/mcp': patch
3+
---
4+
5+
feat: latest version

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup pnpm
1919
uses: pnpm/action-setup@v4
2020
with:
21-
version: 10
21+
version: 10.17.1
2222

2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup pnpm
1919
uses: pnpm/action-setup@v4
2020
with:
21-
version: 10
21+
version: 10.17.1
2222

2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
permissions: {}
8+
9+
jobs:
10+
release:
11+
permissions:
12+
contents: write # to create release (changesets/action)
13+
id-token: write # OpenID Connect token needed for provenance
14+
pull-requests: write # to create pull request (changesets/action)
15+
# prevents this action from running on forks
16+
if: github.repository == 'sveltejs/mcp'
17+
name: Release
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
# pseudo-matrix for convenience, NEVER use more than a single combination
22+
node: [24]
23+
os: [ubuntu-latest]
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v5
27+
with:
28+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
29+
fetch-depth: 0
30+
- uses: actions/setup-node@v5
31+
with:
32+
node-version: ${{ matrix.node }}
33+
package-manager-cache: false # pnpm is not installed yet
34+
- name: install pnpm
35+
shell: bash
36+
run: |
37+
PNPM_VER=$(jq -r '.packageManager | if .[0:5] == "pnpm@" then .[5:] else "packageManager in package.json does not start with pnpm@\n" | halt_error(1) end' package.json)
38+
echo installing pnpm version $PNPM_VER
39+
npm i -g pnpm@$PNPM_VER
40+
- uses: actions/setup-node@v5
41+
with:
42+
node-version: ${{ matrix.node }}
43+
package-manager-cache: true # caches pnpm via packageManager field in package.json
44+
- name: install
45+
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts
46+
- name: publint
47+
run: pnpm check:publint
48+
49+
- name: Create Release Pull Request or Publish to npm
50+
id: changesets
51+
# pinned for security, always review third party action code before updating
52+
uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
53+
with:
54+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
55+
publish: pnpm release
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
NPM_CONFIG_PROVENANCE: true

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup pnpm
1919
uses: pnpm/action-setup@v4
2020
with:
21-
version: 10
21+
version: 10.17.1
2222

2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
"version": "0.0.1",
44
"description": "The official Svelte MCP server implementation",
55
"type": "module",
6+
"packageManager": "[email protected]",
67
"scripts": {
78
"build": "pnpm -r run build",
89
"dev": "pnpm --filter @sveltejs/mcp-remote run dev",
910
"check": "pnpm -r run check",
11+
"check:publint": "pnpm -r run check:publint",
1012
"format": "prettier --write .",
1113
"lint": "prettier --check . && eslint .",
1214
"lint:fix": "prettier --write . && eslint . --fix",
1315
"test:unit": "vitest",
1416
"test": "npm run test:unit -- --run",
1517
"test:watch": "npm run test:unit -- --watch",
16-
"inspect": "pnpm mcp-inspector"
18+
"inspect": "pnpm mcp-inspector",
19+
"release": "pnpm --filter @sveltejs/mcp run build && changeset publish"
1720
},
1821
"keywords": [
1922
"svelte",
@@ -23,16 +26,19 @@
2326
],
2427
"private": true,
2528
"devDependencies": {
29+
"@changesets/cli": "^2.29.7",
2630
"@eslint/compat": "^1.3.2",
2731
"@eslint/js": "^9.36.0",
2832
"@modelcontextprotocol/inspector": "^0.16.7",
33+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
2934
"eslint": "^9.36.0",
3035
"eslint-config-prettier": "^10.0.1",
3136
"eslint-plugin-import": "^2.32.0",
3237
"eslint-plugin-svelte": "^3.12.3",
3338
"globals": "^16.0.0",
3439
"prettier": "^3.4.2",
3540
"prettier-plugin-svelte": "^3.3.3",
41+
"publint": "^0.3.13",
3642
"typescript": "^5.0.0",
3743
"typescript-eslint": "^8.44.1",
3844
"vitest": "^3.2.3"

packages/mcp-schema/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"keywords": [],
1313
"author": "",
1414
"license": "ISC",
15-
"packageManager": "[email protected]",
1615
"type": "module",
1716
"dependencies": {
1817
"drizzle-orm": "^0.40.1"

packages/mcp-server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"keywords": [],
88
"author": "",
99
"license": "ISC",
10-
"packageManager": "[email protected]",
1110
"type": "module",
1211
"scripts": {
1312
"test": "vitest"

0 commit comments

Comments
 (0)