@codacy/ui-components 0.70.14 → 0.70.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
- import { stringify } from 'query-string';
2
1
  import md5 from 'md5';
3
2
  export const getGravatarUrl = (email, options = {}) => {
4
3
  const {
@@ -10,6 +9,7 @@ export const getGravatarUrl = (email, options = {}) => {
10
9
  ...otherOptions,
11
10
  default: defaultUrl || optionDefault
12
11
  };
12
+ const params = new URLSearchParams(Object.entries(query).filter(([, value]) => value !== undefined).sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => [key, String(value)]));
13
13
  const emailHash = md5(email);
14
- return `https://www.gravatar.com/avatar/${emailHash}?${stringify(query)}`;
14
+ return `https://www.gravatar.com/avatar/${emailHash}?${params}`;
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.70.14",
3
+ "version": "0.70.16",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -40,8 +40,7 @@
40
40
  "@testing-library/user-event": "^14.6.1",
41
41
  "autosize": "^4.0.2",
42
42
  "md5": "^2.3.0",
43
- "polished": "^3.6.7",
44
- "query-string": "^6.13.7"
43
+ "polished": "^3.6.7"
45
44
  },
46
45
  "devDependencies": {
47
46
  "@babel/cli": "^7.23.4",
@@ -76,7 +75,7 @@
76
75
  "@typescript-eslint/eslint-plugin": "^8.39.0",
77
76
  "@typescript-eslint/parser": "^8.39.0",
78
77
  "@vitejs/plugin-react": "^4.7.0",
79
- "@vitest/coverage-v8": "^4.1.11",
78
+ "@vitest/coverage-v8": "^4.1.12",
80
79
  "babel-preset-react-app": "^10.0.1",
81
80
  "copy-to-clipboard": "^3.3.1",
82
81
  "eslint": "^9.39.2",
@@ -101,7 +100,6 @@
101
100
  "prettier": "^3.1.1",
102
101
  "react": "^18.2.0",
103
102
  "react-animate-height": "3.1.1",
104
- "react-docgen-typescript-loader": "^3.7.2",
105
103
  "react-dom": "^18.2.0",
106
104
  "react-popper": "^2.3.0",
107
105
  "react-toastify": "8.0.2",
@@ -111,7 +109,7 @@
111
109
  "styled-system": "^5.1.5",
112
110
  "typescript": "^4.5.4",
113
111
  "vite": "^7.0.6",
114
- "vitest": "^4.1.11"
112
+ "vitest": "^4.1.12"
115
113
  },
116
114
  "peerDependencies": {
117
115
  "@emotion/react": "^11.11.1",
@@ -155,6 +153,7 @@
155
153
  "braces": "^3.0.3",
156
154
  "express": "^4.21.2",
157
155
  "esbuild": "^0.25.0",
158
- "@babel/helper-compilation-targets/lru-cache": "5.1.1"
156
+ "@babel/helper-compilation-targets/lru-cache": "5.1.1",
157
+ "storybook/@vitest/mocker": "^4.1.12"
159
158
  }
160
159
  }