diff --git a/packages/abstractions/package.json b/packages/abstractions/package.json index 17d00175a..317b3e956 100644 --- a/packages/abstractions/package.json +++ b/packages/abstractions/package.json @@ -38,7 +38,7 @@ "@opentelemetry/api": "^1.2.0", "tinyduration": "^3.2.2", "tslib": "^2.3.1", - "uri-template-lite": "^22.1.0", + "uri-template-lite": "^23.4.0", "uuid": "^9.0.0" }, "publishConfig": { diff --git a/packages/abstractions/src/requestInformation.ts b/packages/abstractions/src/requestInformation.ts index c05ad0353..09f48965c 100644 --- a/packages/abstractions/src/requestInformation.ts +++ b/packages/abstractions/src/requestInformation.ts @@ -1,5 +1,5 @@ import { trace } from "@opentelemetry/api"; -import * as urlTpl from "uri-template-lite"; +import * as Template from "uri-template-lite"; import { DateOnly } from "./dateOnly"; import { Duration } from "./duration"; @@ -39,7 +39,7 @@ export class RequestInformation { } else if (!this.urlTemplate) { throw new Error("urlTemplate cannot be undefined"); } else { - const template = new urlTpl.URI.Template(this.urlTemplate); + const template = new (Template as any)(this.urlTemplate); const data = {} as { [key: string]: unknown }; for (const key in this.queryParameters) { if (this.queryParameters[key]) { diff --git a/packages/abstractions/tsconfig.base.json b/packages/abstractions/tsconfig.base.json index eafa9a4bc..e1feaca5a 100644 --- a/packages/abstractions/tsconfig.base.json +++ b/packages/abstractions/tsconfig.base.json @@ -12,7 +12,6 @@ "declaration": true, "declarationMap": true, "sourceMap": true, - "composite": true, - + "composite": true } } \ No newline at end of file diff --git a/packages/abstractions/tsconfig.cjs.json b/packages/abstractions/tsconfig.cjs.json index 3be854dac..84788b58f 100644 --- a/packages/abstractions/tsconfig.cjs.json +++ b/packages/abstractions/tsconfig.cjs.json @@ -6,5 +6,5 @@ "outDir": "./dist/cjs" }, "exclude": ["node_modules", "dist"], - "include": ["./src/**/*.ts", "./test"] + "include": ["./src/**/*.ts", "./test", "./types"] } \ No newline at end of file diff --git a/packages/abstractions/tsconfig.es.json b/packages/abstractions/tsconfig.es.json index 63b42d5e0..12033f62b 100644 --- a/packages/abstractions/tsconfig.es.json +++ b/packages/abstractions/tsconfig.es.json @@ -6,5 +6,5 @@ "outDir": "dist/es/" }, "exclude": ["node_modules", "dist"], - "include": ["./src/**/*.ts", "./test/**/*.ts"] + "include": ["./src/**/*.ts", "./test/**/*.ts", "./types"] } \ No newline at end of file diff --git a/packages/abstractions/types/uri-template-lite/index.d.ts b/packages/abstractions/types/uri-template-lite/index.d.ts new file mode 100644 index 000000000..2c7ae9aaa --- /dev/null +++ b/packages/abstractions/types/uri-template-lite/index.d.ts @@ -0,0 +1,5 @@ +declare module 'uri-template-lite' { + class Template { + constructor(template: string); + } +} diff --git a/yarn.lock b/yarn.lock index 914f788cb..e78b6a003 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7393,10 +7393,10 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -uri-template-lite@^22.1.0: - version "22.9.0" - resolved "https://registry.yarnpkg.com/uri-template-lite/-/uri-template-lite-22.9.0.tgz#98a1d0a6941cc7898aeca802315a6c5b24d31809" - integrity sha512-cmGZaykSWEQ5UXKaGKnUS8zFvfp8j1Jvn7dlq3P7tGd5XeybXcfo0xnVBRWiNEp80nO1GYgCLwoaRJ8WMmmk3Q== +uri-template-lite@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/uri-template-lite/-/uri-template-lite-23.4.0.tgz#989158b76dba91dafbb2d558153f5359d0b04f48" + integrity sha512-JsAjquFMpSyZRWAUQguhHIRuh4jb/xDhwQyb1/7C42YLJgkc5WoBF3UkRRM1QtL6Vr9xBa9fB7q3xPzXRwvuUA== url@^0.11.0: version "0.11.0"