Skip to content

Commit da7f42e

Browse files
renovate[bot]YujohnNattrasskodiakhq[bot]
authoredJan 21, 2025··
fix(deps): update netlify packages (#6999)
* fix(deps): update netlify packages * chore: fix ts types using that are using the Netlify API (#7000) * fix(deps): update netlify packages * chore: update ts types imported from Netlify API * chore: run lint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: YujohnNattrass <46704329+YujohnNattrass@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 3a46e8f commit da7f42e

13 files changed

+88
-86
lines changed
 

‎package-lock.json

+68-68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@
7373
"@bugsnag/js": "7.25.0",
7474
"@fastify/static": "7.0.4",
7575
"@netlify/blobs": "8.1.0",
76-
"@netlify/build": "29.58.2",
76+
"@netlify/build": "29.58.7",
7777
"@netlify/build-info": "8.0.0",
78-
"@netlify/config": "20.21.2",
78+
"@netlify/config": "20.21.6",
7979
"@netlify/edge-bundler": "12.3.2",
8080
"@netlify/edge-functions": "2.11.1",
8181
"@netlify/headers-parser": "7.3.0",
8282
"@netlify/local-functions-proxy": "1.1.1",
8383
"@netlify/redirect-parser": "14.5.0",
84-
"@netlify/zip-it-and-ship-it": "9.42.2",
84+
"@netlify/zip-it-and-ship-it": "9.42.4",
8585
"@octokit/rest": "20.1.1",
8686
"@opentelemetry/api": "1.8.0",
8787
"ansi-escapes": "7.0.0",
@@ -144,7 +144,7 @@
144144
"maxstache": "1.0.7",
145145
"maxstache-stream": "1.0.4",
146146
"multiparty": "4.2.3",
147-
"netlify": "13.2.1",
147+
"netlify": "13.3.2",
148148
"netlify-redirector": "0.5.0",
149149
"node-fetch": "3.3.2",
150150
"ora": "8.1.1",

‎src/commands/base-command.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ export default class BaseCommand extends Command {
575575
const needsFeatureFlagsToResolveConfig = COMMANDS_WITH_FEATURE_FLAGS.has(actionCommand.name())
576576
if (api.accessToken && !flags.offline && needsFeatureFlagsToResolveConfig && actionCommand.siteId) {
577577
try {
578-
const site = await api.getSite({ siteId: actionCommand.siteId, feature_flags: 'cli' })
578+
const site = await (api as any).getSite({ siteId: actionCommand.siteId, feature_flags: 'cli' })
579579
actionCommand.featureFlags = site.feature_flags
580580
actionCommand.accountId = site.account_id
581581
} catch {

‎src/commands/logs/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const logsBuild = async (options: OptionValues, command: BaseCommand) =>
6363
})),
6464
})
6565

66-
deploy = deploys.find((dep: any) => dep.id === result)
66+
deploy = deploys.find((dep: any) => dep.id === result) || deploy
6767
}
6868

6969
const { id } = deploy

