Skip to content

Commit

Permalink
Bump uuid from 3.4.0 to 8.3.2 (#256)
Browse files Browse the repository at this point in the history
* 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](uuidjs/uuid@v3.4.0...v8.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* 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](uuidjs/uuid@v3.4.0...v8.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

* 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 <cgn@ssb.no>
  • Loading branch information
dependabot[bot] and ssb-cgn committed Mar 4, 2022
1 parent d6730f9 commit 3eabf0e
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 62 deletions.
115 changes: 81 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions package.json
Expand Up @@ -36,39 +36,39 @@
"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",
"cross-env": "^6.0.3",
"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",
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Expand Up @@ -17,7 +17,7 @@ export default [{
external: [
'react',
'prop-types',
'uuid/v4',
'uuid',
],
plugins: [
scss({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dropdown/dropdown.test.jsx
Expand Up @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions 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';

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Input/input.test.jsx
Expand Up @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextArea/index.jsx
@@ -1,14 +1,14 @@
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 = ({
ariaLabel, className, disabled, error, errorMessage, handleChange, id, label, negative, placeholder, value,
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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextArea/textArea.test.jsx
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 3eabf0e

Please sign in to comment.