Skip to content

Commit

Permalink
chore: Mettre à jour les dépendances.
Browse files Browse the repository at this point in the history
  • Loading branch information
regseb committed Sep 18, 2021
1 parent c9aec32 commit bd44fd0
Show file tree
Hide file tree
Showing 20 changed files with 1,525 additions and 1,663 deletions.
17 changes: 13 additions & 4 deletions .metalint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,12 @@ export default {
"jsdoc/require-file-overview": 0,
"jsdoc/require-hyphen-before-param-description": [2, "never"],
"jsdoc/require-jsdoc": 2,
"jsdoc/require-param": 2,
"jsdoc/require-param": [2, {
checkRestProperty: true,
checkGetters: true,
checkSetters: true,
checkDestructuredRoots: true,
}],
"jsdoc/require-param-description": 2,
"jsdoc/require-param-name": 2,
"jsdoc/require-param-type": 2,
Expand Down Expand Up @@ -481,6 +486,7 @@ export default {
"regexp/no-empty-group": 2,
"regexp/no-empty-lookarounds-assertion": 2,
"regexp/no-escape-backspace": 2,
"regexp/no-invalid-regexp": 2,
"regexp/no-lazy-ends": 2,
"regexp/no-optional-assertion": 2,
"regexp/no-potentially-useless-backreference": 2,
Expand All @@ -505,7 +511,6 @@ export default {
"regexp/no-trivially-nested-quantifier": 2,
"regexp/no-unused-capturing-group": 2,
"regexp/no-useless-character-class": 2,
"regexp/no-useless-exactly-quantifier": 2,
"regexp/no-useless-flag": 2,
"regexp/no-useless-lazy": 2,
"regexp/no-useless-quantifier": 2,
Expand All @@ -523,7 +528,10 @@ export default {
"regexp/sort-alternatives": 2,

"regexp/hexadecimal-escape": 0,
"regexp/letter-case": [2, { unicodeEscape: "uppercase" }],
"regexp/letter-case": [2, {
unicodeEscape: "uppercase",
hexadecimalEscape: "uppercase",
}],
"regexp/match-any": 2,
"regexp/no-useless-escape": 2,
"regexp/no-useless-non-capturing-group": 2,
Expand All @@ -533,7 +541,6 @@ export default {
"regexp/prefer-plus-quantifier": 2,
"regexp/prefer-question-quantifier": 2,
"regexp/prefer-star-quantifier": 2,
"regexp/prefer-t": 2,
"regexp/prefer-unicode-codepoint-escapes": 2,
"regexp/prefer-w": 2,
"regexp/sort-character-class-elements": 2,
Expand Down Expand Up @@ -565,6 +572,7 @@ export default {
"unicorn/no-for-loop": 2,
"unicorn/no-hex-escape": 2,
"unicorn/no-instanceof-array": 2,
"unicorn/no-invalid-remove-event-listener": 2,
"unicorn/no-keyword-prefix": 2,
"unicorn/no-lonely-if": 2,
"unicorn/no-nested-ternary": 0,
Expand All @@ -581,6 +589,7 @@ export default {
// https://github.com/davisjam/safe-regex/issues/10
"unicorn/no-unsafe-regex": 0,
"unicorn/no-unused-properties": 2,
"unicorn/no-useless-fallback-in-spread": 2,
"unicorn/no-useless-length-check": 2,
"unicorn/no-useless-spread": 2,
"unicorn/no-useless-undefined": 0,
Expand Down
2,963 changes: 1,388 additions & 1,575 deletions package-lock.json

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,44 +40,43 @@
"dialog-polyfill": "0.5.6"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/eslint-parser": "^7.15.0",
"@babel/core": "^7.15.5",
"@babel/eslint-parser": "^7.15.4",
"@babel/eslint-plugin": "^7.14.5",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@types/firefox-webext-browser": "^82.0.1",
"@types/jsdom": "^16.2.13",
"@types/mocha": "^9.0.0",
"@types/node-fetch": "^2.5.12",
"@types/sinon": "^10.0.2",
"addons-linter": "^3.12.0",
"c8": "^7.8.0",
"addons-linter": "^3.15.0",
"c8": "^7.9.0",
"david": "^12.0.0",
"eslint": "^7.32.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.24.0",
"eslint-plugin-jsdoc": "^36.0.7",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jsdoc": "^36.1.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-regexp": "^0.13.2",
"eslint-plugin-unicorn": "^35.0.0",
"htmlhint": "^0.15.1",
"jsdom": "^16.7.0",
"eslint-plugin-regexp": "^1.1.0",
"eslint-plugin-unicorn": "^36.0.0",
"htmlhint": "^0.15.2",
"jsdom": "^17.0.0",
"jsonlint-mod": "^1.7.6",
"markdownlint": "^0.23.1",
"markdownlint": "^0.24.0",
"metalint": "^0.9.0",
"mocha": "^9.0.3",
"mocha": "^9.1.1",
"mock-socket": "^9.0.3",
"node-fetch": "^2.6.1",
"node-fetch": "^3.0.0",
"purgecss": "^4.0.3",
"sinon": "^11.1.2",
"standard-version": "^9.3.1",
"stylelint": "^13.13.1",
"stylelint-order": "^4.1.0",
"typedoc": "^0.21.5",
"typescript": "^4.3.5",
"web-ext": "^6.2.0",
"typedoc": "^0.22.3",
"typescript": "^4.4.3",
"web-ext": "^6.4.0",
"yaml-lint": "^1.2.4"
},
"engines": {
Expand Down
3 changes: 0 additions & 3 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ export const mux = function (urls) {
});
};

// Désactiver cette règle car il y a des faux-positifs avec les fonctions
// asynchrones. https://github.com/gajus/eslint-plugin-jsdoc/issues/722
// eslint-disable-next-line jsdoc/require-throws
/**
* Diffuse un média sur Kodi.
*
Expand Down
3 changes: 0 additions & 3 deletions src/core/jsonrpc/kodi.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ export const Kodi = class {
}
}

// Désactiver cette règle car il y a des faux-positifs avec les fonctions
// asynchrones. https://github.com/gajus/eslint-plugin-jsdoc/issues/722
// eslint-disable-next-line jsdoc/require-throws
/**
* Envoi une requête JSON-RPC à Kodi.
*
Expand Down
4 changes: 2 additions & 2 deletions src/core/labeller/dumpert.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* @param {URL} videoUrl L'URL de la vidéo Dumpert.
* @returns {Promise<string>} Une promesse contenant le titre.
*/
export const extract = async function ({ href }) {
const response = await fetch(href);
export const extract = async function (videoUrl) {
const response = await fetch(videoUrl);
const text = await response.text();
const doc = new DOMParser().parseFromString(text, "text/html");
return doc.querySelector(`meta[property="og:title"]`).content;
Expand Down
4 changes: 2 additions & 2 deletions src/core/labeller/soundcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* @returns {Promise<?string>} Une promesse contenant le titre ou
* <code>null</code>.
*/
export const extract = async function ({ href }) {
const response = await fetch(href);
export const extract = async function (audioUrl) {
const response = await fetch(audioUrl);
const text = await response.text();
const doc = new DOMParser().parseFromString(text, "text/html");
const meta = doc.querySelector(`meta[property="og:title"]`);
Expand Down
2 changes: 1 addition & 1 deletion src/core/scrapers.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const extract = async function (url, options) {
html: cacheable(async () => {
try {
const controller = new AbortController();
const response = await fetch(url.href, {
const response = await fetch(url, {
signal: controller.signal,
});
const contentType = response.headers.get("Content-Type");
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"applications": {
"gecko": {
"id": "castkodi@regseb.github.io",
"strict_min_version": "89.0"
"strict_min_version": "92.0"
}
},
"manifest_version": 2,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/matchpattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const compile = function (pattern) {
"iu");
}

const RE = /^(\*|[^:]+):\/\/(\*|(?:\*\.)?[^*/]+)?\/(.*)$/u;
const RE = /^([^:]+):\/\/(\*|(?:\*\.)?[^*/]+)?\/(.*)$/u;
const [, scheme, host, path] = RE.exec(pattern);
return new RegExp("^" +
("*" === scheme ? "https?"
Expand Down
1 change: 1 addition & 0 deletions test/unit/core/jsonrpc/kodi.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ describe("core/jsonrpc/kodi.js", function () {
}));

assert.strictEqual(stubApplication.callCount, 1);
assert.strictEqual(stubApplication.firstCall.args.length, 1);
assert.strictEqual(stubApplication.firstCall.args[0].type,
"notification");
assert.strictEqual(stubApplication.firstCall.args[0].method, "Qux");
Expand Down
4 changes: 3 additions & 1 deletion test/unit/core/labeller/dumpert.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ describe("core/labeller/dumpert.js", function () {
assert.strictEqual(label, "bar");

assert.strictEqual(stub.callCount, 1);
assert.deepStrictEqual(stub.firstCall.args, ["http://foo.com/"]);
assert.deepStrictEqual(stub.firstCall.args, [
new URL("http://foo.com/"),
]);

stub.restore();
});
Expand Down
8 changes: 6 additions & 2 deletions test/unit/core/labeller/soundcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ describe("core/labeller/soundcloud.js", function () {
assert.strictEqual(label, "bar");

assert.strictEqual(stub.callCount, 1);
assert.deepStrictEqual(stub.firstCall.args, ["http://foo.com/"]);
assert.deepStrictEqual(stub.firstCall.args, [
new URL("http://foo.com/"),
]);

stub.restore();
});
Expand All @@ -37,7 +39,9 @@ describe("core/labeller/soundcloud.js", function () {
assert.strictEqual(label, null);

assert.strictEqual(stub.callCount, 1);
assert.deepStrictEqual(stub.firstCall.args, ["http://foo.com/"]);
assert.deepStrictEqual(stub.firstCall.args, [
new URL("http://foo.com/"),
]);

stub.restore();
});
Expand Down
Loading

0 comments on commit bd44fd0

Please sign in to comment.