‎src/commands/logs/functions.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export const logsFunction = async (functionName: string | undefined, options: Op
3838

3939
const levelsToPrint = options.level || LOG_LEVELS_LIST
4040

41-
const { functions = [] } = await client.searchSiteFunctions({ siteId })
41+
// TODO: Update type once the open api spec is updated https://open-api.netlify.com/#tag/function/operation/searchSiteFunctions
42+
const { functions = [] } = (await client.searchSiteFunctions({ siteId: siteId as string })) as any
4243

4344
if (functions.length === 0) {
4445
log(`No functions found for the site`)

‎src/commands/sites/sites-create-template.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const sitesCreateTemplate = async (repository: string, options: OptionVal
8787
}
8888

8989
try {
90-
const sites: SiteInfo[] = await api.listSites({ name: siteName, filter: 'all' })
90+
const sites = await api.listSites({ name: siteName, filter: 'all' })
9191
const siteFoundByName = sites.find((filteredSite) => filteredSite.name === siteName)
9292
if (siteFoundByName) {
9393
log('A site with that name already exists on your account')
@@ -133,7 +133,8 @@ export const sitesCreateTemplate = async (repository: string, options: OptionVal
133133
}
134134

135135
try {
136-
site = await api.createSiteInTeam({
136+
// TODO: Update type once the open api spec is updated https://open-api.netlify.com/#tag/site/operation/createSiteInTeam
137+
site = await (api as any).createSiteInTeam({
137138
accountSlug,
138139
body: {
139140
repo: {

‎src/commands/sites/sites-create.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const sitesCreate = async (options: OptionValues, command: BaseCommand) =
6363
}
6464
try {
6565
site = await api.createSiteInTeam({
66-
accountSlug,
66+
accountSlug: accountSlug as string,
6767
body,
6868
})
6969
} catch (error_) {

‎src/commands/sites/sites-delete.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const sitesDelete = async (siteId: string, options: OptionValues, command
3232

3333
/* Verify the user wants to delete the site */
3434
if (noForce) {
35-
log(`${chalk.redBright('Warning')}: You are about to permanently delete "${chalk.bold(siteData.name)}"`)
35+
log(`${chalk.redBright('Warning')}: You are about to permanently delete "${chalk.bold(siteData?.name)}"`)
3636
log(` Verify this siteID "${siteId}" supplied is correct and proceed.`)
3737
log(' To skip this prompt, pass a --force flag to the delete command')
3838
log()
@@ -41,7 +41,7 @@ export const sitesDelete = async (siteId: string, options: OptionValues, command
4141
const { wantsToDelete } = await inquirer.prompt({
4242
type: 'confirm',
4343
name: 'wantsToDelete',
44-
message: `WARNING: Are you sure you want to delete the "${siteData.name}" site?`,
44+
message: `WARNING: Are you sure you want to delete the "${siteData?.name}" site?`,
4545
default: false,
4646
})
4747
log()

‎src/commands/status/status-hooks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const statusHooks = async (options: OptionValues, command: BaseCommand) =
1414
site: siteInfo.name,
1515
hooks: {},
1616
}
17-
// @ts-expect-error TS(7006) FIXME: Parameter 'hook' implicitly has an 'any' type.
17+
1818
ntlHooks.forEach((hook) => {
1919
// @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
2020
data.hooks[hook.id] = {

‎src/commands/status/status.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export const status = async (options: OptionValues, command: BaseCommand) => {
3737

3838
const ghuser = command.netlify.globalConfig.get(`users.${current}.auth.github.user`)
3939
const accountData = {
40-
Name: user.full_name,
41-
Email: user.email,
40+
Name: user?.full_name,
41+
Email: user?.email,
4242
GitHub: ghuser,
4343
}
4444
const teamsData = {}

‎src/commands/watch/watch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const watch = async (options: OptionValues, command: BaseCommand) => {
101101

102102
const noActiveBuilds = await waitForBuildFinish(client, siteId, spinner)
103103

104-
const siteData = await client.getSite({ siteId })
104+
const siteData = await client.getSite({ siteId: siteId as string })
105105

106106
const message = chalk.cyanBright.bold.underline(noActiveBuilds ? 'Last build' : 'Deploy complete')
107107
log()

‎src/utils/command-helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const pollForToken = async ({
101101
ticket,
102102
}: {
103103
api: NetlifyAPI
104-
ticket: { id: string; client_id: string; authorized: boolean; created_at: string }
104+
ticket: { id?: string; client_id?: string; authorized?: boolean; created_at?: string }
105105
}) => {
106106
const spinner = startSpinner({ text: 'Waiting for authorization...' })
107107
try {

‎src/utils/telemetry/telemetry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function track(
8888
return send('track', defaultData)
8989
}
9090

91-
export async function identify(payload: { name: string; email: string; userId: string }) {
91+
export async function identify(payload: { name?: string; email?: string; userId?: string }) {
9292
if (isCI) {
9393
return
9494
}

5 commit comments

Comments
 (5)

github-actions[bot] commented on Jan 21, 2025

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,179
  • Package size: 315 MB
  • Number of ts-expect-error directives: 804

github-actions[bot] commented on Jan 21, 2025

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,179
  • Package size: 315 MB
  • Number of ts-expect-error directives: 804

github-actions[bot] commented on Jan 21, 2025

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,179
  • Package size: 315 MB
  • Number of ts-expect-error directives: 804

github-actions[bot] commented on Jan 21, 2025

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,179
  • Package size: 315 MB
  • Number of ts-expect-error directives: 804

github-actions[bot] commented on Jan 21, 2025

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,179
  • Package size: 315 MB
  • Number of ts-expect-error directives: 804
Please sign in to comment.