From bb1fb1c482aba0df5e4494acb4118fd3f344c69a Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 4 Mar 2025 16:06:49 +0000
Subject: [PATCH 1/7] chore(deps): update dependency typescript to v5 (#555)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [typescript](https://www.typescriptlang.org/)
([source](https://redirect.github.com/microsoft/TypeScript)) | [`^4.4.4`
-> `^5.0.0`](https://renovatebot.com/diffs/npm/typescript/4.9.5/5.7.3) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
microsoft/TypeScript (typescript)
###
[`v5.7.3`](https://redirect.github.com/microsoft/TypeScript/compare/v5.7.2...a5e123d9e0690fcea92878ea8a0a382922009fc9)
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)
###
[`v5.7.2`](https://redirect.github.com/microsoft/TypeScript/compare/v5.6.3...d701d908d534e68cfab24b6df15539014ac348a3)
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.6.3...v5.7.2)
###
[`v5.6.3`](https://redirect.github.com/microsoft/TypeScript/compare/v5.6.2...d48a5cf89a62a62d6c6ed53ffa18f070d9458b85)
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3)
###
[`v5.6.2`](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.4...a7e3374f13327483fbe94e32806d65785b0b6cda)
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)
###
[`v5.5.4`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.5.4):
TypeScript 5.5.4
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.3...v5.5.4)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/).
For the complete list of fixed issues, check out the
- [fixed issues query for TypeScript v5.5.4
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.4%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.3%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.2%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.1%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.0%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
(soon!)
###
[`v5.5.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.5.3):
TypeScript 5.5.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.5.2...v5.5.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/).
For the complete list of fixed issues, check out the
- [fixed issues query for TypeScript v5.5.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.3%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.2%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.1%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.0%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.5.2`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.5.2):
TypeScript 5.5
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.4.5...v5.5.2)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/).
For the complete list of fixed issues, check out the
- [fixed issues query for TypeScript v5.5.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.2%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.1%22+is%3Aclosed+).
- [fixed issues query for TypeScript v5.5.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.5.0%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
###
[`v5.4.5`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.4.5):
TypeScript 5.4.5
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.4.4...v5.4.5)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.4.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.3%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.4
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.4%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.5
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.5%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.4.4`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.4.4):
TypeScript 5.4.4
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.4.3...v5.4.4)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.4.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.3%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.4
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.4%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.4.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.4.3):
TypeScript 5.4.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.4.2...v5.4.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.4.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.3%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.4.2`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.4.2):
TypeScript 5.4
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.3.3...v5.4.2)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.4.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.4.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.3.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.3.3):
TypeScript 5.3.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.3.2...v5.3.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.3.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.3%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.3.2`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.3.2):
TypeScript 5.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.2.2...v5.3.2)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.3.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.3.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.2.2`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.2.2):
TypeScript 5.2
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.1.6...v5.2.2)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.2.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.2.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.2.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.2.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.2.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.2.2%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.1.6`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.1.6):
TypeScript 5.1.6
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.1.5...v5.1.6)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript v5.1.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.0%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.1%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.2%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.3%22+is%3Aclosed+).
- (5.1.4 [intentionally
skipped](https://redirect.github.com/microsoft/TypeScript/issues/53031#issuecomment-1610038922))
- [fixed issues query for Typescript v5.1.5
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.5%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.6
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.6%22+is%3Aclosed+).
Downloads are available on
[npm](https://www.npmjs.com/package/typescript)
###
[`v5.1.5`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.1.5):
TypeScript 5.1.5
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.1.3...v5.1.5)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript v5.1.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.0%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.1%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.2%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.1.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.3%22+is%3Aclosed+).
- (5.1.4 [intentionally
skipped](https://redirect.github.com/microsoft/TypeScript/issues/53031#issuecomment-1610038922))
- [fixed issues query for Typescript v5.1.5
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.5%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.1.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.1.3):
TypeScript 5.1.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.0.4...v5.1.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript 5.1.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.1.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.1.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.1.3%22+is%3Aclosed+).
Downloads are available on:
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.0.4`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.0.4):
TypeScript 5.0.4
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.0.3...v5.0.4)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript v5.0.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.0%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.1%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.2%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.3%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.4
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.4%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.0.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.0.3):
TypeScript 5.0.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.0.2...v5.0.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript v5.0.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.0%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.1%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.2%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.0.3%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
###
[`v5.0.2`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.0.2):
TypeScript 5.0
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v4.9.5...v5.0.2)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/).
For the complete list of fixed issues, check out the
- [fixed issues query for Typescript v5.0.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.0.0%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.0.1%22+is%3Aclosed+).
- [fixed issues query for Typescript v5.0.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=is%3Aissue+milestone%3A%22TypeScript+5.0.2%22+is%3Aclosed+).
Downloads are available on:
- [npm](https://www.npmjs.com/package/typescript)
- [NuGet
package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At
any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/netlify/functions).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 16 ++++++++--------
package.json | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 745b081a..db72883d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,7 @@
"semver": "^7.5.4",
"tsd": "^0.31.0",
"tsup": "^8.0.2",
- "typescript": "^4.4.4",
+ "typescript": "^5.0.0",
"vitest": "^2.1.8"
},
"engines": {
@@ -9180,16 +9180,16 @@
}
},
"node_modules/typescript": {
- "version": "4.9.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
+ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
}
},
"node_modules/unbox-primitive": {
@@ -16488,9 +16488,9 @@
"dev": true
},
"typescript": {
- "version": "4.9.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
+ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true
},
"unbox-primitive": {
diff --git a/package.json b/package.json
index 07d8bba2..2489bd07 100644
--- a/package.json
+++ b/package.json
@@ -88,7 +88,7 @@
"semver": "^7.5.4",
"tsd": "^0.31.0",
"tsup": "^8.0.2",
- "typescript": "^4.4.4",
+ "typescript": "^5.0.0",
"vitest": "^2.1.8"
},
"engines": {
From e01516df909fc0e9ba9c553655cb7df8b5b27e51 Mon Sep 17 00:00:00 2001
From: Jake Champion
Date: Tue, 4 Mar 2025 19:49:06 +0000
Subject: [PATCH 2/7] fix: if the purge api call fails, include the api
response body in the thrown error's message (#571)
---
.eslintrc.js | 1 +
src/lib/purge_cache.test.ts | 50 ++++++++++++++++++++++++++++++++++---
src/lib/purge_cache.ts | 31 ++++++++++++++++-------
3 files changed, 69 insertions(+), 13 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index a7cad672..74ce087b 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -6,6 +6,7 @@ module.exports = {
extends: '@netlify/eslint-config-node',
rules: {
'max-statements': 'off',
+ 'max-lines': 'off',
},
overrides: [
...overrides,
diff --git a/src/lib/purge_cache.test.ts b/src/lib/purge_cache.test.ts
index 04871c56..4ace1b01 100644
--- a/src/lib/purge_cache.test.ts
+++ b/src/lib/purge_cache.test.ts
@@ -58,9 +58,11 @@ test('Calls the purge API endpoint and returns `undefined` if the operation was
expect(mockAPI.fulfilled).toBeTruthy()
})
-test('Throws if the API response does not have a successful status code', async () => {
+test('Throws an error if the API response does not have a successful status code, using the response body as part of the error message', async () => {
if (!hasFetchAPI) {
console.warn('Skipping test requires the fetch API')
+
+ return
}
const mockSiteID = '123456789'
@@ -77,7 +79,7 @@ test('Throws if the API response does not have a successful status code', async
},
headers: { Authorization: `Bearer ${mockToken}` },
method: 'post',
- response: new Response(null, { status: 500 }),
+ response: new Response('site not found', { status: 404 }),
url: `https://api.netlify.com/api/v1/purge`,
})
// eslint-disable-next-line unicorn/consistent-function-scoping
@@ -90,14 +92,54 @@ test('Throws if the API response does not have a successful status code', async
try {
await invokeLambda(myFunction)
- throw new Error('Invocation should have failed')
+ expect.fail('Invocation should have failed')
} catch (error) {
expect((error as NodeJS.ErrnoException).message).toBe(
- 'Cache purge API call returned an unexpected status code: 500',
+ 'Cache purge API call was unsuccessful.\nStatus: 404\nBody: site not found',
)
}
})
+test('Throws if the API response does not have a successful status code, does not include the response body if it is not text', async () => {
+ if (!hasFetchAPI) {
+ console.warn('Skipping test requires the fetch API')
+
+ return
+ }
+
+ const mockSiteID = '123456789'
+ const mockToken = '1q2w3e4r5t6y7u8i9o0p'
+
+ process.env.NETLIFY_PURGE_API_TOKEN = mockToken
+ process.env.SITE_ID = mockSiteID
+
+ const mockAPI = new MockFetch().post({
+ body: (payload: string) => {
+ const data = JSON.parse(payload)
+
+ expect(data.site_id).toBe(mockSiteID)
+ },
+ headers: { Authorization: `Bearer ${mockToken}` },
+ method: 'post',
+ response: new Response(null, { status: 500 }),
+ url: `https://api.netlify.com/api/v1/purge`,
+ })
+ // eslint-disable-next-line unicorn/consistent-function-scoping
+ const myFunction = async () => {
+ await purgeCache()
+ }
+
+ globalThis.fetch = mockAPI.fetcher
+
+ try {
+ await invokeLambda(myFunction)
+
+ throw new Error('Invocation should have failed')
+ } catch (error) {
+ expect((error as NodeJS.ErrnoException).message).toBe('Cache purge API call was unsuccessful.\nStatus: 500')
+ }
+})
+
test('Ignores purgeCache if in local dev with no token or site', async () => {
if (!hasFetchAPI) {
console.warn('Skipping test requires the fetch API')
diff --git a/src/lib/purge_cache.ts b/src/lib/purge_cache.ts
index f88c905a..e781eb06 100644
--- a/src/lib/purge_cache.ts
+++ b/src/lib/purge_cache.ts
@@ -38,6 +38,14 @@ export const purgeCache = async (options: PurgeCacheOptions = {}) => {
)
}
+ const { siteID } = options as PurgeCacheOptionsWithSiteID
+ const { siteSlug } = options as PurgeCacheOptionsWithSiteSlug
+ const { domain } = options as PurgeCacheOptionsWithDomain
+
+ if ((siteID && siteSlug) || (siteID && domain) || (siteSlug && domain)) {
+ throw new Error('Can only pass one of either "siteID", "siteSlug", or "domain"')
+ }
+
const payload: PurgeAPIPayload = {
cache_tags: options.tags,
deploy_alias: options.deployAlias,
@@ -50,22 +58,20 @@ export const purgeCache = async (options: PurgeCacheOptions = {}) => {
return
}
- if ('siteSlug' in options) {
- payload.site_slug = options.siteSlug
- } else if ('domain' in options) {
- payload.domain = options.domain
+ if (siteSlug) {
+ payload.site_slug = siteSlug
+ } else if (domain) {
+ payload.domain = domain
} else {
// The `siteID` from `options` takes precedence over the one from the
// environment.
- const siteID = options.siteID || env.SITE_ID
+ payload.site_id = siteID || env.SITE_ID
- if (!siteID) {
+ if (!payload.site_id) {
throw new Error(
'The Netlify site ID was not found in the execution environment. Please supply it manually using the `siteID` property.',
)
}
-
- payload.site_id = siteID
}
if (!token) {
@@ -91,6 +97,13 @@ export const purgeCache = async (options: PurgeCacheOptions = {}) => {
})
if (!response.ok) {
- throw new Error(`Cache purge API call returned an unexpected status code: ${response.status}`)
+ let text
+ try {
+ text = await response.text()
+ } catch {}
+ if (text) {
+ throw new Error(`Cache purge API call was unsuccessful.\nStatus: ${response.status}\nBody: ${text}`)
+ }
+ throw new Error(`Cache purge API call was unsuccessful.\nStatus: ${response.status}`)
}
}
From d540cc600686269299b1d16727415905a223ff73 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 10 Mar 2025 00:46:50 +0000
Subject: [PATCH 3/7] chore(deps): update dependency publint to v0.3.8 (#577)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [publint](https://publint.dev)
([source](https://redirect.github.com/publint/publint/tree/HEAD/packages/publint))
| [`0.3.7` ->
`0.3.8`](https://renovatebot.com/diffs/npm/publint/0.3.7/0.3.8) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
publint/publint (publint)
###
[`v0.3.8`](https://redirect.github.com/publint/publint/blob/HEAD/packages/publint/CHANGELOG.md#038)
[Compare
Source](https://redirect.github.com/publint/publint/compare/publint@0.3.7...publint@0.3.8)
##### Patch Changes
- Support passing a tarball path to the publint CLI. This allows to
easily lint any tarball files at hand.
([#166](https://redirect.github.com/publint/publint/pull/166))
```bash
npx publint ./mylib-1.0.0.tgz
```
- The `publint` API now returns a `pkg` object as a convenience to pass
it to `formatMessage`
([#166](https://redirect.github.com/publint/publint/pull/166))
- Updated dependencies
\[[`02d169b`](https://redirect.github.com/publint/publint/commit/02d169b1c1bb4739427b261dbc6cccdea37abdca)]:
-
[@publint/pack](https://redirect.github.com/publint/pack)[@0](https://redirect.github.com/0).1.2
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At
any time (no schedule defined).
🚦 **Automerge**: Enabled.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/netlify/functions).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index db72883d..b2223c9d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1804,9 +1804,9 @@
}
},
"node_modules/@publint/pack": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@publint/pack/-/pack-0.1.1.tgz",
- "integrity": "sha512-TvCl79Y8v18ZhFGd5mjO1kYPovSBq3+4LVCi5Nfl1JI8fS8i8kXbgQFGwBJRXczim8GlW8c2LMBKTtExYXOy/A==",
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/@publint/pack/-/pack-0.1.2.tgz",
+ "integrity": "sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==",
"dev": true,
"engines": {
"node": ">=18"
@@ -7553,12 +7553,12 @@
}
},
"node_modules/publint": {
- "version": "0.3.7",
- "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.7.tgz",
- "integrity": "sha512-UJAdT3pHmhxGHfFadlZZnTZWNyagwPplW4YJ7kM0ysDs45otRnusonRxeWYQHrdryWxAntsjCuXcUHkbUHGk7g==",
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.8.tgz",
+ "integrity": "sha512-qJyxCpQFf0j0uvlr7GizYZiQgAFgePbAVRV2uecAbNIXniDD/NMSNNBL8+DxLMMjhjgPuLJ3l2GbrB0F9MwvfA==",
"dev": true,
"dependencies": {
- "@publint/pack": "^0.1.1",
+ "@publint/pack": "^0.1.2",
"package-manager-detector": "^0.2.9",
"picocolors": "^1.1.1",
"sade": "^1.8.1"
@@ -11254,9 +11254,9 @@
}
},
"@publint/pack": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@publint/pack/-/pack-0.1.1.tgz",
- "integrity": "sha512-TvCl79Y8v18ZhFGd5mjO1kYPovSBq3+4LVCi5Nfl1JI8fS8i8kXbgQFGwBJRXczim8GlW8c2LMBKTtExYXOy/A==",
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/@publint/pack/-/pack-0.1.2.tgz",
+ "integrity": "sha512-S+9ANAvUmjutrshV4jZjaiG8XQyuJIZ8a4utWmN/vW1sgQ9IfBnPndwkmQYw53QmouOIytT874u65HEmu6H5jw==",
"dev": true
},
"@rollup/rollup-android-arm-eabi": {
@@ -15328,12 +15328,12 @@
}
},
"publint": {
- "version": "0.3.7",
- "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.7.tgz",
- "integrity": "sha512-UJAdT3pHmhxGHfFadlZZnTZWNyagwPplW4YJ7kM0ysDs45otRnusonRxeWYQHrdryWxAntsjCuXcUHkbUHGk7g==",
+ "version": "0.3.8",
+ "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.8.tgz",
+ "integrity": "sha512-qJyxCpQFf0j0uvlr7GizYZiQgAFgePbAVRV2uecAbNIXniDD/NMSNNBL8+DxLMMjhjgPuLJ3l2GbrB0F9MwvfA==",
"dev": true,
"requires": {
- "@publint/pack": "^0.1.1",
+ "@publint/pack": "^0.1.2",
"package-manager-detector": "^0.2.9",
"picocolors": "^1.1.1",
"sade": "^1.8.1"
From 2d92037fc37ef326bb0f0c9e886124a2d80b8513 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 10 Mar 2025 00:47:07 +0000
Subject: [PATCH 4/7] chore(deps): update dependency typescript to v5.8.2
(#578)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [typescript](https://www.typescriptlang.org/)
([source](https://redirect.github.com/microsoft/TypeScript)) | [`5.7.2`
-> `5.8.2`](https://renovatebot.com/diffs/npm/typescript/5.7.2/5.8.2) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
microsoft/TypeScript (typescript)
###
[`v5.8.2`](https://redirect.github.com/microsoft/TypeScript/compare/v5.7.3...beb69e4cdd61b1a0fd9ae21ae58bd4bd409d7217)
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)
###
[`v5.7.3`](https://redirect.github.com/microsoft/TypeScript/releases/tag/v5.7.3):
TypeScript 5.7.3
[Compare
Source](https://redirect.github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)
For release notes, check out the [release
announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/).
- [fixed issues query for Typescript 5.7.0
(Beta)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.7.0%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.7.1
(RC)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.7.1%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.7.2
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+).
- [fixed issues query for Typescript 5.7.3
(Stable)](https://redirect.github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.7.2%22+is%3Aclosed+).
Downloads are available on
[npm](https://www.npmjs.com/package/typescript)
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At
any time (no schedule defined).
🚦 **Automerge**: Enabled.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/netlify/functions).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b2223c9d..580b8d7c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9180,9 +9180,9 @@
}
},
"node_modules/typescript": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
- "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
+ "version": "5.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
+ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -16488,9 +16488,9 @@
"dev": true
},
"typescript": {
- "version": "5.7.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
- "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
+ "version": "5.8.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz",
+ "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==",
"dev": true
},
"unbox-primitive": {
From aad5814d62a8527077084387375bedeb32d8d602 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 17 Mar 2025 01:30:10 +0000
Subject: [PATCH 5/7] chore(deps): update dependency publint to v0.3.9 (#580)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [publint](https://publint.dev)
([source](https://redirect.github.com/publint/publint/tree/HEAD/packages/publint))
| [`0.3.8` ->
`0.3.9`](https://renovatebot.com/diffs/npm/publint/0.3.8/0.3.9) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
publint/publint (publint)
###
[`v0.3.9`](https://redirect.github.com/publint/publint/blob/HEAD/packages/publint/CHANGELOG.md#039)
[Compare
Source](https://redirect.github.com/publint/publint/compare/publint@0.3.8...publint@0.3.9)
##### Patch Changes
- Support the `formatMessage` utility in the browser. It has a new
`color: 'html'` option to highlight important parts with `` tags
instead of ANSI colors. It also has a new `reference: boolean` option so
the messages are worded in reference of the message location.
([`e1cfef0`](https://redirect.github.com/publint/publint/commit/e1cfef0b9b49c1eb55c9679308d761b7ce211fc2))
- If `formatMessage` is passed a `package.json` object with missing
keys, the message part that references the value will now fallback to
`"undefined"` instead of completely erroring out.
([`45962d1`](https://redirect.github.com/publint/publint/commit/45962d1e39250569aa877eb3568725bee7d5b434))
---
### Configuration
📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At
any time (no schedule defined).
🚦 **Automerge**: Enabled.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/netlify/functions).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 580b8d7c..4bac8418 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7553,9 +7553,9 @@
}
},
"node_modules/publint": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.8.tgz",
- "integrity": "sha512-qJyxCpQFf0j0uvlr7GizYZiQgAFgePbAVRV2uecAbNIXniDD/NMSNNBL8+DxLMMjhjgPuLJ3l2GbrB0F9MwvfA==",
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.9.tgz",
+ "integrity": "sha512-irTwfRfYW38vomkxxoiZQtFtUOQKpz5m0p9Z60z4xpXrl1KmvSrX1OMARvnnolB5usOXeNfvLj6d/W3rwXKfBQ==",
"dev": true,
"dependencies": {
"@publint/pack": "^0.1.2",
@@ -15328,9 +15328,9 @@
}
},
"publint": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.8.tgz",
- "integrity": "sha512-qJyxCpQFf0j0uvlr7GizYZiQgAFgePbAVRV2uecAbNIXniDD/NMSNNBL8+DxLMMjhjgPuLJ3l2GbrB0F9MwvfA==",
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/publint/-/publint-0.3.9.tgz",
+ "integrity": "sha512-irTwfRfYW38vomkxxoiZQtFtUOQKpz5m0p9Z60z4xpXrl1KmvSrX1OMARvnnolB5usOXeNfvLj6d/W3rwXKfBQ==",
"dev": true,
"requires": {
"@publint/pack": "^0.1.2",
From 964b0a27ee092f9cc5fd6726adb15439e3b9e74e Mon Sep 17 00:00:00 2001
From: Jake Champion
Date: Mon, 17 Mar 2025 12:25:51 +0000
Subject: [PATCH 6/7] fix: only purge alias by default if the purgeCache
function is called within a deployed function (#576)
linear ticket: https://linear.app/netlify/issue/RUN-1417/
This patch will ensure that when `purgeCache` is called within a
deployed function, the purge will happen for the deployment which
contains the function. I.E. If it's the production deployment, it purges
production. If it's a branch deployment, it purges the branch. If it's a
deploy-preview, it purges the deploy-preview.
---
src/lib/purge_cache.test.ts | 100 ++++++++++++++++++++++++++++++++++++
src/lib/purge_cache.ts | 8 ++-
2 files changed, 107 insertions(+), 1 deletion(-)
diff --git a/src/lib/purge_cache.test.ts b/src/lib/purge_cache.test.ts
index 4ace1b01..279292fa 100644
--- a/src/lib/purge_cache.test.ts
+++ b/src/lib/purge_cache.test.ts
@@ -58,6 +58,106 @@ test('Calls the purge API endpoint and returns `undefined` if the operation was
expect(mockAPI.fulfilled).toBeTruthy()
})
+test('Does not default the deploy_alias field to process.env.NETLIFY_BRANCH if supplied in the options', async () => {
+ const mockSiteID = '123456789'
+ const mockToken = '1q2w3e4r5t6y7u8i9o0p'
+
+ process.env.NETLIFY_PURGE_API_TOKEN = mockToken
+ process.env.SITE_ID = mockSiteID
+ process.env.NETLIFY_BRANCH = 'main'
+
+ const mockAPI = new MockFetch().post({
+ body: (payload: string) => {
+ const data = JSON.parse(payload)
+
+ expect(data.site_id).toBe(mockSiteID)
+ expect(data.deploy_alias).toBe('test')
+ },
+ headers: { Authorization: `Bearer ${mockToken}` },
+ method: 'post',
+ response: new Response(null, { status: 202 }),
+ url: `https://api.netlify.com/api/v1/purge`,
+ })
+ // eslint-disable-next-line unicorn/consistent-function-scoping
+ const myFunction = async () => {
+ await purgeCache({ deployAlias: 'test' })
+ }
+
+ globalThis.fetch = mockAPI.fetcher
+
+ const response = await invokeLambda(myFunction)
+
+ expect(response).toBeUndefined()
+ expect(mockAPI.fulfilled).toBeTruthy()
+})
+
+test('Defaults the deploy_alias field to process.env.NETLIFY_BRANCH if not running locally', async () => {
+ const mockSiteID = '123456789'
+ const mockToken = '1q2w3e4r5t6y7u8i9o0p'
+
+ process.env.NETLIFY_PURGE_API_TOKEN = mockToken
+ process.env.SITE_ID = mockSiteID
+ process.env.NETLIFY_BRANCH = 'main'
+
+ const mockAPI = new MockFetch().post({
+ body: (payload: string) => {
+ const data = JSON.parse(payload)
+
+ expect(data.site_id).toBe(mockSiteID)
+ expect(data.deploy_alias).toBe(process.env.NETLIFY_BRANCH)
+ },
+ headers: { Authorization: `Bearer ${mockToken}` },
+ method: 'post',
+ response: new Response(null, { status: 202 }),
+ url: `https://api.netlify.com/api/v1/purge`,
+ })
+ // eslint-disable-next-line unicorn/consistent-function-scoping
+ const myFunction = async () => {
+ await purgeCache()
+ }
+
+ globalThis.fetch = mockAPI.fetcher
+
+ const response = await invokeLambda(myFunction)
+
+ expect(response).toBeUndefined()
+ expect(mockAPI.fulfilled).toBeTruthy()
+})
+
+test('Does not default the deploy_alias field to process.env.NETLIFY_BRANCH when running locally', async () => {
+ const mockSiteID = '123456789'
+ const mockToken = '1q2w3e4r5t6y7u8i9o0p'
+
+ process.env.NETLIFY_PURGE_API_TOKEN = mockToken
+ process.env.SITE_ID = mockSiteID
+ process.env.NETLIFY_LOCAL = 'true'
+ process.env.NETLIFY_BRANCH = 'main'
+
+ const mockAPI = new MockFetch().post({
+ body: (payload: string) => {
+ const data = JSON.parse(payload)
+
+ expect(data.site_id).toBe(mockSiteID)
+ expect(data.deploy_alias).toBeUndefined()
+ },
+ headers: { Authorization: `Bearer ${mockToken}` },
+ method: 'post',
+ response: new Response(null, { status: 202 }),
+ url: `https://api.netlify.com/api/v1/purge`,
+ })
+ // eslint-disable-next-line unicorn/consistent-function-scoping
+ const myFunction = async () => {
+ await purgeCache()
+ }
+
+ globalThis.fetch = mockAPI.fetcher
+
+ const response = await invokeLambda(myFunction)
+
+ expect(response).toBeUndefined()
+ expect(mockAPI.fulfilled).toBeTruthy()
+})
+
test('Throws an error if the API response does not have a successful status code, using the response body as part of the error message', async () => {
if (!hasFetchAPI) {
console.warn('Skipping test requires the fetch API')
diff --git a/src/lib/purge_cache.ts b/src/lib/purge_cache.ts
index e781eb06..b2f1b6aa 100644
--- a/src/lib/purge_cache.ts
+++ b/src/lib/purge_cache.ts
@@ -48,8 +48,14 @@ export const purgeCache = async (options: PurgeCacheOptions = {}) => {
const payload: PurgeAPIPayload = {
cache_tags: options.tags,
- deploy_alias: options.deployAlias,
}
+
+ if ('deployAlias' in options) {
+ payload.deploy_alias = options.deployAlias
+ } else if (!env.NETLIFY_LOCAL) {
+ payload.deploy_alias = env.NETLIFY_BRANCH
+ }
+
const token = env.NETLIFY_PURGE_API_TOKEN || options.token
if (env.NETLIFY_LOCAL && !token) {
From c4f986622808d4da468aafa1f5e05dfdad2dbd38 Mon Sep 17 00:00:00 2001
From: "token-generator-app[bot]"
<82042599+token-generator-app[bot]@users.noreply.github.com>
Date: Mon, 17 Mar 2025 12:28:32 +0000
Subject: [PATCH 7/7] chore(main): release 3.0.2 (#575)
:robot: I have created a release *beep* *boop*
---
## [3.0.2](https://github.com/netlify/functions/compare/v3.0.1...v3.0.2)
(2025-03-17)
### Bug Fixes
* if the purge api call fails, include the api response body in the
thrown error's message
([#571](https://github.com/netlify/functions/issues/571))
([e01516d](https://github.com/netlify/functions/commit/e01516df909fc0e9ba9c553655cb7df8b5b27e51))
* only purge alias by default if the purgeCache function is called
within a deployed function
([#576](https://github.com/netlify/functions/issues/576))
([964b0a2](https://github.com/netlify/functions/commit/964b0a27ee092f9cc5fd6726adb15439e3b9e74e))
---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
---
CHANGELOG.md | 8 ++++++++
package-lock.json | 4 ++--
package.json | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9be38be7..6158912f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## [3.0.2](https://github.com/netlify/functions/compare/v3.0.1...v3.0.2) (2025-03-17)
+
+
+### Bug Fixes
+
+* if the purge api call fails, include the api response body in the thrown error's message ([#571](https://github.com/netlify/functions/issues/571)) ([e01516d](https://github.com/netlify/functions/commit/e01516df909fc0e9ba9c553655cb7df8b5b27e51))
+* only purge alias by default if the purgeCache function is called within a deployed function ([#576](https://github.com/netlify/functions/issues/576)) ([964b0a2](https://github.com/netlify/functions/commit/964b0a27ee092f9cc5fd6726adb15439e3b9e74e))
+
## [3.0.1](https://github.com/netlify/functions/compare/v3.0.0...v3.0.1) (2025-03-04)
diff --git a/package-lock.json b/package-lock.json
index 4bac8418..8ff837c9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@netlify/functions",
- "version": "3.0.1",
+ "version": "3.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@netlify/functions",
- "version": "3.0.1",
+ "version": "3.0.2",
"license": "MIT",
"dependencies": {
"@netlify/serverless-functions-api": "1.35.0"
diff --git a/package.json b/package.json
index 2489bd07..1c2ced4f 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
}
}
},
- "version": "3.0.1",
+ "version": "3.0.2",
"description": "JavaScript utilities for Netlify Functions",
"files": [
"dist/**/*.js",