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

chore: update jspdf to 2.3.1 (security) #3291

Merged
merged 5 commits into from Mar 25, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -36,7 +36,7 @@
"typescript": "4.1.3"
},
"scripts": {
"postinstall": "check-node-version --quiet --node \">=6.11.1\" --npm \">=5.3.0\" --yarn \">=1.0.0\"",
"postinstall": "check-node-version --node \">=6.11.1\" --npm \">=5.3.0\" --yarn \">=1.0.0\"",
"build": "yarn build:ts && lerna run build --ignore @devexpress/dx-vue-*",
"build:ts": "node ./scripts/ts-generator.js && lerna run dts",
"build:ts:watch": "nodemon --exec \"yarn build:ts\" --watch \"packages/*/docs/reference/*.md\" --watch \"scripts/ts-generator.js\" --ext md,js",
Expand All @@ -50,6 +50,7 @@
"build:site:docs": "gulp site",
"build:site:watch": "npx nodemon --exec \"yarn build:site:docs\" --watch \"packages/dx-react-grid-demos/dist/\" --watch \"packages/dx-react-chart-demos/dist/\" --watch \"packages/dx-react-scheduler-demos/dist/\" --watch \"packages/*/docs/\" --watch \"packages/*/demos/\" --watch \"gulpfile.js\" --ext md,js",
"lint": "lerna run lint --ignore @devexpress/dx-vue-*",
"lint:fix": "lerna run lint:fix --ignore @devexpress/dx-vue-*",
"lint:ci": "lerna run lint:ci",
"test": "lerna run test --ignore @devexpress/dx-vue-* && yarn test:bs4 && yarn test:scheduler:pacific",
"test:ci": "yarn update-api:ci && lerna run test --ignore @devexpress/dx-vue-* -- -- --maxWorkers=1 --max-old-space-size=4096 && yarn test:bs4 && yarn test:scheduler:pacific",
Expand Down Expand Up @@ -78,5 +79,8 @@
],
"engines": {
"yarn": ">=1.22.0"
},
"resolutions": {
"@types/react": "16.9.35"
}
}
68 changes: 34 additions & 34 deletions packages/dx-chart-core/src/utils/scale.test.ts
Expand Up @@ -148,17 +148,17 @@ describe('#moveBounds', () => {
const target1 = realD3.scaleLinear().domain([0, 10]).range([0, 100]);
const target2 = realD3.scaleLinear().domain([0, 10]).range([100, 0]);

expect(moveBounds(target1, [3, 4], 10)).toEqual([4, 5]);
expect(moveBounds(target2, [3, 4], -10)).toEqual([4, 5]);
expect(moveBounds(target1, [3, 4], 10)).toEqual([4, 5].map(matchFloat));
expect(moveBounds(target2, [3, 4], -10)).toEqual([4, 5].map(matchFloat));

expect(moveBounds(target1, [3, 4], -20)).toEqual([1, 2]);
expect(moveBounds(target2, [3, 4], 20)).toEqual([1, 2]);
expect(moveBounds(target1, [3, 4], -20)).toEqual([1, 2].map(matchFloat));
expect(moveBounds(target2, [3, 4], 20)).toEqual([1, 2].map(matchFloat));

expect(moveBounds(target1, [7, 9], 20)).toEqual([8, 10]);
expect(moveBounds(target2, [7, 9], -20)).toEqual([8, 10]);
expect(moveBounds(target1, [7, 9], 20)).toEqual([8, 10].map(matchFloat));
expect(moveBounds(target2, [7, 9], -20)).toEqual([8, 10].map(matchFloat));

expect(moveBounds(target1, [1, 4], -20)).toEqual([0, 3]);
expect(moveBounds(target2, [1, 4], 20)).toEqual([0, 3]);
expect(moveBounds(target1, [1, 4], -20)).toEqual([0, 3].map(matchFloat));
expect(moveBounds(target2, [1, 4], 20)).toEqual([0, 3].map(matchFloat));
});

