Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions endpoints/Endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -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)))
}

/**
Expand Down
21 changes: 11 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"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",
"ts-jest": "29.4.12",
"typedoc": "0.28.20",
"typescript": "6.0.3"
"typescript": "7.0.2"
},
"dependencies": {
"url-template": "^2.0.8"
"uri-templates": "^0.2.0"
}
}
4 changes: 0 additions & 4 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
"matchPackagePatterns": ["^gittools"],
"allowedVersions": "<4"
},
{
"matchPackagePatterns": ["url-template$"],
"allowedVersions": "<3"
},
{
"groupName": "Dev dependencies",
"matchDepTypes": ["devDependencies"],
Expand Down