Skip to content

Commit

Permalink
Merge pull request #1129 from canalplus/dep-updates-v3.28.0
Browse files Browse the repository at this point in the history
 Update most dependencies but Jest
  • Loading branch information
peaBerberian authored Jun 15, 2022
2 parents b0968f0 + 6bb50f2 commit d784283
Show file tree
Hide file tree
Showing 75 changed files with 5,189 additions and 4,346 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
strictPropertyInitialization: true,
noUnusedParameters: true,
noUnusedLocals: true,
types: ["rxjs", "node", "jest"],
types: ["node", "jest"],
module: "es2015",
moduleResolution: "node",
esModuleInterop: true,
Expand Down
6,557 changes: 3,685 additions & 2,872 deletions package-lock.json

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,56 +81,56 @@
"rxjs": "7.4.0"
},
"devDependencies": {
"@babel/core": "7.17.7",
"@babel/plugin-transform-runtime": "7.17.0",
"@babel/preset-env": "7.16.11",
"@babel/preset-react": "7.16.7",
"@types/chai": "4.3.0",
"@types/jest": "27.4.1",
"@types/mocha": "9.1.0",
"@types/node": "17.0.21",
"@babel/core": "7.18.5",
"@babel/plugin-transform-runtime": "7.18.5",
"@babel/preset-env": "7.18.2",
"@babel/preset-react": "7.17.12",
"@types/chai": "4.3.1",
"@types/jest": "27.5.1",
"@types/mocha": "9.1.1",
"@types/node": "17.0.42",
"@types/sinon": "10.0.11",
"@typescript-eslint/eslint-plugin": "5.15.0",
"@typescript-eslint/eslint-plugin-tslint": "5.15.0",
"@typescript-eslint/parser": "5.15.0",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/eslint-plugin-tslint": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
"arraybuffer-loader": "1.0.8",
"babel-loader": "8.2.3",
"babel-loader": "8.2.5",
"chai": "4.3.6",
"cheerio": "1.0.0-rc.10",
"core-js": "3.21.1",
"esbuild": "0.14.27",
"eslint": "8.11.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jsdoc": "38.0.4",
"eslint-plugin-react": "7.29.4",
"cheerio": "1.0.0-rc.11",
"core-js": "3.22.8",
"esbuild": "0.14.43",
"eslint": "8.17.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsdoc": "39.3.2",
"eslint-plugin-react": "7.30.0",
"esm": "3.2.25",
"express": "4.17.3",
"highlight.js": "11.5.0",
"html-entities": "2.3.2",
"express": "4.18.1",
"highlight.js": "11.5.1",
"html-entities": "2.3.3",
"jest": "27.5.1",
"karma": "6.3.17",
"karma": "6.3.20",
"karma-chrome-launcher": "3.1.1",
"karma-firefox-launcher": "2.1.2",
"karma-mocha": "2.0.1",
"karma-webpack": "5.0.0",
"markdown-it": "12.3.2",
"mocha": "9.2.2",
"markdown-it": "13.0.1",
"mocha": "10.0.0",
"mocha-loader": "5.1.5",
"raw-loader": "4.0.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.1.0",
"react-dom": "18.1.0",
"regenerator-runtime": "0.13.9",
"rimraf": "3.0.2",
"semver": "7.3.5",
"sinon": "13.0.1",
"terser-webpack-plugin": "5.3.1",
"ts-jest": "27.1.3",
"ts-loader": "9.2.8",
"semver": "7.3.7",
"sinon": "14.0.0",
"terser-webpack-plugin": "5.3.3",
"ts-jest": "27.1.5",
"ts-loader": "9.3.0",
"tslint": "6.1.3",
"typescript": "4.6.2",
"webpack": "5.70.0",
"typescript": "4.7.3",
"webpack": "5.73.0",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "4.9.2"
"webpack-cli": "4.10.0"
},
"scripts-list": {
"Build a demo page (e.g. to test a code change)": {
Expand Down
8 changes: 4 additions & 4 deletions src/compat/__tests__/add_text_track.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("compat - addTextTrack", () => {
isIEOrEdge: true,
}));

const addTextTrack = require("../add_text_track").default;
const addTextTrack = jest.requireActual("../add_text_track").default;
const { track, trackElement } = addTextTrack(fakeMediaElement, true);
expect(trackElement).toBe(undefined);
expect(track).toBe(fakeTextTrack);
Expand Down Expand Up @@ -74,7 +74,7 @@ describe("compat - addTextTrack", () => {
isIEOrEdge: true,
}));

