Skip to content

Commit e7c031d

Browse files
pcarletonmattzcarey
andcommitted
Add publish step (#16)
* feat: tsdown * fix: formatting * automate version updates in cli * fix: docs * scenarios * fix: commander deps * Add publish step * add publish step * add tsgo * delete old scenario * tidy package and license * bugs link * combo build/test * combo, and release type * prepack --------- Co-authored-by: Matt Carey <[email protected]>
1 parent 7f1515c commit e7c031d

File tree

6 files changed

+205
-90
lines changed

6 files changed

+205
-90
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
branches:
44
- main
55
pull_request:
6+
release:
7+
types: [published]
68

79
permissions:
810
contents: read
@@ -19,9 +21,34 @@ jobs:
1921
- uses: actions/checkout@v4
2022
- uses: actions/setup-node@v4
2123
with:
22-
node-version: 22
24+
node-version: 24
2325
cache: npm
2426

2527
- run: npm ci
28+
- run: npm run check
29+
- run: npm run build
2630
- run: npm test
27-
- run: npm run lint
31+
32+
publish:
33+
runs-on: ubuntu-latest
34+
if: github.event_name == 'release'
35+
environment: release
36+
needs: [test]
37+
38+
permissions:
39+
contents: read
40+
id-token: write
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: 24
47+
cache: npm
48+
registry-url: 'https://registry.npmjs.org'
49+
50+
- run: npm ci
51+
52+
- run: npm publish --provenance --access public
53+
env:
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/pr-publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish PR to pkg.pr.new
2+
permissions:
3+
contents: read
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- '**'
9+
tags:
10+
- '!**'
11+
12+
jobs:
13+
pr-publish:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 24
21+
cache: npm
22+
23+
- run: npm ci
24+
- name: Build
25+
run: npm run build
26+
- name: Publish
27+
run: npx pkg-pr-new publish

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Anthropic, PBC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package-lock.json

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22
"name": "conformance",
33
"version": "0.1.0",
44
"type": "module",
5+
"license": "MIT",
6+
"author": "Anthropic, PBC (https://anthropic.com)",
7+
"homepage": "https://modelcontextprotocol.io",
8+
"bugs": "https://github.com/modelcontextprotocol/conformance/issues",
59
"scripts": {
610
"start": "tsx src/index.ts",
711
"test": "jest",
812
"build": "tsdown src/index.ts --minify --clean --target node20",
913
"lint": "eslint src/ && prettier --check .",
1014
"lint:fix": "eslint src/ --fix && prettier --write .",
11-
"lint:fix_check": "npm run lint:fix && git diff --exit-code --quiet"
15+
"lint:fix_check": "npm run lint:fix && git diff --exit-code --quiet",
16+
"check": "npm run typecheck && npm run lint",
17+
"typecheck": "tsgo --noEmit",
18+
"prepack": "npm run build"
1219
},
1320
"files": [
1421
"dist"
@@ -21,6 +28,7 @@
2128
"@jest/globals": "^29.7.0",
2229
"@types/express": "^5.0.3",
2330
"@types/jest": "^29.5.8",
31+
"@typescript/native-preview": "^7.0.0-dev.20251111.1",
2432
"eslint": "^9.8.0",
2533
"eslint-config-prettier": "^10.1.8",
2634
"jest": "^29.7.0",

src/scenarios/server/server_initialize.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)