Skip to content

Commit

Permalink
bring back guide on how to update go.js
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed May 2, 2024
1 parent 67b4610 commit 9cbc9bf
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
13 changes: 12 additions & 1 deletion npm-packages/cadence-language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,16 @@ so it can be used in tools written in JavaScript.

## Releasing

To release a new version of the Language server NPM package all you need to do is create a release of Langauge server and GitHub action will also publish a new version of WebAssembly built binary to NPM.
To release a new version of the Language server NPM package all you need to do is create a release of Langauge server and GitHub action will also publish a new version of WebAssembly built binary to NPM.
That newly build NPM package using the WebAssembly will be published and can be found on NPM https://www.npmjs.com/package/@onflow/cadence-language-server

## Development

### Updating `src/go.js`

- Copy `misc/wasm/wasm_exec.js` of appropriate Go version into `src/go.js`.
Keep the last line (`export const go = new Go();`)
- Update the version in the header
- Remove the anonymous function wrapper
- Change `globalThis.Go = class {` to `class Go {`
- Run `npx prettier -w src/go.js`
22 changes: 22 additions & 0 deletions npm-packages/cadence-language-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion npm-packages/cadence-language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"node-fetch": "^2.6.1",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2",
"vscode-languageserver-protocol": "^3.17.5"
"vscode-languageserver-protocol": "^3.17.5",
"prettier": "^3.2.5"
},
"files": [
"dist/**/*"
Expand Down

0 comments on commit 9cbc9bf

Please sign in to comment.