Skip to content

Commit b56095b

Browse files
authored
fix(deps): add type declarations for 20 of 29 untyped dependencies (#7049)
* chore(deps): replace untyped better-opn package * fix(deps): remove unixify dependency * types: add missing DefinitelyTyped type declarations * fix(deps): upgrade cookie package v1 adds types: https://github.com/jshttp/cookie/releases/tag/v1.0.0 * fix: fix typo in error message * fix(deps): pin new deps
1 parent b5a5c75 commit b56095b

File tree

20 files changed

+579
-141
lines changed

20 files changed

+579
-141
lines changed

package-lock.json

Lines changed: 529 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"ansi-to-html": "0.7.2",
9090
"ascii-table": "0.0.9",
9191
"backoff": "2.5.0",
92-
"better-opn": "3.0.2",
9392
"boxen": "8.0.1",
9493
"chalk": "5.4.1",
9594
"chokidar": "3.6.0",
@@ -99,7 +98,7 @@
9998
"comment-json": "4.2.5",
10099
"configstore": "7.0.0",
101100
"content-type": "1.0.5",
102-
"cookie": "0.7.2",
101+
"cookie": "1.0.2",
103102
"cron-parser": "4.9.0",
104103
"debug": "4.4.0",
105104
"decache": "4.6.2",
@@ -147,6 +146,7 @@
147146
"netlify": "13.3.3",
148147
"netlify-redirector": "0.5.0",
149148
"node-fetch": "3.3.2",
149+
"open": "10.1.0",
150150
"ora": "8.2.0",
151151
"p-filter": "4.1.0",
152152
"p-map": "7.0.3",
@@ -170,7 +170,6 @@
170170
"toml": "3.0.0",
171171
"tomlify-j0.4": "3.0.0",
172172
"ulid": "2.3.0",
173-
"unixify": "1.0.0",
174173
"update-notifier": "7.3.1",
175174
"uuid": "11.0.5",
176175
"wait-port": "1.1.0",
@@ -183,14 +182,31 @@
183182
"@netlify/eslint-config-node": "7.0.1",
184183
"@netlify/functions": "3.0.0",
185184
"@sindresorhus/slugify": "2.2.1",
185+
"@types/configstore": "^6.0.2",
186+
"@types/content-type": "^1.1.8",
187+
"@types/debug": "^4.1.12",
188+
"@types/envinfo": "^7.8.4",
189+
"@types/etag": "^1.8.3",
190+
"@types/flush-write-stream": "^1.0.2",
191+
"@types/folder-walker": "^3.2.4",
192+
"@types/gitconfiglocal": "^2.0.3",
186193
"@types/inquirer": "9.0.7",
194+
"@types/inquirer-autocomplete-prompt": "^3.0.3",
187195
"@types/jsonwebtoken": "9.0.8",
188196
"@types/lodash": "4.17.15",
197+
"@types/multiparty": "^4.2.1",
189198
"@types/node": "22.10.7",
190199
"@types/node-fetch": "2.6.12",
200+
"@types/parallel-transform": "^1.1.4",
201+
"@types/parse-github-url": "^1.0.3",
191202
"@types/parse-gitignore": "1.0.2",
192203
"@types/prettyjson": "0.0.33",
204+
"@types/pump": "^1.1.3",
193205
"@types/semver": "7.5.8",
206+
"@types/source-map-support": "^0.5.10",
207+
"@types/tabtab": "^3.0.4",
208+
"@types/through2-map": "^3.0.4",
209+
"@types/write-file-atomic": "^4.0.3",
194210
"@types/ws": "8.5.14",
195211
"@vitest/coverage-v8": "1.6.1",
196212
"c8": "10.1.3",

src/commands/base-command.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ import { NodeFS, NoopLogger } from '@netlify/build-info/node'
88
import { resolveConfig } from '@netlify/config'
99
import { isCI } from 'ci-info'
1010
import { Command, Help, Option } from 'commander'
11-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'debu... Remove this comment to see the full error message
1211
import debug from 'debug'
1312
import { findUp } from 'find-up'
1413
import inquirer from 'inquirer'
15-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'inqu... Remove this comment to see the full error message
1614
import inquirerAutocompletePrompt from 'inquirer-autocomplete-prompt'
1715
import merge from 'lodash/merge.js'
1816
import { NetlifyAPI } from 'netlify'

src/commands/completion/completion.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { fileURLToPath } from 'url'
55
import inquirer from 'inquirer'
66

77
import { OptionValues } from 'commander'
8-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'tabt... Remove this comment to see the full error message
98
import { install, uninstall } from 'tabtab'
109

1110
import { generateAutocompletion } from '../../lib/completion/index.js'

src/commands/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import process from 'process'
22

33
import { Option } from 'commander'
4-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'envi... Remove this comment to see the full error message
54
import envinfo from 'envinfo'
65
import { closest } from 'fastest-levenshtein'
76
import inquirer from 'inquirer'

src/lib/completion/script.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { existsSync, readFileSync } from 'fs'
77
import process from 'process'
88

9-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'tabt... Remove this comment to see the full error message
109
import { log, parseEnv } from 'tabtab'
1110

1211
import { AUTOCOMPLETION_FILE } from './constants.js'

src/lib/functions/form-submissions-handler.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { Readable } from 'stream'
22

3-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'cont... Remove this comment to see the full error message
43
import { parse as parseContentType } from 'content-type'
54
import type { RequestHandler } from 'express'
6-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'mult... Remove this comment to see the full error message
75
import multiparty from 'multiparty'
86
import getRawBody from 'raw-body'
97

src/lib/functions/runtimes/js/builders/zisi.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import path from 'path'
55
import { zipFunction, listFunction } from '@netlify/zip-it-and-ship-it'
66
import decache from 'decache'
77
import { readPackageUp } from 'read-package-up'
8-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'sour... Remove this comment to see the full error message
98
import sourceMapSupport from 'source-map-support'
109

1110
import { NETLIFYDEVERR } from '../../../../../utils/command-helpers.js'

src/lib/functions/runtimes/js/worker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { isMainThread, workerData, parentPort } from 'worker_threads'
44

55
import { isStream } from 'is-stream'
66
import lambdaLocal from 'lambda-local'
7-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'sour... Remove this comment to see the full error message
87
import sourceMapSupport from 'source-map-support'
98

109
if (isMainThread) {

src/recipes/vscode/settings.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { mkdir, readFile, stat, writeFile } from 'fs/promises'
2-
import { dirname, relative } from 'path'
2+
import { dirname, posix, relative } from 'path'
33

44
import * as JSONC from 'comment-json'
5-
// @ts-expect-error TS(7016) FIXME: Could not find a declaration file for module 'unix... Remove this comment to see the full error message
6-
import unixify from 'unixify'
5+
6+
const toUnixPath = (path: string): string => path.replace(/\\/g, '/')
77

88
// @ts-expect-error TS(7006) FIXME: Parameter 'existingSettings' implicitly has an 'an... Remove this comment to see the full error message
99
export const applySettings = (existingSettings, { denoBinary, edgeFunctionsPath, repositoryRoot }) => {
10-
const relativeEdgeFunctionsPath = unixify(relative(repositoryRoot, edgeFunctionsPath))
10+
// TODO(serhalp) I'm not convinced we want to convert to Unix paths on Windows? Does this even work? Was this a
11+
// workaround for something, perhaps https://github.com/denoland/vscode_deno/pull/745?
12+
const relativeEdgeFunctionsPath = toUnixPath(posix.normalize(relative(repositoryRoot, edgeFunctionsPath)))
1113
const settings = JSONC.assign(existingSettings, {
1214
'deno.enable': true,
1315
'deno.enablePaths': existingSettings['deno.enablePaths'] || [],

0 commit comments

Comments
 (0)