Skip to content

Commit

Permalink
Remove tsignore
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Aug 27, 2021
1 parent a6796cc commit 611e14a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@types/common-tags": "^1.8.0",
"@types/express": "^4.17.3",
"@types/fs-extra": "^8.1.2",
"@types/got": "^9.6.11",
"@types/jaeger-client": "^3.18.0",
"@types/jest": "^24.9.1",
"@types/joi": "^14.3.4",
Expand Down
13 changes: 5 additions & 8 deletions packages/gatsby-core-utils/src/fetch-remote-file.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import got, { Options as GotOptions, Headers } from "got"
import got, { Headers, Options } from "got"
import fileType from "file-type"
import path from "path"
import fs from "fs-extra"
Expand Down Expand Up @@ -60,7 +60,7 @@ const requestRemoteNode = (
url: string | URL,
headers: Headers,
tmpFilename: string,
httpOptions?: GotOptions,
httpOptions?: Options,
attempt: number = 1
): Promise<IncomingMessage> =>
new Promise((resolve, reject) => {
Expand Down Expand Up @@ -182,14 +182,11 @@ export async function fetchRemoteFile({
headers[`If-None-Match`] = cachedHeaders.etag
}

// Add Basic authentication if passed in:
// https://github.com/sindresorhus/got/blob/main/documentation/2-options.md#username
// The "auth" API isn't particularly extensible, we should define an API that we validate
const httpOptions: got.GotOptions<string | null> = {}
// Add htaccess authentication if passed in. This isn't particularly
// extensible. We should define a proper API that we validate.
const httpOptions: Options = {}
if (auth && (auth.htaccess_pass || auth.htaccess_user)) {
// @ts-ignore - We use outdated @types/got typings. Once we update got everywhere we can remove @types/got and have correct typings
httpOptions.username = auth.htaccess_user
// @ts-ignore - see above
httpOptions.password = auth.htaccess_pass
}

Expand Down
14 changes: 0 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4578,15 +4578,6 @@
"@types/minimatch" "*"
"@types/node" "*"

"@types/got@^9.6.11":
version "9.6.11"
resolved "https://registry.yarnpkg.com/@types/got/-/got-9.6.11.tgz#482b402cc5ee459481aeeadb08142ebb1a9afb26"
integrity sha512-dr3IiDNg5TDesGyuwTrN77E1Cd7DCdmCFtEfSGqr83jMMtcwhf/SGPbN2goY4JUWQfvxwY56+e5tjfi+oXeSdA==
dependencies:
"@types/node" "*"
"@types/tough-cookie" "*"
form-data "^2.5.0"

"@types/graceful-fs@^4.1.2":
version "4.1.5"
resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15"
Expand Down Expand Up @@ -5044,11 +5035,6 @@
resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.0.tgz#e3f52b4d7397eaa9193592ef3fdd44dc0af4298c"
integrity sha512-flgpHJjntpBAdJD43ShRosQvNC0ME97DCfGvZEDlAThQmnerRXrLbX6YgzRBQCZTthET9eAWFAMaYP0m0Y4HzQ==

"@types/tough-cookie@*":
version "2.3.5"
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d"
integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==

"@types/uglify-js@*":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
Expand Down

0 comments on commit 611e14a

Please sign in to comment.