Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Dec 8, 2024
1 parent e1ae482 commit d2c8f18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const ignores = [
"polyfills/__dist/**",
"tasks/**/node_modules",
"test/coverage/**",
"ua-parser/**/*",

// We ignore the polyfill.js files for third-party polyfills
// because we do not control their implementation.
Expand Down Expand Up @@ -90,10 +89,9 @@ export default [
},
{
files: [
"polyfills/**/update.task.js",
"tasks/**/*",
"test/**/*",
"ua-parser/**/*",
"polyfills/**/update.task.js",
],
ignores: [
"tasks/polyfill-templates/polyfill.js",
Expand Down
2 changes: 1 addition & 1 deletion test/polyfills/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const promisify = require("node:util").promisify;
const readFile = promisify(fs.readFile);
const path = require("node:path");
const handlebars = require("handlebars");
const ua_parser = require('../../ua-parser/ua-parser');
const ua_parser = require('./ua-parser');

process.title = "polyfill-library-test-server";

Expand Down
4 changes: 2 additions & 2 deletions ua-parser/ua-parser.js → test/polyfills/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const uap = require('ua-parser-js');

/**
* @param {string} ua
* @returns {import('../lib/index').UaParser}
* @returns {import('../../lib/index').UaParser}
*/
function ua_parser(ua) {
const p = uap(ua);
Expand Down Expand Up @@ -33,7 +33,7 @@ function ua_parser(ua) {
case "Chromium":
return "chrome"
case "Edge":
if (semver.satisfies(p.browser.version, '>= 79')) return 'chrome';
if (semver.satisfies(semver.coerce(p.browser.version), '>= 79')) return 'chrome';

return "edge";
case "Firefox":
Expand Down

0 comments on commit d2c8f18

Please sign in to comment.