Skip to content

Commit

Permalink
chore: revert deprecate instanceid (#180), unleash client 6.1.0 (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunogois authored Jul 15, 2024
1 parent d6a7205 commit 11a1576
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ You **must configure** these three variables for the proxy to start successfully
| n/a | `PORT` or `PROXY_PORT` | 3000 | no | The port where the proxy should listen. |
| proxyBasePath | `PROXY_BASE_PATH` | "" | no | The base path to run the proxy from. "/proxy" will be added at the end. For instance, if `proxyBasePath` is `"base/path"`, the proxy will run at `/base/path/proxy`. |
| unleashAppName | `UNLEASH_APP_NAME` | "unleash-proxy" | no | App name to used when registering with Unleash |
| unleashInstanceId | `UNLEASH_INSTANCE_ID` | `generated` | deprecated | Unleash instance id to used when registering with Unleash |
| unleashInstanceId | `UNLEASH_INSTANCE_ID` | `generated` | no | Unleash instance id to used when registering with Unleash |
| refreshInterval | `UNLEASH_FETCH_INTERVAL` | 5000 | no | How often the proxy should query Unleash for updates, defined in ms. |
| metricsInterval | `UNLEASH_METRICS_INTERVAL` | 30000 | no | How often the proxy should send usage metrics back to Unleash, defined in ms. |
| metricsJitter | `UNLEASH_METRICS_JITTER` | 0 | no | Adds jitter to the metrics interval to avoid multiple instances sending metrics at the same time, defined in ms. |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unleash/proxy",
"version": "1.4.2",
"version": "1.4.3",
"description": "The Unleash Proxy (Open-Source)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -46,7 +46,7 @@
"openapi-types": "^11.0.0",
"qs": "^6.9.7",
"type-is": "^1.6.18",
"unleash-client": "^6.0.0"
"unleash-client": "^6.1.0"
},
"devDependencies": {
"@apidevtools/swagger-parser": "10.1.0",
Expand Down
4 changes: 0 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ export interface IProxyConfig {
unleashUrl: string;
unleashApiToken: string;
unleashAppName: string;
/**
* @deprecated This property is deprecated and will be removed in a future version.
* Note: This property is currently a no-op (no operation) and does not affect the automatically generated instanceId.
*/
unleashInstanceId: string;
customStrategies?: Strategy[];
clientKeys: string[];
Expand Down
2 changes: 2 additions & 0 deletions src/create-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const createSingletonClient = (config: IProxyConfig): Client => {
const unleash = initialize({
url: config.unleashUrl,
appName: config.unleashAppName,
instanceId: config.unleashInstanceId,
environment: config.environment,
refreshInterval: config.refreshInterval,
projectName: config.projectName,
Expand Down Expand Up @@ -48,6 +49,7 @@ export const createNewClient = (config: IProxyConfig): Client => {
const unleash = new Unleash({
url: config.unleashUrl,
appName: config.unleashAppName,
instanceId: config.unleashInstanceId,
environment: config.environment,
refreshInterval: config.refreshInterval,
projectName: config.projectName,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4962,10 +4962,10 @@ unique-slug@^4.0.0:
dependencies:
imurmurhash "^0.1.4"

unleash-client@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/unleash-client/-/unleash-client-6.0.0.tgz#03af4bd3177647e356b6c7a572d94ec611c2da4f"
integrity sha512-qvnFtlV5zCGhXC/4Soqe1FCRjes61HuJYXysHwnUplNd5qItX51S9f+oRu2WzIdBp+kiYU5SwT2sSWEJK+OTaQ==
unleash-client@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/unleash-client/-/unleash-client-6.1.0.tgz#b8863bb049b61d702b7c45328d6225a0c9f9b67a"
integrity sha512-dXTnWorA5NfddqZfMPcTe6xl+uu9CxkpR5wLuKKLLpvHuNzMrTlwDOfaQqFHlfPx+8xudQQ0fZx4raNxL3GLOg==
dependencies:
http-proxy-agent "^7.0.2"
https-proxy-agent "^7.0.5"
Expand Down

0 comments on commit 11a1576

Please sign in to comment.