From 99adfb0168681994fed13d9cb292a21fa1609deb Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Wed, 25 Sep 2019 12:45:20 +0530 Subject: [PATCH 1/5] Removed stable tag Now develop > master pipeline will release always a latest release --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 09ec1a46..2bf4f64f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: - attach_workspace: at: . - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - run: npm publish --tag=stable-v0.7.11 + - run: npm publish workflows: version: 2 @@ -45,4 +45,4 @@ workflows: tags: only: /v[0-9]+(\.[0-9]+)*(-[0-9]+)?/ requires: - - test \ No newline at end of file + - test From e2f344b3fdfa47ab9030381dc8f5cf4aa83f13c5 Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 25 Sep 2019 13:30:23 +0530 Subject: [PATCH 2/5] updated related to v5-groups-api --- src/services/groups.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/services/groups.js b/src/services/groups.js index a5ddc2a7..4d96e027 100644 --- a/src/services/groups.js +++ b/src/services/groups.js @@ -140,8 +140,8 @@ export function checkUserGroups(groupIds, userGroups, knownGroups) { function handleApiResponse(response) { if (!response.ok) throw new Error(response.statusText); return response.json().then(({ result }) => { - if (result.status !== 200) throw new Error(result.content); - return result.content; + // if (result.status !== 200) throw new Error(result.content); + return response.json(); }); } @@ -193,7 +193,7 @@ class GroupService { constructor(tokenV3) { const now = Date.now(); this.private = { - api: getApi('V3', tokenV3), + api: getApi('V5', tokenV3), cache: { groupTreeIds: { lastCleanUp: now, @@ -341,9 +341,9 @@ class GroupService { if (withSubGroups) url += '?includeSubGroups=true'; let res = await this.private.api.get(url); if (!res.ok) throw new Error(res.statusText); - res = (await res.json()).result; - if (!res.success) throw new Error(res.content); - return Number(res.content); + res = (await res.json()); + // if (!res.success) throw new Error(res.content); + return Number(res.count); } /** From d1ed728d1b6a3011d26fbed61ef739c03496da30 Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 25 Sep 2019 13:30:58 +0530 Subject: [PATCH 3/5] updated npm version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6458588..8fc4363f 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .", "test": "npm run lint && npm run jest" }, - "version": "0.7.11-14", + "version": "0.7.11-15", "dependencies": { "auth0-js": "^6.8.4", "config": "^3.2.0", From e210dc56a8fca7ccce51c8a06cecfee461094e8e Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 25 Sep 2019 13:55:38 +0530 Subject: [PATCH 4/5] fixed testcases --- __tests__/__snapshots__/index.js.snap | 3 +++ package-lock.json | 2 +- src/services/groups.js | 9 +++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index f2f97d81..79a7d795 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -212,14 +212,17 @@ Object { "countReset": [Function], "debug": [Function], "dir": [Function], + "dirxml": [Function], "error": [Function], "group": [Function], "groupCollapsed": [Function], "groupEnd": [Function], "info": [Function], "log": [Function], + "table": [Function], "time": [Function], "timeEnd": [Function], + "timeLog": [Function], "trace": [Function], "warn": [Function], }, diff --git a/package-lock.json b/package-lock.json index 0a6cb4ce..1d6c931f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "topcoder-react-lib", - "version": "0.7.11-8", + "version": "0.7.11-15", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/services/groups.js b/src/services/groups.js index 4d96e027..0dc4d8e3 100644 --- a/src/services/groups.js +++ b/src/services/groups.js @@ -139,10 +139,11 @@ export function checkUserGroups(groupIds, userGroups, knownGroups) { */ function handleApiResponse(response) { if (!response.ok) throw new Error(response.statusText); - return response.json().then(({ result }) => { - // if (result.status !== 200) throw new Error(result.content); - return response.json(); - }); + return response.json(); + // return response.json().then(({ result }) => { + // return result; + // if (result.status !== 200) throw new Error(result.content); + // }); } /** From b5f2f52813b1f0d5d7bc7e57d85d722e3997c48d Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Wed, 25 Sep 2019 13:59:51 +0530 Subject: [PATCH 5/5] fixed testcases --- __tests__/__snapshots__/index.js.snap | 3 --- 1 file changed, 3 deletions(-) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index 79a7d795..f2f97d81 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -212,17 +212,14 @@ Object { "countReset": [Function], "debug": [Function], "dir": [Function], - "dirxml": [Function], "error": [Function], "group": [Function], "groupCollapsed": [Function], "groupEnd": [Function], "info": [Function], "log": [Function], - "table": [Function], "time": [Function], "timeEnd": [Function], - "timeLog": [Function], "trace": [Function], "warn": [Function], }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy