Skip to content

Commit

Permalink
chore: upgrade deps to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Gozala committed Oct 9, 2020
1 parent 67f66d6 commit 8bfd1c4
Show file tree
Hide file tree
Showing 4 changed files with 187 additions and 239 deletions.
16 changes: 8 additions & 8 deletions dist/index.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
},
"devDependencies": {
"@types/concat-stream": "^1.6.0",
"@types/glob": "^7.1.1",
"@types/node": "^13.7.7",
"@types/yarnpkg__lockfile": "^1.1.3",
"@types/glob": "^7.1.3",
"@types/node": "^14.11.8",
"@types/yarnpkg__lockfile": "^1.1.4",
"hard-source-webpack-plugin": "^0.13.1",
"ts-loader": "^6.2.2",
"typescript": "^3.8.3",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11"
"ts-loader": "^8.0.4",
"typescript": "^4.0.3",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
},
"dependencies": {
"@actions/core": "^1.2.3",
"@actions/core": "^1.2.6",
"@yarnpkg/lockfile": "^1.1.0",
"concat-stream": "^2.0.0",
"glob": "^7.1.6"
Expand Down
6 changes: 3 additions & 3 deletions src/langSvc/createHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ export const createHost = (fileNames: string[], compilerOptions: _ts.CompilerOpt
const getCurrentVersion = (fileName: string) => fileEntry.has(fileName) ? fileEntry.get(fileName)!.version : 0
const getTextFromSnapshot = (snapshot: _ts.IScriptSnapshot) => snapshot.getText(0, snapshot.getLength())

const readFile = (fileName: string, encoding: string | undefined = 'utf8') => {
const readFile = (fileName: string, encoding: BufferEncoding = 'utf8') => {
if (libDTSRegexp.test(fileName)) {
return libDTS[fileName].content
}

fileName = path.normalize(fileName);
try {
return fs.readFileSync(fileName, encoding);
return fs.readFileSync(fileName, { encoding });
} catch (e) {
return undefined;
}
}

const readFileWithFallback = (
filePath: string,
encoding?: string | undefined
encoding?: BufferEncoding
) => {
return ts.sys.readFile(filePath, encoding) || readFile(filePath, encoding)
}
Expand Down
Loading

0 comments on commit 8bfd1c4

Please sign in to comment.