Skip to content
Open
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
38 changes: 37 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,42 @@ jobs:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

publish-npm:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
with:
ref: v${{ inputs.version }}
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: bindings/typescript/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: bindings/typescript
- name: Build
run: npm run build
working-directory: bindings/typescript
# bindings/typescript/LICENSE is a symlink to ../../LICENSE in the
# source tree (matching bindings/haskell and bindings/rust), but
# npm-pack drops symlinks. Replace it with a regular file so the
# published tarball carries the license text.
- name: Materialize LICENSE for npm pack
run: |
rm -f bindings/typescript/LICENSE
cp LICENSE bindings/typescript/LICENSE
- uses: JS-DevTools/npm-publish@v4
with:
token: ${{ secrets.NPM_TOKEN }}
package: bindings/typescript
access: public
provenance: true

build-go-binaries:
needs: publish
permissions:
Expand Down Expand Up @@ -192,7 +228,7 @@ jobs:
gh release upload "$TAG" "$ASSET.tar.gz" "$ASSET.tar.gz.sha256" --clobber

finalize-release:
needs: [release-crate, build-go-binaries, publish-jvm-bindings]
needs: [release-crate, build-go-binaries, publish-jvm-bindings, publish-npm]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ dist-newstyle/
# Nix output
/result

# TypeScript bindings build output
/bindings/typescript/dist/

vendor/
1 change: 1 addition & 0 deletions bindings/typescript/LICENSE
21 changes: 19 additions & 2 deletions bindings/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,28 @@
"name": "@scip-code/scip",
"version": "0.7.1",
"description": "Generated TypeScript definitions for the Semantic Code Intelligence Protocol.",
"repository": "https://github.com/scip-code/scip/bindings/typescript",
"repository": {
"type": "git",
"url": "https://github.com/scip-code/scip",
"directory": "bindings/typescript"
},
"author": "Sourcegraph",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/scip_pb.js",
"types": "./dist/scip_pb.d.ts",
"exports": {
".": {
"types": "./dist/scip_pb.d.ts",
"import": "./dist/scip_pb.js"
}
},
"files": ["dist", "LICENSE"],
"sideEffects": false,
"private": false,
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@bufbuild/protobuf": "^2.11.0"
},
Expand Down
16 changes: 11 additions & 5 deletions bindings/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "bundler",
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "dist",
"rootDir": ".",
"strict": true
}
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"strict": true,
"skipLibCheck": true
},
"include": ["scip_pb.ts"]
}
2 changes: 1 addition & 1 deletion checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
npmDepsHash = "sha256-84LQkN7bJB5q6hGc8TKXC8yD2P+qzBVh34a2L9K2Ji8=";
buildPhase = ''
runHook preBuild
npx tsc --noEmit
npm run build
runHook postBuild
'';
installPhase = "touch $out";
Expand Down
Loading