From 59a3e5102cc747e6159ce9df0b379a33cc4d2190 Mon Sep 17 00:00:00 2001 From: Bastian Eicher Date: Mon, 10 Aug 2026 18:11:14 +0200 Subject: [PATCH 1/2] Replaced url-template with uri-templates --- endpoints/Endpoint.ts | 6 +++--- package-lock.json | 21 +++++++++++---------- package.json | 4 ++-- renovate.json | 4 ---- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/endpoints/Endpoint.ts b/endpoints/Endpoint.ts index 874842d..9e82d93 100644 --- a/endpoints/Endpoint.ts +++ b/endpoints/Endpoint.ts @@ -2,7 +2,7 @@ import { HttpMethod, HttpHeader, HttpStatusCode, HttpClient } from "../http"; import { Serializer } from "../serializers"; import { ErrorHandler, NotFoundError } from "../errors"; import { LinkExtractor, Link } from "../links"; -import template from 'url-template'; +import uriTemplates from 'uri-templates'; export class Endpoint { /** @@ -200,8 +200,8 @@ export class Endpoint { * @throws {@link errors!NotFoundError}: No link template with the specified `rel` could be found. */ linkTemplate(rel: string, variables: { [key: string]: any; }): URL { - const tmpl = template.parse(this.getLinkTemplate(rel)) - return new URL(this.join(tmpl.expand(variables))) + const tmpl = uriTemplates(this.getLinkTemplate(rel)) + return new URL(this.join(tmpl.fill(variables))) } /** diff --git a/package-lock.json b/package-lock.json index 7d89757..63f520f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "url-template": "^2.0.8" + "uri-templates": "^0.2.0" }, "devDependencies": { "@types/jest": "30.0.0", "@types/node": "26.2.0", - "@types/url-template": "2.0.31", + "@types/uri-templates": "0.1.34", "jest": "30.4.2", "jest-environment-jsdom": "30.4.1", "jest-fetch-mock": "4.2.0", @@ -1445,10 +1445,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/url-template": { - "version": "2.0.31", - "resolved": "https://registry.npmjs.org/@types/url-template/-/url-template-2.0.31.tgz", - "integrity": "sha512-mXzP2L5FkK9b+MYqlKYSJG/1RTMFWZT1oBuQ6KPzSY3m1hwKks7PrHg+Yd3QkoedBUJO749JXvK3FgCgGGIx6Q==", + "node_modules/@types/uri-templates": { + "version": "0.1.34", + "resolved": "https://registry.npmjs.org/@types/uri-templates/-/uri-templates-0.1.34.tgz", + "integrity": "sha512-13v4r/Op3iEO1y6FvEHQjrUNnrNyO67SigdFC9n80sVfsrM2AWJRNYbE1pBs4/p87I7z1J979JGeLAo3rM1L/Q==", "dev": true, "license": "MIT" }, @@ -5071,10 +5071,11 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/url-template": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" + "node_modules/uri-templates": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/uri-templates/-/uri-templates-0.2.0.tgz", + "integrity": "sha512-EWkjYEN0L6KOfEoOH6Wj4ghQqU7eBZMJqRHQnxQAq+dSEzRPClkWjf8557HkWQXF6BrAUoLSAyy9i3RVTliaNg==", + "license": "http://geraintluff.github.io/tv4/LICENSE.txt" }, "node_modules/v8-to-istanbul": { "version": "9.3.0", diff --git a/package.json b/package.json index 106bc2e..2c9fc26 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@types/node": "26.2.0", "@types/jest": "30.0.0", - "@types/url-template": "2.0.31", + "@types/uri-templates": "0.1.34", "jest": "30.4.2", "jest-environment-jsdom": "30.4.1", "jest-fetch-mock": "4.2.0", @@ -39,6 +39,6 @@ "typescript": "6.0.3" }, "dependencies": { - "url-template": "^2.0.8" + "uri-templates": "^0.2.0" } } diff --git a/renovate.json b/renovate.json index dc52b81..eb7f92c 100644 --- a/renovate.json +++ b/renovate.json @@ -10,10 +10,6 @@ "matchPackagePatterns": ["^gittools"], "allowedVersions": "<4" }, - { - "matchPackagePatterns": ["url-template$"], - "allowedVersions": "<3" - }, { "groupName": "Dev dependencies", "matchDepTypes": ["devDependencies"], From ba972dc2d66a38b24760bcd819a0aafe7ae68e86 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 16:15:29 +0000 Subject: [PATCH 2/2] Update dependency typescript to v7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c9fc26..1da4a4a 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "jest-fetch-mock": "4.2.0", "ts-jest": "29.4.12", "typedoc": "0.28.20", - "typescript": "6.0.3" + "typescript": "7.0.2" }, "dependencies": { "uri-templates": "^0.2.0"