const addTextTrack = require("../add_text_track").default;
const addTextTrack = jest.requireActual("../add_text_track").default;
const { track, trackElement } = addTextTrack(fakeMediaElement, false);
expect(trackElement).toBe(undefined);
expect(track).toBe(fakeTextTrack);
Expand Down Expand Up @@ -117,7 +117,7 @@ describe("compat - addTextTrack", () => {
const spyOnCreateElement = jest.spyOn(document, "createElement")
.mockImplementation(() => fakeTextTrackElement as unknown as HTMLElement);

const addTextTrack = require("../add_text_track").default;
const addTextTrack = jest.requireActual("../add_text_track").default;
const { track, trackElement } = addTextTrack(fakeMediaElement, true);
expect(track).toBe(fakeTextTrack);
expect(track.mode).toBe("hidden");
Expand Down Expand Up @@ -162,7 +162,7 @@ describe("compat - addTextTrack", () => {
const spyOnCreateElement = jest.spyOn(document, "createElement")
.mockImplementation(() => fakeTextTrackElement as unknown as HTMLElement);

const addTextTrack = require("../add_text_track").default;
const addTextTrack = jest.requireActual("../add_text_track").default;
const { track, trackElement } = addTextTrack(fakeMediaElement, false);
expect(track).toBe(fakeTextTrack);
expect(track.mode).toBe("showing");
Expand Down
10 changes: 5 additions & 5 deletions src/compat/__tests__/browser_compatibility_types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe("compat - browser compatibility types", () => {
win.WebKitMediaSource = { a: 3 };
win.MSMediaSource = { a: 4 };

const { MediaSource_ } = require("../browser_compatibility_types");
const { MediaSource_ } = jest.requireActual("../browser_compatibility_types");
expect(MediaSource_).toEqual(undefined);

win.MediaSource = origMediaSource;
Expand All @@ -72,7 +72,7 @@ describe("compat - browser compatibility types", () => {
win.WebKitMediaSource = { a: 3 };
win.MSMediaSource = { a: 4 };

const { MediaSource_ } = require("../browser_compatibility_types");
const { MediaSource_ } = jest.requireActual("../browser_compatibility_types");
expect(MediaSource_).toEqual({ a: 1 });

win.MediaSource = origMediaSource;
Expand All @@ -95,7 +95,7 @@ describe("compat - browser compatibility types", () => {
win.WebKitMediaSource = undefined;
win.MSMediaSource = undefined;

const { MediaSource_ } = require("../browser_compatibility_types");
const { MediaSource_ } = jest.requireActual("../browser_compatibility_types");
expect(MediaSource_).toEqual({ a: 2 });

win.MediaSource = origMediaSource;
Expand All @@ -118,7 +118,7 @@ describe("compat - browser compatibility types", () => {
win.WebKitMediaSource = { a: 3 };
win.MSMediaSource = undefined;

const { MediaSource_ } = require("../browser_compatibility_types");
const { MediaSource_ } = jest.requireActual("../browser_compatibility_types");
expect(MediaSource_).toEqual({ a: 3 });

win.MediaSource = origMediaSource;
Expand All @@ -141,7 +141,7 @@ describe("compat - browser compatibility types", () => {
win.WebKitMediaSource = undefined;
win.MSMediaSource = { a: 4 };

const { MediaSource_ } = require("../browser_compatibility_types");
const { MediaSource_ } = jest.requireActual("../browser_compatibility_types");
expect(MediaSource_).toEqual({ a: 4 });

win.MediaSource = origMediaSource;
Expand Down
8 changes: 4 additions & 4 deletions src/compat/__tests__/browser_version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Compat - Browser version", () => {
return { __esModule: true as const,
isFirefox: true };
});
const { getFirefoxVersion } = require("../browser_version");
const { getFirefoxVersion } = jest.requireActual("../browser_version");
nav.userAgent = "Firefox/60.0";
const version = getFirefoxVersion();
expect(version).toBe(60);
Expand All @@ -55,7 +55,7 @@ describe("Compat - Browser version", () => {
return { __esModule: true as const,
isFirefox: true };
});
const { getFirefoxVersion } = require("../browser_version");
const { getFirefoxVersion } = jest.requireActual("../browser_version");
nav.userAgent = "Firefox/80.0";
const version = getFirefoxVersion();
expect(version).toBe(80);
Expand All @@ -66,7 +66,7 @@ describe("Compat - Browser version", () => {
return { __esModule: true as const,
isFirefox: false };
});
const { getFirefoxVersion } = require("../browser_version");
const { getFirefoxVersion } = jest.requireActual("../browser_version");
const version = getFirefoxVersion();
expect(version).toBe(null);
});
Expand All @@ -76,7 +76,7 @@ describe("Compat - Browser version", () => {
return { __esModule: true as const,
isFirefox: true };
});
const { getFirefoxVersion } = require("../browser_version");
const { getFirefoxVersion } = jest.requireActual("../browser_version");
nav.userAgent = "FireFennec/80.0";
const version = getFirefoxVersion();
expect(version).toBe(-1);
Expand Down
4 changes: 2 additions & 2 deletions src/compat/__tests__/can_patch_isobmff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("compat - canPatchISOBMFFSegment", () => {
isIEOrEdge: false,
};
});
const canPatchISOBMFFSegment = require("../can_patch_isobmff");
const canPatchISOBMFFSegment = jest.requireActual("../can_patch_isobmff");
expect(canPatchISOBMFFSegment.default()).toBe(true);
});

Expand All @@ -44,7 +44,7 @@ describe("compat - canPatchISOBMFFSegment", () => {
isIEOrEdge: true,
};
});
const canPatchISOBMFFSegment = require("../can_patch_isobmff");
const canPatchISOBMFFSegment = jest.requireActual("../can_patch_isobmff");
expect(canPatchISOBMFFSegment.default()).toBe(false);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("Compat - canRelyOnVideoVisibilityAndSize", () => {
isFirefox: false };
});
const canRelyOnVideoVisibilityAndSize =
require("../can_rely_on_video_visibility_and_size.ts");
jest.requireActual("../can_rely_on_video_visibility_and_size.ts");
expect(canRelyOnVideoVisibilityAndSize.default()).toBe(true);
});

Expand All @@ -44,7 +44,7 @@ describe("Compat - canRelyOnVideoVisibilityAndSize", () => {
getFirefoxVersion: () => -1 };
});
const canRelyOnVideoVisibilityAndSize =
require("../can_rely_on_video_visibility_and_size.ts");
jest.requireActual("../can_rely_on_video_visibility_and_size.ts");
expect(canRelyOnVideoVisibilityAndSize.default()).toBe(true);
});

