Skip to content

Commit

Permalink
Merge pull request #3280 from reosarevok/update-deps-2024-05
Browse files Browse the repository at this point in the history
Update deps (2024-05)
  • Loading branch information
reosarevok authored Jun 6, 2024
2 parents e01054c + 1430429 commit 4251c29
Show file tree
Hide file tree
Showing 11 changed files with 1,356 additions and 2,058 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ rules:
simple-import-sort/imports: [warn, {groups: [
# Node.js builtins. You could also generate this regex if you use a `.js` config.
# For example: `^(${require("module").builtinModules.join("|")})(/|$)`
["^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)"],
["^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)"],
# Packages.
["^@?\\w"],
# Side effect imports.
Expand Down
10 changes: 4 additions & 6 deletions flow-typed/npm/po2json_v1.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
declare module 'po2json' {
import type {JedOptions} from 'jed';

declare module.exports: {
parseFileSync: (
fileName: string,
options: {domain: string, format: 'jed'}
) => JedOptions,
};
declare export function parseFileSync(
fileName: string,
options: {domain: string, format: 'jed'}
): JedOptions;
}
76 changes: 37 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,71 +8,70 @@
},
"license": "GPL-2.0-or-later",
"dependencies": {
"@babel/core": "7.24.3",
"@babel/core": "7.24.6",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
"@babel/plugin-proposal-optional-chaining": "7.21.0",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-flow-strip-types": "7.24.1",
"@babel/plugin-transform-react-constant-elements": "7.24.1",
"@babel/plugin-transform-react-inline-elements": "7.24.1",
"@babel/plugin-transform-react-jsx": "7.23.4",
"@babel/plugin-transform-runtime": "7.24.3",
"@babel/preset-env": "7.24.3",
"@babel/preset-flow": "7.24.1",
"@babel/register": "7.23.7",
"@babel/runtime": "7.24.1",
"@floating-ui/react": "0.26.9",
"@babel/plugin-transform-flow-strip-types": "7.24.6",
"@babel/plugin-transform-react-constant-elements": "7.24.6",
"@babel/plugin-transform-react-inline-elements": "7.24.6",
"@babel/plugin-transform-react-jsx": "7.24.6",
"@babel/plugin-transform-runtime": "7.24.6",
"@babel/preset-env": "7.24.6",
"@babel/preset-flow": "7.24.6",
"@babel/register": "7.24.6",
"@babel/runtime": "7.24.6",
"@floating-ui/react": "0.26.16",
"@sentry/browser": "5.10.2",
"@sentry/node": "5.10.2",
"babel-loader": "9.1.3",
"balanced-match": "0.2.0",
"balanced-match": "3.0.1",
"canonical-json": "0.0.4",
"cookie": "0.4.1",
"core-js": "3.6.5",
"cookie": "0.6.0",
"core-js": "3.37.1",
"deep-freeze-strict": "1.1.1",
"detect-node": "2.0.3",
"fast-diff": "1.2.0",
"filesize": "2.0.4",
"detect-node": "2.1.0",
"fast-diff": "1.3.0",
"filesize": "10.1.2",
"generic-diff": "1.0.1",
"he": "1.1.1",
"he": "1.2.0",
"imports-loader": "5.0.0",
"jed": "https://github.com/mwiencek/Jed.git#cd3f71b7479b9c587990a0fa27ae9fdafbd9d9d9",
"jed": "https://github.com/metabrainz/Jed.git#cd3f71b7479b9c587990a0fa27ae9fdafbd9d9d9",
"jquery": "1.11.2",
"knockout": "https://github.com/mwiencek/knockout.git#a09f0778844130a89af438971ad6229ab81e26b3",
"knockout-arraytransforms": "https://github.com/mwiencek/knockout-arraytransforms.git#9673e91a4755b92ba4eea5ca03067790dbbd997b",
"leaflet": "1.6.0",
"leaflet.markercluster": "1.4.1",
"less": "4.1.1",
"leaflet": "1.9.4",
"leaflet.markercluster": "1.5.3",
"less": "4.2.0",
"less-loader": "12.2.0",
"less-plugin-clean-css": "1.5.1",
"leven": "2.0.0",
"leven": "4.0.0",
"mutate-cow": "5.0.0",
"nodemon": "2.0.20",
"pg": "8.3.3",
"pg-cursor": "2.3.3",
"po2json": "https://github.com/mikeedwards/po2json.git#51e2310485bbe35e9e57f2eee238185459ca0eab",
"punycode": "2.1.1",
"querystring": "0.2.0",
"nodemon": "3.1.1",
"pg": "8.11.5",
"pg-cursor": "2.10.5",
"po2json": "https://github.com/metabrainz/po2json.git#905dd32b286c80b973ca3c7c27f31d0ef1f4e65b",
"punycode": "2.3.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-table": "7.8.0",
"redux": "4.2.0",
"shell-quote": "1.7.3",
"shell-quote": "1.8.1",
"shelljs": "0.8.5",
"sliced": "1.0.1",
"sucrase": "3.23.0",
"sucrase": "3.35.0",
"tabbable": "6.2.0",
"tablesorter": "2.31.3",
"terser-webpack-plugin": "5.3.10",
"webpack": "5.91.0",
"webpack-node-externals": "3.0.0",
"weight-balanced-tree": "0.6.1",
"whatwg-fetch": "3.4.0",
"whatwg-fetch": "3.6.20",
"yargs": "3.10.0"
},
"devDependencies": {
"@babel/cli": "7.24.1",
"@babel/cli": "7.24.6",
"babel-plugin-istanbul": "6.1.1",
"babel-plugin-syntax-hermes-parser": "0.20.1",
"buffer": "6.0.3",
Expand All @@ -84,22 +83,21 @@
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"file-url": "2.0.2",
"flow-bin": "0.236.0",
"gettext-parser": "3.1.0",
"gettext-parser": "4.2.0",
"hermes-eslint": "0.20.1",
"http-proxy": "1.18.1",
"json5": "2.1.3",
"json5": "2.2.3",
"nyc": "14.1.1",
"path-browserify": "1.0.1",
"process": "0.11.10",
"react-is": "18.2.0",
"selenium-webdriver": "4.0.0-alpha.5",
"react-is": "18.3.1",
"selenium-webdriver": "4.21.0",
"stream-browserify": "3.0.0",
"tap-difflet": "0.7.2",
"tap-junit": "3.1.0",
"tape": "4.7.0",
"utf8": "2.1.2",
"utf8": "3.0.0",
"xgettext-js": "https://github.com/metabrainz/xgettext-js#3087b3b77c62db622bcf2244697acebb4170a836"
},
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions root/server/gettext/poFile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import fs from 'fs';
import path from 'path';

import type {JedOptions} from 'jed';
import po2json from 'po2json';
import {parseFileSync} from 'po2json';

import MB_SERVER_ROOT from '../../utility/serverRootDir.mjs';

Expand Down Expand Up @@ -43,7 +43,7 @@ export function find(domain: string, locale: string): string {
}

export function loadFromPath(fpath: string, domain: string): JedOptions {
return po2json.parseFileSync(fpath, {domain, format: 'jed'});
return parseFileSync(fpath, {domain, format: 'jed'});
}

export function load(
Expand Down
2 changes: 1 addition & 1 deletion root/static/scripts/edit/MB/Art.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import * as Sentry from '@sentry/browser';
import filesize from 'filesize';
import {filesize} from 'filesize';
import $ from 'jquery';
import ko from 'knockout';

Expand Down
16 changes: 0 additions & 16 deletions root/static/scripts/voting.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import querystring from 'querystring';

import $ from 'jquery';

import './common/MB/Control/EditList.js';
Expand All @@ -18,17 +16,3 @@ import MB from './common/MB.js';
$('.edit-list').each(function () {
MB.Control.EditSummary(this);
});

$('#only-open-edits').on('change', function () {
const search = window.location.search.replace(/^\?/, '');
const args = querystring.parse(search);

if (this.checked) {
args.open = 1;
} else {
delete args.open;
}

this.disabled = true;
window.location.search = '?' + querystring.stringify(args);
});
21 changes: 11 additions & 10 deletions script/xgettext.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ require('@babel/register')({
root: rootPath,
});

const gettextParser = require('gettext-parser');
const XGettext = require('xgettext-js');
const argv = require('yargs').argv;

Expand Down Expand Up @@ -249,12 +248,14 @@ for (currentFile of argv._) {
}
}

console.log(
gettextParser.po
.compile(potFile, {
sort: function (a, b) {
return msgOrdering.get(a) - msgOrdering.get(b);
},
})
.toString('utf-8'),
);
import('gettext-parser').then(({default: gettextParser}) => {
console.log(
gettextParser.po
.compile(potFile, {
sort: function (a, b) {
return msgOrdering.get(a) - msgOrdering.get(b);
},
})
.toString('utf-8'),
);
});
2 changes: 1 addition & 1 deletion t/selenium.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const driver = (x => {
x.setProxy(webdriverProxy.manual({http: 'localhost:5051'}));

if (argv.headless) {
options.headless();
options.addArguments('--headless=new');
}

return x.build();
Expand Down
5 changes: 3 additions & 2 deletions t/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
const path = require('path');

const CDP = require('chrome-remote-interface');
const fileUrl = require('file-url');
const utf8 = require('utf8');

CDP((client) => {
Expand Down Expand Up @@ -62,8 +61,10 @@ CDP((client) => {
exit(1);
});

const url = require('url');

return Page.navigate({
url: fileUrl(
url: url.pathToFileURL(
path.resolve(__dirname, '../root/static/scripts/tests/web.html'),
),
});
Expand Down
4 changes: 2 additions & 2 deletions webpack/server.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ export default {
* See NormalModuleReplacementPlugin below.
*
* mutate-cow is allowed because it's published as an ES module, which
* must be converted to CommonJS.
* must be converted to CommonJS. Same for po2json.
*
* weight-balanced-tree is allowed because it needs to be transpiled to
* remove Flow and ESM syntax; this is also fine because it's free of
* side-effects.
*/
allowlist: [/(jquery|mutate-cow|weight-balanced-tree)/],
allowlist: [/(jquery|mutate-cow|po2json|weight-balanced-tree)/],
modulesFromFile: true,
}),
],
Expand Down
Loading

0 comments on commit 4251c29

Please sign in to comment.