Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @types/node to ^14 #1259

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"@types/lodash.memoize": "^4.1.3",
"@types/micromatch": "^3.1.0",
"@types/nock": "^10.0.3",
"@types/node": "^10.11.3",
"@types/node": "^14",
"@types/node-fetch": "^2.5.12",
"@types/p-limit": "^2.0.0",
"@types/prettier": "^1.16.1",
Expand Down
8 changes: 4 additions & 4 deletions source/api/_tests/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class TestServer {

start = async (response: ResponseMock): Promise<void> => {
this.response = response
return new Promise<void>((resolve, reject) => {
this.server.listen(this.port, this.hostname, (err: any) => (err ? reject(err) : resolve()))
return new Promise<void>(() => {
this.server.listen(this.port, this.hostname)
})
}
stop = async (): Promise<void> => {
Expand All @@ -50,9 +50,9 @@ class TestProxy {
private server = http.createServer(this.router)

start = async (): Promise<void> => {
return new Promise<void>((resolve, reject) => {
return new Promise<void>(() => {
this.isRunning = true
this.server.listen(this.port, this.hostname, (err: any) => (err ? reject(err) : resolve()))
this.server.listen(this.port, this.hostname)
})
}
stop = async (): Promise<void> => {
Expand Down
5 changes: 4 additions & 1 deletion source/platforms/github/GitHubUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ export const fileContentsGenerator = (
return ""
}
if (isFileContents(response.data) && response.data.content) {
const buffer = Buffer.from(response.data.content, response.data.encoding)
if (response.data.encoding !== "bsae64") {
throw new Error(`Unsupported encoding: ${response.data.encoding}`);
}
const buffer = Buffer.from(response.data.content, "base64")
return buffer.toString()
} else {
return ""
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1232,10 +1232,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4"
integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ==

"@types/node@^10.11.3":
version "10.17.55"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.55.tgz#a147f282edec679b894d4694edb5abeb595fecbd"
integrity sha512-koZJ89uLZufDvToeWO5BrC4CR4OUfHnUz2qoPs/daQH6qq3IN62QFxCTZ+bKaCE0xaoCAJYE4AXre8AbghCrhg==
"@types/node@^14":
version "14.18.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24"
integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==

"@types/p-limit@^2.0.0":
version "2.0.0"
Expand Down