mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 08:56:10 +00:00
dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
55293f57a8
commit
be18d71624
@@ -16,8 +16,7 @@ import tseslint from "typescript-eslint";
|
|||||||
|
|
||||||
const compat = new FlatCompat({baseDirectory: import.meta.dirname});
|
const compat = new FlatCompat({baseDirectory: import.meta.dirname});
|
||||||
|
|
||||||
/** @type {import("eslint").Linter.Config[]} */
|
export default defineConfig(
|
||||||
export const config = defineConfig(
|
|
||||||
{
|
{
|
||||||
// This is intended for generated files and vendored third-party files.
|
// This is intended for generated files and vendored third-party files.
|
||||||
// For our source code, instead of adding files here, consider using
|
// For our source code, instead of adding files here, consider using
|
||||||
@@ -340,4 +339,3 @@ export const config = defineConfig(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
export default config;
|
|
||||||
|
|||||||
21
package.json
21
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34",
|
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.5.5",
|
"@babel/core": "^7.5.5",
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
"clipboard": "^2.0.4",
|
"clipboard": "^2.0.4",
|
||||||
"colord": "^2.9.3",
|
"colord": "^2.9.3",
|
||||||
"compression-webpack-plugin": "^11.1.0",
|
"compression-webpack-plugin": "^11.1.0",
|
||||||
"core-js": "^3.45.0",
|
"core-js": "^3.46.0",
|
||||||
"css-loader": "^7.1.1",
|
"css-loader": "^7.1.1",
|
||||||
"css-minimizer-webpack-plugin": "^7.0.0",
|
"css-minimizer-webpack-plugin": "^7.0.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
"@types/lodash": "^4.14.172",
|
"@types/lodash": "^4.14.172",
|
||||||
"@types/micromodal": "^0.3.3",
|
"@types/micromodal": "^0.3.3",
|
||||||
"@types/minimalistic-assert": "^1.0.1",
|
"@types/minimalistic-assert": "^1.0.1",
|
||||||
"@types/node": "^22.9.0",
|
"@types/node": "^24.9.2",
|
||||||
"@types/plotly.js": "^3.0.0",
|
"@types/plotly.js": "^3.0.0",
|
||||||
"@types/sortablejs": "^1.15.1",
|
"@types/sortablejs": "^1.15.1",
|
||||||
"@types/textarea-caret": "^3.0.3",
|
"@types/textarea-caret": "^3.0.3",
|
||||||
@@ -129,8 +129,8 @@
|
|||||||
"astro-eslint-parser": "^1.2.2",
|
"astro-eslint-parser": "^1.2.2",
|
||||||
"babel-plugin-istanbul": "^7.0.0",
|
"babel-plugin-istanbul": "^7.0.0",
|
||||||
"callsites": "^4.2.0",
|
"callsites": "^4.2.0",
|
||||||
"cldr-annotations-derived-full": "^47.0.0",
|
"cldr-annotations-derived-full": "^48.0.0",
|
||||||
"cldr-annotations-full": "^47.0.0",
|
"cldr-annotations-full": "^48.0.0",
|
||||||
"confusing-browser-globals": "^1.0.11",
|
"confusing-browser-globals": "^1.0.11",
|
||||||
"css.escape": "^1.5.1",
|
"css.escape": "^1.5.1",
|
||||||
"diff": "^8.0.2",
|
"diff": "^8.0.2",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
"eslint-plugin-import": "^2.22.0",
|
"eslint-plugin-import": "^2.22.0",
|
||||||
"eslint-plugin-mdx": "^3.6.2",
|
"eslint-plugin-mdx": "^3.6.2",
|
||||||
"eslint-plugin-no-jquery": "^3.0.2",
|
"eslint-plugin-no-jquery": "^3.0.2",
|
||||||
"eslint-plugin-unicorn": "^61.0.2",
|
"eslint-plugin-unicorn": "^62.0.0",
|
||||||
"globals": "^16.0.0",
|
"globals": "^16.0.0",
|
||||||
"jsdom": "^27.0.0",
|
"jsdom": "^27.0.0",
|
||||||
"mockdate": "^3.0.2",
|
"mockdate": "^3.0.2",
|
||||||
@@ -172,17 +172,18 @@
|
|||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"@types/eslint": "-",
|
"@types/eslint": "npm:eslint@^9.10.0",
|
||||||
"source-map@^0.6": "npm:source-map-js@^1.2.1"
|
"source-map@^0.6": "npm:source-map-js@^1.2.1"
|
||||||
},
|
},
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
|
"@uppy/utils": "patches/@uppy__utils.patch",
|
||||||
|
"eslint-plugin-astro": "patches/eslint-plugin-astro.patch",
|
||||||
"handlebars": "patches/handlebars.patch",
|
"handlebars": "patches/handlebars.patch",
|
||||||
"simplebar": "patches/simplebar.patch",
|
"simplebar": "patches/simplebar.patch",
|
||||||
"source-sans@3.46.0": "patches/source-sans@3.46.0.patch",
|
|
||||||
"stylelint-high-performance-animation": "patches/stylelint-high-performance-animation.patch",
|
"stylelint-high-performance-animation": "patches/stylelint-high-performance-animation.patch",
|
||||||
"svgicons2svgfont": "patches/svgicons2svgfont.patch",
|
"svgicons2svgfont": "patches/svgicons2svgfont.patch",
|
||||||
"tippy.js@6.3.7": "patches/tippy.js@6.3.7.patch",
|
"textarea-caret@3.1.0": "patches/textarea-caret@3.1.0.patch",
|
||||||
"textarea-caret@3.1.0": "patches/textarea-caret@3.1.0.patch"
|
"tippy.js@6.3.7": "patches/tippy.js@6.3.7.patch"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
|
|||||||
25
patches/@uppy__utils.patch
Normal file
25
patches/@uppy__utils.patch
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/lib/generateFileID.d.ts b/lib/generateFileID.d.ts
|
||||||
|
index c699b2453ff6d019b03509d65d66f8ffcb2c1be6..b83c4ffa9b7e7c2755416e8b7631d8971e9952d5 100644
|
||||||
|
--- a/lib/generateFileID.d.ts
|
||||||
|
+++ b/lib/generateFileID.d.ts
|
||||||
|
@@ -11,6 +11,6 @@ export default function generateFileID<M extends Meta, B extends Body>(file: Par
|
||||||
|
export declare function getSafeFileId<M extends Meta, B extends Body>(file: Partial<Pick<UppyFile<M, B>, 'id' | 'type'>> & Pick<UppyFile<M, B>, 'data'> & (Pick<RemoteUppyFile<M, B>, 'isRemote' | 'remote'> | Pick<LocalUppyFile<M, B>, 'isRemote'>) & {
|
||||||
|
meta?: {
|
||||||
|
relativePath?: unknown;
|
||||||
|
- };
|
||||||
|
+ } | undefined;
|
||||||
|
}, instanceId: string): string;
|
||||||
|
//# sourceMappingURL=generateFileID.d.ts.map
|
||||||
|
diff --git a/src/generateFileID.ts b/src/generateFileID.ts
|
||||||
|
index 53124860637e5b56dee7e5663a595c2e18d12410..7f6fcc4d8b1356ad26c03509d12186fa4363c31f 100644
|
||||||
|
--- a/src/generateFileID.ts
|
||||||
|
+++ b/src/generateFileID.ts
|
||||||
|
@@ -83,7 +83,7 @@ export function getSafeFileId<M extends Meta, B extends Body>(
|
||||||
|
(
|
||||||
|
| Pick<RemoteUppyFile<M, B>, 'isRemote' | 'remote'>
|
||||||
|
| Pick<LocalUppyFile<M, B>, 'isRemote'>
|
||||||
|
- ) & { meta?: { relativePath?: unknown } },
|
||||||
|
+ ) & { meta?: { relativePath?: unknown } | undefined },
|
||||||
|
instanceId: string,
|
||||||
|
): string {
|
||||||
|
if (hasFileStableId(file)) return file.id!
|
||||||
10
patches/eslint-plugin-astro.patch
Normal file
10
patches/eslint-plugin-astro.patch
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
diff --git a/lib/index.d.mts b/lib/index.d.mts
|
||||||
|
index a9989abbc716669b86a7f5e5e020869718eff9f0..9d3a5cb15bdd72eb610ed73411435c53831d16fa 100644
|
||||||
|
--- a/lib/index.d.mts
|
||||||
|
+++ b/lib/index.d.mts
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-import * as node_modules__eslint_core_dist_cjs_types_d_cts from 'node_modules/@eslint/core/dist/cjs/types.d.cts';
|
||||||
|
+import * as node_modules__eslint_core_dist_cjs_types_d_cts from '@eslint/core';
|
||||||
|
import * as eslint from 'eslint';
|
||||||
|
|
||||||
|
declare const configs: {
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
diff --git a/source-sans-3VF.css b/source-sans-3VF.css
|
|
||||||
index 99213736a3fdb72eb4e3fbdd9dc342883bf2ec13..a6821c48738a673b098d99372e023604b1bad056 100755
|
|
||||||
--- a/source-sans-3VF.css
|
|
||||||
+++ b/source-sans-3VF.css
|
|
||||||
@@ -3,9 +3,9 @@
|
|
||||||
font-weight: 200 900;
|
|
||||||
font-style: normal;
|
|
||||||
font-stretch: normal;
|
|
||||||
- src: url('WOFF2/VAR/SourceSans3VF-Roman.ttf.woff2') format('woff2'),
|
|
||||||
- url('WOFF/VAR/SourceSans3VF-Roman.ttf.woff') format('woff'),
|
|
||||||
- url('VAR/SourceSans3VF-Roman.ttf') format('truetype');
|
|
||||||
+ src: url('WOFF2/VAR/SourceSans3VF-Roman.ttf.woff2') format('woff2-variations'),
|
|
||||||
+ url('WOFF/VAR/SourceSans3VF-Roman.ttf.woff') format('woff-variations'),
|
|
||||||
+ url('VAR/SourceSans3VF-Roman.ttf') format('truetype-variations');
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face{
|
|
||||||
@@ -13,7 +13,7 @@
|
|
||||||
font-weight: 200 900;
|
|
||||||
font-style: italic;
|
|
||||||
font-stretch: normal;
|
|
||||||
- src: url('WOFF2/VAR/SourceSans3VF-Italic.ttf.woff2') format('woff2'),
|
|
||||||
- url('WOFF/VAR/SourceSans3VF-Italic.ttf.woff') format('woff'),
|
|
||||||
- url('VAR/SourceSans3VF-Italic.ttf') format('truetype');
|
|
||||||
+ src: url('WOFF2/VAR/SourceSans3VF-Italic.ttf.woff2') format('woff2-variations'),
|
|
||||||
+ url('WOFF/VAR/SourceSans3VF-Italic.ttf.woff') format('woff-variations'),
|
|
||||||
+ url('VAR/SourceSans3VF-Italic.ttf') format('truetype-variations');
|
|
||||||
}
|
|
||||||
3193
pnpm-lock.yaml
generated
3193
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@ import path from "node:path";
|
|||||||
import {parseArgs} from "node:util";
|
import {parseArgs} from "node:util";
|
||||||
|
|
||||||
import "css.escape";
|
import "css.escape";
|
||||||
import puppeteer from "puppeteer";
|
import * as puppeteer from "puppeteer";
|
||||||
import * as z from "zod/mini";
|
import * as z from "zod/mini";
|
||||||
|
|
||||||
const usage = "Usage: message-screenshot.ts <message_id> <image_path> <realm_url>";
|
const usage = "Usage: message-screenshot.ts <message_id> <image_path> <realm_url>";
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import path from "node:path";
|
|||||||
import {parseArgs} from "node:util";
|
import {parseArgs} from "node:util";
|
||||||
|
|
||||||
import "css.escape";
|
import "css.escape";
|
||||||
import puppeteer from "puppeteer";
|
import * as puppeteer from "puppeteer";
|
||||||
import * as z from "zod/mini";
|
import * as z from "zod/mini";
|
||||||
|
|
||||||
const usage =
|
const usage =
|
||||||
|
|||||||
@@ -50,4 +50,4 @@ API_FEATURE_LEVEL = 427
|
|||||||
# historical commits sharing the same major version, in which case a
|
# historical commits sharing the same major version, in which case a
|
||||||
# minor version bump suffices.
|
# minor version bump suffices.
|
||||||
|
|
||||||
PROVISION_VERSION = (355, 1) # bumped 2025-10-28 to upgrade Node.js
|
PROVISION_VERSION = (356, 0) # bumped 2025-10-31 to upgrade JavaScript dependencies
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const formatJsOptions = {
|
|||||||
|
|
||||||
/** @type {import("@babel/preset-env").Options} */
|
/** @type {import("@babel/preset-env").Options} */
|
||||||
const presetEnvOptions = {
|
const presetEnvOptions = {
|
||||||
corejs: "3.45",
|
corejs: "3.46",
|
||||||
shippedProposals: true,
|
shippedProposals: true,
|
||||||
useBuiltIns: "usage",
|
useBuiltIns: "usage",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as url from "node:url";
|
|||||||
import "css.escape";
|
import "css.escape";
|
||||||
import ErrorStackParser from "error-stack-parser";
|
import ErrorStackParser from "error-stack-parser";
|
||||||
import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer";
|
import type {Browser, ConsoleMessage, ConsoleMessageLocation, ElementHandle, Page} from "puppeteer";
|
||||||
import puppeteer from "puppeteer";
|
import * as puppeteer from "puppeteer";
|
||||||
import StackFrame from "stackframe";
|
import StackFrame from "stackframe";
|
||||||
import StackTraceGPS from "stacktrace-gps";
|
import StackTraceGPS from "stacktrace-gps";
|
||||||
import * as z from "zod/mini";
|
import * as z from "zod/mini";
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ $(() => {
|
|||||||
uppy.on("upload-success", (file, _response) => {
|
uppy.on("upload-success", (file, _response) => {
|
||||||
assert(file !== undefined);
|
assert(file !== undefined);
|
||||||
$("#slack-import-start-upload-wrapper").removeClass("hidden");
|
$("#slack-import-start-upload-wrapper").removeClass("hidden");
|
||||||
$("#slack-import-uploaded-file-name").text(file.name!);
|
$("#slack-import-uploaded-file-name").text(file.name);
|
||||||
$("#slack-import-file-upload-error").text("");
|
$("#slack-import-file-upload-error").text("");
|
||||||
$("#realm-creation-form-slack-import .register-button").prop("disabled", false);
|
$("#realm-creation-form-slack-import .register-button").prop("disabled", false);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type {Meta} from "@uppy/core";
|
import type {Meta, UppyFile} from "@uppy/core";
|
||||||
import {Uppy} from "@uppy/core";
|
import {Uppy} from "@uppy/core";
|
||||||
import Tus, {type TusBody} from "@uppy/tus";
|
import Tus, {type TusBody} from "@uppy/tus";
|
||||||
import {getSafeFileId} from "@uppy/utils";
|
import {getSafeFileId} from "@uppy/utils";
|
||||||
@@ -351,6 +351,12 @@ const zulip_upload_response_schema = z.object({
|
|||||||
filename: z.string(),
|
filename: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Wrapped to work around https://github.com/transloadit/uppy/issues/6033
|
||||||
|
const get_safe_file_id: <M extends Meta>(
|
||||||
|
file: UppyFile<M, TusBody>,
|
||||||
|
instance_id: string,
|
||||||
|
) => string = getSafeFileId;
|
||||||
|
|
||||||
export function setup_upload(config: Config): Uppy<ZulipMeta, TusBody> {
|
export function setup_upload(config: Config): Uppy<ZulipMeta, TusBody> {
|
||||||
const uppy = new Uppy<ZulipMeta, TusBody>({
|
const uppy = new Uppy<ZulipMeta, TusBody>({
|
||||||
debug: false,
|
debug: false,
|
||||||
@@ -372,7 +378,7 @@ export function setup_upload(config: Config): Uppy<ZulipMeta, TusBody> {
|
|||||||
pluralize: (_n) => 0,
|
pluralize: (_n) => 0,
|
||||||
},
|
},
|
||||||
onBeforeFileAdded(file, files) {
|
onBeforeFileAdded(file, files) {
|
||||||
const file_id = getSafeFileId(file, uppy.getID());
|
const file_id = get_safe_file_id(file, uppy.getID());
|
||||||
|
|
||||||
if (files[file_id]) {
|
if (files[file_id]) {
|
||||||
// We have a duplicate file upload on our hands.
|
// We have a duplicate file upload on our hands.
|
||||||
@@ -532,7 +538,7 @@ export function setup_upload(config: Config): Uppy<ZulipMeta, TusBody> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const filtered_filename = file.name!.replaceAll("[", "").replaceAll("]", "");
|
const filtered_filename = file.name.replaceAll("[", "").replaceAll("]", "");
|
||||||
const syntax_to_insert = "[" + filtered_filename + "](" + file.meta.zulip_url + ")";
|
const syntax_to_insert = "[" + filtered_filename + "](" + file.meta.zulip_url + ")";
|
||||||
const $text_area = config.textarea();
|
const $text_area = config.textarea();
|
||||||
const replacement_successful = compose_ui.replace_syntax(
|
const replacement_successful = compose_ui.replace_syntax(
|
||||||
@@ -601,13 +607,13 @@ export function setup_upload(config: Config): Uppy<ZulipMeta, TusBody> {
|
|||||||
// Hide the upload status banner on error so only the error banner shows
|
// Hide the upload status banner on error so only the error banner shows
|
||||||
hide_upload_banner(uppy, config, file.id);
|
hide_upload_banner(uppy, config, file.id);
|
||||||
show_error_message(config, message, file.id);
|
show_error_message(config, message, file.id);
|
||||||
compose_ui.replace_syntax(get_translated_status(file.name!), "", config.textarea());
|
compose_ui.replace_syntax(get_translated_status(file.name), "", config.textarea());
|
||||||
compose_ui.autosize_textarea(config.textarea());
|
compose_ui.autosize_textarea(config.textarea());
|
||||||
});
|
});
|
||||||
|
|
||||||
uppy.on("restriction-failed", (file) => {
|
uppy.on("restriction-failed", (file) => {
|
||||||
assert(file !== undefined);
|
assert(file !== undefined);
|
||||||
compose_ui.replace_syntax(get_translated_status(file.name!), "", config.textarea());
|
compose_ui.replace_syntax(get_translated_status(file.name), "", config.textarea());
|
||||||
compose_ui.autosize_textarea(config.textarea());
|
compose_ui.autosize_textarea(config.textarea());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user