Skip to content

Commit

Permalink
Fix Cadence Testing bug when packaged in VSIX (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Dec 18, 2023
1 parent 134efe5 commit 92662fe
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class Extension {

// Initialize TestProvider
const extensionPath = ctx?.extensionPath ?? ''
const parserLocation = path.resolve(extensionPath, 'node_modules/@onflow/cadence-parser/dist/cadence-parser.wasm')
const parserLocation = path.resolve(extensionPath, 'out/extension/cadence-parser.wasm')
this.#testProvider = new TestProvider(parserLocation, settings, flowConfig)
}

Expand Down
42 changes: 29 additions & 13 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"displayName": "Cadence",
"publisher": "onflow",
"description": "This extension integrates Cadence, the resource-oriented smart contract programming language of Flow, into Visual Studio Code.",
"version": "2.1.0",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "https://github.com/onflow/vscode-cadence.git"
},
"scripts": {
"vscode:prepublish": "npm run -S esbuild-base -- --minify",
"esbuild-base": "esbuild ./extension/src/main.ts --bundle --outfile=out/extension/src/main.js --external:vscode --format=cjs --platform=node",
"esbuild-base": "mkdirp ./out/extension && cp ./node_modules/@onflow/cadence-parser/dist/cadence-parser.wasm ./out/extension && esbuild ./extension/src/main.ts --bundle --outfile=out/extension/src/main.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run -S esbuild-base -- --sourcemap",
"esbuild-watch": "npm run -S esbuild-base -- --sourcemap --watch",
"check": "tsc extension/src/main.ts",
Expand Down Expand Up @@ -190,10 +190,11 @@
"@types/sinon": "^17.0.1",
"@types/uuid": "^9.0.7",
"@types/vscode": "^1.65.0",
"@vscode/test-electron": "^2.3.4",
"@vscode/test-electron": "^2.3.8",
"chai": "^4.3.10",
"esbuild": "^0.19.9",
"glob": "^10.3.10",
"mkdirp": "^3.0.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"ovsx": "^0.8.3",
Expand Down

0 comments on commit 92662fe

Please sign in to comment.