Expand All @@ -58,7 +58,7 @@ describe("Compat - canRelyOnVideoVisibilityAndSize", () => {
getFirefoxVersion: () => 60 };
});
const canRelyOnVideoVisibilityAndSize =
require("../can_rely_on_video_visibility_and_size.ts");
jest.requireActual("../can_rely_on_video_visibility_and_size.ts");
expect(canRelyOnVideoVisibilityAndSize.default()).toBe(true);
});

Expand All @@ -72,7 +72,7 @@ describe("Compat - canRelyOnVideoVisibilityAndSize", () => {
getFirefoxVersion: () => 83 };
});
const canRelyOnVideoVisibilityAndSize =
require("../can_rely_on_video_visibility_and_size.ts");
jest.requireActual("../can_rely_on_video_visibility_and_size.ts");
expect(canRelyOnVideoVisibilityAndSize.default()).toBe(false);
});
});
16 changes: 8 additions & 8 deletions src/compat/__tests__/clear_element_src.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Compat - clearElementSrc", () => {
src: "foo",
removeAttribute() { return null; },
};
const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
clearElementSrc(fakeElement);
Expand All @@ -46,7 +46,7 @@ describe("Compat - clearElementSrc", () => {
src: "foo",
removeAttribute() { throw new Error("Oups, can't remove attribute."); },
};
const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;
const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");

expect(() => clearElementSrc(fakeElement))
Expand Down Expand Up @@ -76,7 +76,7 @@ describe("Compat - clearElementSrc", () => {
},
};

const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand Down Expand Up @@ -119,7 +119,7 @@ describe("Compat - clearElementSrc", () => {
__esModule: true as const,
default: { warn: mockLogWarn },
}));
const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand Down Expand Up @@ -156,7 +156,7 @@ describe("Compat - clearElementSrc", () => {
removeChild: () => null,
};

const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand All @@ -182,7 +182,7 @@ describe("Compat - clearElementSrc", () => {
removeChild: () => null,
};

const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand All @@ -208,7 +208,7 @@ describe("Compat - clearElementSrc", () => {
removeChild: () => null,
};

const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand All @@ -234,7 +234,7 @@ describe("Compat - clearElementSrc", () => {
removeChild: () => null,
};

const clearElementSrc = require("../clear_element_src").default;
const clearElementSrc = jest.requireActual("../clear_element_src").default;

const spyRemoveAttribute = jest.spyOn(fakeElement, "removeAttribute");
const spyHasChildNodes = jest.spyOn(fakeElement, "hasChildNodes");
Expand Down
Loading

0 comments on commit d784283

Please sign in to comment.