Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Avoid popper.js npm warning #20433

Merged
merged 2 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/material-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@types/react-transition-group": "^4.2.0",
"clsx": "^1.0.2",
"hoist-non-react-statics": "^3.3.2",
"popper.js": "^1.14.1",
"popper.js": "^1.16.1-lts",
"prop-types": "^15.7.2",
"react-is": "^16.8.0",
"react-transition-group": "^4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Popper/Popper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import PopperJS from 'popper.js';
import PopperJs from 'popper.js';
import { chainPropTypes, refType } from '@material-ui/utils';
import { useTheme } from '@material-ui/styles';
import Portal from '../Portal';
Expand Down Expand Up @@ -123,7 +123,7 @@ const Popper = React.forwardRef(function Popper(props, ref) {
}
}

const popper = new PopperJS(getAnchorEl(anchorEl), tooltipRef.current, {
const popper = new PopperJs(getAnchorEl(anchorEl), tooltipRef.current, {
placement: rtlPlacement,
...popperOptions,
modifiers: {
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/Popper/Popper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import describeConformance from '@material-ui/core/test-utils/describeConformance';
import { createClientRender } from 'test/utils/createClientRender';
import consoleErrorMock from 'test/utils/consoleErrorMock';
import PopperJS from 'popper.js';
import PopperJs from 'popper.js';
import Grow from '../Grow';
import Popper from './Popper';

Expand Down Expand Up @@ -238,12 +238,12 @@ describe('<Popper />', () => {
const ref1 = React.createRef();
const ref2 = React.createRef();
const wrapper = mount(<Popper {...defaultProps} popperRef={ref1} />);
assert.strictEqual(ref1.current instanceof PopperJS, true);
assert.strictEqual(ref1.current instanceof PopperJs, true);
wrapper.setProps({
popperRef: ref2,
});
assert.strictEqual(ref1.current, null);
assert.strictEqual(ref2.current instanceof PopperJS, true);
assert.strictEqual(ref2.current instanceof PopperJs, true);
});
});

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12406,10 +12406,10 @@ pnp-webpack-plugin@1.5.0:
dependencies:
ts-pnp "^1.1.2"

popper.js@^1.14.1:
version "1.16.0"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.0.tgz#2e1816bcbbaa518ea6c2e15a466f4cb9c6e2fbb3"
integrity sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw==
popper.js@^1.16.1-lts:
version "1.16.1"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==

posix-character-classes@^0.1.0:
version "0.1.1"
Expand Down