From 80fc3db44a70107028afcd9ef119e299a9eaee6c Mon Sep 17 00:00:00 2001 From: Leonid Koftun Date: Sat, 2 Dec 2023 10:53:55 +0100 Subject: [PATCH] chore(deps): Build against latest devcycle version --- package.json | 2 +- src/useFeatureFlag.ts | 2 +- yarn.lock | 72 +++++++++++++++++++++++-------------------- 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index a52aecd..1fa95b3 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,6 @@ "tsdx": "^0.14.1", "tslib": "^2.4.0", "typescript": "^4.7.4", - "@devcycle/devcycle-js-sdk": "~1.4.0" + "@devcycle/devcycle-js-sdk": "~1.15.0" } } diff --git a/src/useFeatureFlag.ts b/src/useFeatureFlag.ts index 79143db..c6cd07d 100644 --- a/src/useFeatureFlag.ts +++ b/src/useFeatureFlag.ts @@ -28,7 +28,7 @@ export function useFeatureFlag( client.subscribe( `variableUpdated:${key}`, - (_key: string, variable: DVCVariable) => { + (_key: string, variable: DVCVariable | null) => { setValue(variable?.value ?? defaultValue); } ); diff --git a/yarn.lock b/yarn.lock index 4a3a24b..34842ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -947,29 +947,24 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@devcycle/devcycle-js-sdk@~1.4.0": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@devcycle/devcycle-js-sdk/-/devcycle-js-sdk-1.4.2.tgz#451269757e1c03616a60b85817cefec4dcbf6b56" - integrity sha512-1znCo4KhMq5SSP0Zj5Ln/FZZ3I+10XXY7CYvTuZbNW/eQCXj9B4Q0W0CGTK4UReNKacmCq6HI37wyB8RCPLJdA== - dependencies: - "@devcycle/types" "1.0.40" - "@nestjs/class-validator" "^0.13.4" - axios "^0.24.0" - axios-retry "^3.2.4" - class-transformer "0.5.1" - iso-639-1 "^2.1.13" +"@devcycle/devcycle-js-sdk@~1.15.0": + version "1.15.1" + resolved "https://registry.yarnpkg.com/@devcycle/devcycle-js-sdk/-/devcycle-js-sdk-1.15.1.tgz#7a0f87f0bb99866855de174c394f44ba1227dfb8" + integrity sha512-+sWUVoxFYaNjUVOQ7YnacWaY8itUt/m1kCSu0OyxqrnBA9N2QOwM+lH+gC9+iJ/UMHM6c4D+p4xOoSxMHR3x5g== + dependencies: + "@devcycle/types" "^1.3.0" + axios "^1.0.0" + axios-retry "^3.3.1" lodash "^4.17.21" - reflect-metadata "^0.1.13" - ua-parser-js "^1.0.2" + ua-parser-js "^1.0.36" uuid "^8.3.2" -"@devcycle/types@1.0.40": - version "1.0.40" - resolved "https://registry.yarnpkg.com/@devcycle/types/-/types-1.0.40.tgz#2dd0d2137d2881e2e6725636a7797d8e53dd1097" - integrity sha512-roz1zb73bnwjO6G1YmxyLSHDU43w+EgfeG1ulPPOL0I36Jucz6NIY2/cS6qBvVSQLbAxv26gK1rtF0RYHwFzAA== +"@devcycle/types@^1.3.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@devcycle/types/-/types-1.4.0.tgz#08d953794bd5a7ed035556c4c8f57b9b608a7a19" + integrity sha512-4b3sqn7UFAV1/LsU42TZCzLUpKDChW39CE1PgCaLonM944ho/ILwk3FHehk287PugIMm7mZLW2N1/QG0wukK9w== dependencies: "@nestjs/class-validator" "^0.13.4" - "@types/validator" "13.7.6" class-transformer "0.5.1" iso-639-1 "^2.1.13" lodash "^4.17.21" @@ -1461,11 +1456,6 @@ resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz" integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== -"@types/validator@13.7.6": - version "13.7.6" - resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.6.tgz#631f1acd15cbac9cb0a114da7e87575f1c95b46a" - integrity sha512-uBsnWETsUagQ0n6G2wcXNIufpTNJir0zqzG4p62fhnwzs48d/iuOWEEo0d3iUxN7D+9R/8CSvWGKS+KmaD0mWA== - "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" @@ -1764,7 +1754,7 @@ axe-core@^4.4.2: resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz" integrity sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA== -axios-retry@^3.2.4: +axios-retry@^3.3.1: version "3.9.1" resolved "https://registry.yarnpkg.com/axios-retry/-/axios-retry-3.9.1.tgz#c8924a8781c8e0a2c5244abf773deb7566b3830d" integrity sha512-8PJDLJv7qTTMMwdnbMvrLYuvB47M81wRtxQmEdV5w4rgbTXTt+vtPkXwajOfOdSyv/wZICJOC+/UhXH4aQ/R+w== @@ -1772,12 +1762,14 @@ axios-retry@^3.2.4: "@babel/runtime" "^7.15.4" is-retry-allowed "^2.2.0" -axios@^0.24.0: - version "0.24.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" - integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== +axios@^1.0.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" + integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== dependencies: - follow-redirects "^1.14.4" + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" axobject-query@^2.2.0: version "2.2.0" @@ -2239,7 +2231,7 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -3214,7 +3206,7 @@ flatted@^2.0.0: resolved "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -follow-redirects@^1.14.4: +follow-redirects@^1.15.0: version "1.15.3" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== @@ -3229,6 +3221,15 @@ forever-agent@~0.6.1: resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" @@ -5279,6 +5280,11 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + psl@^1.1.28: version "1.9.0" resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" @@ -6467,9 +6473,9 @@ typescript@^4.7.4: resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== -ua-parser-js@^1.0.2: +ua-parser-js@^1.0.36: version "1.0.37" - resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.37.tgz#b5dc7b163a5c1f0c510b08446aed4da92c46373f" integrity sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ== unbox-primitive@^1.0.2: