Skip to content

Commit

Permalink
fix: error with require local javascript file
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Jun 3, 2021
1 parent 3606d86 commit 873148d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 37 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.12.4 (2021-06-03)
#### Fix
* error on require local javascript file

## 2.12.3 (2021-06-01)

#### Fix
Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"publisher": "anweber",
"description": "Quickly and easily send REST, SOAP, and GraphQL requests directly within Visual Studio Code",
"version": "2.12.3",
"version": "2.12.4",
"homepage": "https://github.com/AnWeber/vscode-httpyac",
"repository": {
"type": "git",
Expand Down Expand Up @@ -641,7 +641,7 @@
"devDependencies": {
"@types/lodash": "^4.14.170",
"@types/mime-types": "^2.1.0",
"@types/node": "^15.6.1",
"@types/node": "^15.12.0",
"@types/uuid": "^8.3.0",
"@types/vscode": "^1.56.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
Expand All @@ -661,9 +661,9 @@
},
"dependencies": {
"httpsnippet": "^1.25.0",
"httpyac": "^2.12.3",
"httpyac": "^2.12.4",
"lodash": "^4.17.21",
"mime-types": "^2.1.30",
"mime-types": "^2.1.31",
"tmp-promise": "^3.0.2"
}
}
8 changes: 7 additions & 1 deletion src/fileProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ export function initVscodeFileProvider(): void {
throw new Error('No valid uri');
};


fileProvider.fsPath = (fileName: PathLike) => {
const uri = toUri(fileName);
if (uri) {
return uri.fsPath;
}
throw new Error('No valid uri');
};
}

interface VirtualDocument{
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"es6"
],
"sourceMap": true,
"rootDirs": ["src"],
"rootDirs": ["src", "./node_modules/httpyac/src"],
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
Expand Down

0 comments on commit 873148d

Please sign in to comment.