it('should not move bounds / linear', () => {
Expand All @@ -167,16 +167,16 @@ describe('#moveBounds', () => {
let bounds: any;

bounds = [3, 4];
expect(moveBounds(target1, bounds, 0)).toBe(bounds);
expect(moveBounds(target2, bounds, 0)).toBe(bounds);
expect(moveBounds(target1, bounds, 0)).toEqual(bounds.map(matchFloat));
expect(moveBounds(target2, bounds, 0)).toEqual(bounds.map(matchFloat));

bounds = [8, 10];
expect(moveBounds(target1, bounds, 10)).toBe(bounds);
expect(moveBounds(target2, bounds, -10)).toBe(bounds);
expect(moveBounds(target1, bounds, 10)).toEqual(bounds.map(matchFloat));
expect(moveBounds(target2, bounds, -10)).toEqual(bounds.map(matchFloat));

bounds = [0, 1];
expect(moveBounds(target1, bounds, -10)).toBe(bounds);
expect(moveBounds(target2, bounds, 10)).toBe(bounds);
expect(moveBounds(target1, bounds, -10)).toEqual(bounds.map(matchFloat));
expect(moveBounds(target2, bounds, 10)).toEqual(bounds.map(matchFloat));
});

it('should move bounds / band', () => {
Expand Down Expand Up @@ -224,19 +224,19 @@ describe('#growBounds', () => {
const target1 = realD3.scaleLinear().domain([0, 10]).range([0, 100]);
const target2 = realD3.scaleLinear().domain([0, 10]).range([100, 0]);

expect(growBounds(target1, [2, 6], 10, 40)).toEqual([3, 5]);
expect(growBounds(target1, [2, 6], 10, 20)).toEqual([2, 4]);
expect(growBounds(target1, [2, 6], 10, 60)).toEqual([4, 6]);
expect(growBounds(target2, [2, 6], 10, 60)).toEqual([3, 5]);
expect(growBounds(target2, [2, 6], 10, 80)).toEqual([2, 4]);
expect(growBounds(target2, [2, 6], 10, 40)).toEqual([4, 6]);
expect(growBounds(target1, [2, 6], 10, 40)).toEqual([3, 5].map(matchFloat));
expect(growBounds(target1, [2, 6], 10, 20)).toEqual([2, 4].map(matchFloat));
expect(growBounds(target1, [2, 6], 10, 60)).toEqual([4, 6].map(matchFloat));
expect(growBounds(target2, [2, 6], 10, 60)).toEqual([3, 5].map(matchFloat));
expect(growBounds(target2, [2, 6], 10, 80)).toEqual([2, 4].map(matchFloat));
expect(growBounds(target2, [2, 6], 10, 40)).toEqual([4, 6].map(matchFloat));

expect(growBounds(target1, [3, 5], -10, 40)).toEqual([2, 6]);
expect(growBounds(target1, [3, 5], -10, 30)).toEqual([3, 7]);
expect(growBounds(target1, [3, 5], -10, 50)).toEqual([1, 5]);
expect(growBounds(target2, [3, 5], -10, 60)).toEqual([2, 6]);
expect(growBounds(target2, [3, 5], -10, 70)).toEqual([3, 7]);
expect(growBounds(target2, [3, 5], -10, 50)).toEqual([1, 5]);
expect(growBounds(target1, [3, 5], -10, 40)).toEqual([2, 6].map(matchFloat));
expect(growBounds(target1, [3, 5], -10, 30)).toEqual([3, 7].map(matchFloat));
expect(growBounds(target1, [3, 5], -10, 50)).toEqual([1, 5].map(matchFloat));
expect(growBounds(target2, [3, 5], -10, 60)).toEqual([2, 6].map(matchFloat));
expect(growBounds(target2, [3, 5], -10, 70)).toEqual([3, 7].map(matchFloat));
expect(growBounds(target2, [3, 5], -10, 50)).toEqual([1, 5].map(matchFloat));

expect(growBounds(target1, [4, 5], 40, 45)).toEqual([4.495, 4.505].map(matchFloat));
expect(growBounds(target2, [4, 5], 40, 55)).toEqual([4.495, 4.505].map(matchFloat));
Expand All @@ -246,8 +246,8 @@ describe('#growBounds', () => {
expect(growBounds(target1, [4, 5], 40, 50)).toEqual([4.99, 5].map(matchFloat));
expect(growBounds(target2, [4, 5], 40, 50)).toEqual([4.99, 5].map(matchFloat));

expect(growBounds(target1, [1, 9], -30, 50)).toEqual([0, 10]);
expect(growBounds(target2, [1, 9], -30, 50)).toEqual([0, 10]);
expect(growBounds(target1, [1, 9], -30, 50)).toEqual([0, 10].map(matchFloat));
expect(growBounds(target2, [1, 9], -30, 50)).toEqual([0, 10].map(matchFloat));
});

it('should not grow bounds / linear', () => {
Expand All @@ -256,16 +256,16 @@ describe('#growBounds', () => {
let bounds: any;

bounds = [2, 6];
expect(growBounds(target1, bounds, 0, 40)).toBe(bounds);
expect(growBounds(target2, bounds, 0, 60)).toBe(bounds);
expect(growBounds(target1, bounds, 0, 40)).toEqual(bounds.map(matchFloat));
expect(growBounds(target2, bounds, 0, 60)).toEqual(bounds.map(matchFloat));

bounds = [0, 10];
expect(growBounds(target1, bounds, -10, 30)).toBe(bounds);
expect(growBounds(target2, bounds, -10, 70)).toBe(bounds);
expect(growBounds(target1, bounds, -10, 30)).toEqual(bounds.map(matchFloat));
expect(growBounds(target2, bounds, -10, 70)).toEqual(bounds.map(matchFloat));

bounds = [5.005, 5.006];
expect(growBounds(target1, bounds, 10, 51)).toBe(bounds);
expect(growBounds(target2, bounds, 10, 49)).toBe(bounds);
expect(growBounds(target1, bounds, 10, 51)).toEqual(bounds.map(matchFloat));
expect(growBounds(target2, bounds, 10, 49)).toEqual(bounds.map(matchFloat));
});

it('should grow bounds / band', () => {
Expand Down
Expand Up @@ -64,7 +64,6 @@ export const CodeSandBoxButton = ({
);
};


CodeSandBoxButton.propTypes = {
code: PropTypes.string.isRequired,
sandboxHtml: PropTypes.string.isRequired,
Expand Down
1 change: 0 additions & 1 deletion packages/dx-demo-shell/src/demo-viewer/demo-frame.jsx
Expand Up @@ -17,7 +17,6 @@ class DemoFrameRenderer extends React.PureComponent {
};
this.nodeRef = React.createRef();


this.onSubmitCustomLink = (e) => {
e.preventDefault();
const { onEditableLinkChange } = this.props;
Expand Down