From 3eabf0e10e50a81dbd8889224cf7fcf0c97530bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Mar 2022 11:12:30 +0100 Subject: [PATCH] Bump uuid from 3.4.0 to 8.3.2 (#256) * Bump uuid from 3.4.0 to 8.3.2 Bumps [uuid](https://github.com/uuidjs/uuid) from 3.4.0 to 8.3.2. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v3.4.0...v8.3.2) Signed-off-by: dependabot[bot] * Bump uuid from 3.4.0 to 8.3.2 Bumps [uuid](https://github.com/uuidjs/uuid) from 3.4.0 to 8.3.2. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v3.4.0...v8.3.2) Signed-off-by: dependabot[bot] * Updated import uuid for Input and TextArea, and mock of uuid * fixed problem with uuid in bundle.js * Minor utpdates on packages Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carina --- package-lock.json | 115 +++++++++++++++------- package.json | 40 ++++---- rollup.config.js | 2 +- src/components/Dropdown/dropdown.test.jsx | 2 +- src/components/Input/index.jsx | 4 +- src/components/Input/input.test.jsx | 2 +- src/components/TextArea/index.jsx | 4 +- src/components/TextArea/textArea.test.jsx | 2 +- 8 files changed, 109 insertions(+), 62 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27bb82f4..d3dded67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,31 +9,31 @@ "version": "2.0.67", "license": "Apache-2.0", "dependencies": { - "prismjs": "^1.23.0", + "prismjs": "^1.27.0", "react-feather": "^2.0.9", - "react-test-renderer": "^16.13.1", - "sass": "^1.26.11", - "uuid": "^3.4.0" + "react-test-renderer": "^16.14.0", + "sass": "^1.49.9", + "uuid": "^8.3.2" }, "devDependencies": { - "@babel/cli": "^7.13.0", - "@babel/core": "^7.13.8", + "@babel/cli": "^7.17.6", + "@babel/core": "^7.17.5", "@babel/eslint-parser": "^7.17.0", - "@babel/preset-env": "^7.11.5", - "@babel/preset-react": "^7.12.13", + "@babel/preset-env": "^7.16.11", + "@babel/preset-react": "^7.16.7", "@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-commonjs": "^21.0.2", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", "@storybook/addon-actions": "^5.3.21", "@storybook/addon-centered": "^5.3.21", - "@storybook/addon-links": "^6.1.21", - "@storybook/addons": "^6.1.21", + "@storybook/addon-links": "^6.4.19", + "@storybook/addons": "^6.4.19", "@storybook/react": "^5.3.21", "@svgr/rollup": "^6.2.1", "@svgr/webpack": "^4.3.3", "babel-jest": "^26.6.3", - "babel-loader": "^8.2.2", + "babel-loader": "^8.2.3", "babel-plugin-module-resolver": "^3.2.0", "babel-plugin-prismjs": "^1.1.1", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", @@ -41,24 +41,24 @@ "css-loader": "^5.2.7", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", - "enzyme-to-json": "^3.6.1", - "eslint": "^7.22.0", + "enzyme-to-json": "^3.6.2", + "eslint": "^7.32.0", "eslint-config-airbnb": "^18.2.1", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.3.1", - "eslint-plugin-react": "^7.22.0", - "eslint-webpack-plugin": "^2.5.4", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.29.3", + "eslint-webpack-plugin": "^2.6.0", "file-loader": "^6.2.0", "jest": "^24.9.0", "path": "^0.12.7", - "prop-types": "^15.7.2", - "react-dom": "^16.13.1", + "prop-types": "^15.8.1", + "react-dom": "^16.14.0", "rollup": "^2.69.0", "rollup-plugin-scss": "^3.0.0", "rollup-plugin-terser": "^7.0.2", "sass-loader": "^8.0.2", "style-loader": "^2.0.0", - "stylelint": "^13.12.0", + "stylelint": "^13.13.1", "stylelint-config-recommended": "^3.0.0", "webpack": "^4.46.0", "webpack-cli": "^3.3.12" @@ -4833,6 +4833,16 @@ "core-js": "^3.0.1" } }, + "node_modules/@storybook/addon-actions/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/@storybook/addon-centered": { "version": "5.3.21", "resolved": "https://registry.npmjs.org/@storybook/addon-centered/-/addon-centered-5.3.21.tgz", @@ -12710,9 +12720,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.2.tgz", - "integrity": "sha512-ypEBTKOy5liFQXZWMchJ3LN0JX1uPI6n7MN7OPHKacqXAxq5gYC30TdO7wqGYQyxD1OrzpobdHC3hDmlRWDg9w==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.3.tgz", + "integrity": "sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg==", "dev": true, "dependencies": { "array-includes": "^3.1.4", @@ -24461,6 +24471,16 @@ "node": ">=0.6" } }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -27917,12 +27937,11 @@ } }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/v8-compile-cache": { @@ -28592,6 +28611,16 @@ "node": ">=6" } }, + "node_modules/webpack-log/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/webpack-sources": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", @@ -32903,6 +32932,12 @@ "requires": { "core-js": "^3.0.1" } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, @@ -39413,9 +39448,9 @@ } }, "eslint-plugin-react": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.2.tgz", - "integrity": "sha512-ypEBTKOy5liFQXZWMchJ3LN0JX1uPI6n7MN7OPHKacqXAxq5gYC30TdO7wqGYQyxD1OrzpobdHC3hDmlRWDg9w==", + "version": "7.29.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.3.tgz", + "integrity": "sha512-MzW6TuCnDOcta67CkpDyRfRsEVx9FNMDV8wZsDqe1luHPdGTrQIUaUXD27Ja3gHsdOIs/cXzNchWGlqm+qRVRg==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -48685,6 +48720,12 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, @@ -51468,9 +51509,9 @@ "dev": true }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" }, "v8-compile-cache": { "version": "2.3.0", @@ -52170,6 +52211,12 @@ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true } } }, diff --git a/package.json b/package.json index bbd45475..f4b7ab09 100644 --- a/package.json +++ b/package.json @@ -36,20 +36,20 @@ "react": "^16.10.2 || ^17.0.0" }, "devDependencies": { - "@babel/cli": "^7.13.0", - "@babel/core": "^7.13.8", - "@babel/preset-env": "^7.11.5", - "@babel/preset-react": "^7.12.13", + "@babel/cli": "^7.17.6", + "@babel/core": "^7.17.5", + "@babel/preset-env": "^7.16.11", + "@babel/preset-react": "^7.16.7", "@storybook/addon-actions": "^5.3.21", "@storybook/addon-centered": "^5.3.21", - "@storybook/addon-links": "^6.1.21", - "@storybook/addons": "^6.1.21", + "@storybook/addon-links": "^6.4.19", + "@storybook/addons": "^6.4.19", "@storybook/react": "^5.3.21", "@svgr/rollup": "^6.2.1", "@svgr/webpack": "^4.3.3", "@babel/eslint-parser": "^7.17.0", "babel-jest": "^26.6.3", - "babel-loader": "^8.2.2", + "babel-loader": "^8.2.3", "babel-plugin-module-resolver": "^3.2.0", "babel-plugin-prismjs": "^1.1.1", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", @@ -57,18 +57,18 @@ "css-loader": "^5.2.7", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", - "enzyme-to-json": "^3.6.1", - "eslint": "^7.22.0", + "enzyme-to-json": "^3.6.2", + "eslint": "^7.32.0", "eslint-config-airbnb": "^18.2.1", - "eslint-webpack-plugin": "^2.5.4", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsx-a11y": "^6.3.1", - "eslint-plugin-react": "^7.22.0", + "eslint-webpack-plugin": "^2.6.0", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.29.3", "file-loader": "^6.2.0", "jest": "^24.9.0", "path": "^0.12.7", - "prop-types": "^15.7.2", - "react-dom": "^16.13.1", + "prop-types": "^15.8.1", + "react-dom": "^16.14.0", "rollup": "^2.69.0", "@rollup/plugin-babel": "^5.3.1", "@rollup/plugin-commonjs": "^21.0.2", @@ -78,17 +78,17 @@ "rollup-plugin-terser": "^7.0.2", "sass-loader": "^8.0.2", "style-loader": "^2.0.0", - "stylelint": "^13.12.0", + "stylelint": "^13.13.1", "stylelint-config-recommended": "^3.0.0", "webpack": "^4.46.0", "webpack-cli": "^3.3.12" }, "dependencies": { - "prismjs": "^1.23.0", + "prismjs": "^1.27.0", "react-feather": "^2.0.9", - "react-test-renderer": "^16.13.1", - "sass": "^1.26.11", - "uuid": "^3.4.0" + "react-test-renderer": "^16.14.0", + "sass": "^1.49.9", + "uuid": "^8.3.2" }, "directories": { "lib": "lib" diff --git a/rollup.config.js b/rollup.config.js index db8296d7..13fcc14b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -17,7 +17,7 @@ export default [{ external: [ 'react', 'prop-types', - 'uuid/v4', + 'uuid', ], plugins: [ scss({ diff --git a/src/components/Dropdown/dropdown.test.jsx b/src/components/Dropdown/dropdown.test.jsx index 4c893a36..5237032f 100644 --- a/src/components/Dropdown/dropdown.test.jsx +++ b/src/components/Dropdown/dropdown.test.jsx @@ -16,7 +16,7 @@ const items = [ }, ]; -jest.mock('uuid/v4', () => jest.fn(() => 1)); +jest.mock('uuid', () => ({ v4: () => 1 })); describe('Dropdown component', () => { test('Matches the snapshot', () => { diff --git a/src/components/Input/index.jsx b/src/components/Input/index.jsx index 992e84c6..c16efe36 100644 --- a/src/components/Input/index.jsx +++ b/src/components/Input/index.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; -import uuid from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import { Search } from 'react-feather'; import InputError from '../InputError'; @@ -9,7 +9,7 @@ const Input = ({ className, disabled, error, errorMessage, handleChange, id, label, negative, placeholder, searchField, submitCallback, type, value, onFocus, onBlur, size, }) => { const [inputValue, setValue] = useState(value); - const inputId = id || uuid(); + const inputId = id || uuidv4(); const handleInputChange = e => { setValue(e.target.value); handleChange(e.target.value); diff --git a/src/components/Input/input.test.jsx b/src/components/Input/input.test.jsx index c96584a0..ee7e8a67 100644 --- a/src/components/Input/input.test.jsx +++ b/src/components/Input/input.test.jsx @@ -3,7 +3,7 @@ import {mount, shallow} from 'enzyme'; import Input from './index'; import InputError from '../InputError'; -jest.mock('uuid/v4', () => jest.fn(() => 1)); +jest.mock('uuid', () => ({ v4: () => 1 })); describe('Input component', () => { test('Matches the snapshot', () => { diff --git a/src/components/TextArea/index.jsx b/src/components/TextArea/index.jsx index d79dd409..4f77d61f 100644 --- a/src/components/TextArea/index.jsx +++ b/src/components/TextArea/index.jsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; -import uuid from 'uuid/v4'; +import { v4 as uuidv4 } from 'uuid'; import InputError from '../InputError'; const TextArea = ({ @@ -8,7 +8,7 @@ const TextArea = ({ rows, cols, onBlur, onFocus, }) => { const [inputValue, setValue] = useState(value); - const inputId = id || uuid(); + const inputId = id || uuidv4(); const handleInputChange = e => { setValue(e.target.value); handleChange(e.target.value); diff --git a/src/components/TextArea/textArea.test.jsx b/src/components/TextArea/textArea.test.jsx index 7c2190a6..1ec26b5b 100644 --- a/src/components/TextArea/textArea.test.jsx +++ b/src/components/TextArea/textArea.test.jsx @@ -3,7 +3,7 @@ import { shallow, mount } from 'enzyme'; import TextArea from './index'; import InputError from '../InputError'; -jest.mock('uuid/v4', () => jest.fn(() => 1)); +jest.mock('uuid', () => ({ v4: () => 1 })); describe('Input component', () => { test('Matches the snapshot', () => {