mirror of https://github.com/zulip/zulip.git
dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
f5e2afd693
commit
3a535cacdc
|
@ -12,9 +12,9 @@
|
|||
"@giphy/js-fetch-api": "^5.6.0",
|
||||
"@koa/bodyparser": "^5.0.0",
|
||||
"@sentry/browser": "^7.51.2",
|
||||
"@uppy/core": "^3.0.2",
|
||||
"@uppy/progress-bar": "^3.0.1",
|
||||
"@uppy/xhr-upload": "^3.0.2",
|
||||
"@uppy/core": "^4.0.1",
|
||||
"@uppy/progress-bar": "^4.0.0",
|
||||
"@uppy/xhr-upload": "^4.0.1",
|
||||
"@zxcvbn-ts/core": "^3.0.1",
|
||||
"@zxcvbn-ts/language-common": "^3.0.2",
|
||||
"@zxcvbn-ts/language-en": "^3.0.1",
|
||||
|
@ -113,7 +113,7 @@
|
|||
"@types/turndown": "^5.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||
"@typescript-eslint/parser": "^7.0.2",
|
||||
"babel-plugin-istanbul": "^6.1.1",
|
||||
"babel-plugin-istanbul": "^7.0.0",
|
||||
"babel-plugin-rewire-ts": "^1.4.0",
|
||||
"callsites": "^3.1.0",
|
||||
"cldr-annotations-derived-modern": "^45.0.0",
|
||||
|
@ -159,7 +159,6 @@
|
|||
"source-map@^0.6": "npm:source-map-js@1.0.1"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"@uppy/core@3.13.0": "patches/@uppy__core@3.10.1.patch",
|
||||
"source-sans@3.46.0": "patches/source-sans@3.46.0.patch",
|
||||
"tippy.js@6.3.7": "patches/tippy.js@6.3.7.patch"
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
diff --git a/types/index.d.ts b/types/index.d.ts
|
||||
index d23ea1113366ad1d5a3300268ab8c49440dfd0be..0eea14653663ab70c4c62194d4715e0034c888b5 100644
|
||||
--- a/types/index.d.ts
|
||||
+++ b/types/index.d.ts
|
||||
@@ -1,6 +1,3 @@
|
||||
-// This references the old types on purpose, to make sure to not create breaking changes for TS consumers.
|
||||
-// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
||||
-/// <reference path="../../utils/types/index.d.ts"/>
|
||||
import * as UppyUtils from '@uppy/utils'
|
||||
|
||||
// Utility types
|
3064
pnpm-lock.yaml
3064
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -50,4 +50,4 @@ API_FEATURE_LEVEL = 273 # Last bumped for server_thumbnail_formats
|
|||
# historical commits sharing the same major version, in which case a
|
||||
# minor version bump suffices.
|
||||
|
||||
PROVISION_VERSION = (285, 1) # bumped 2024-07-12 for adding textarea-caret
|
||||
PROVISION_VERSION = (286, 0) # bumped 2024-07-16 for upgrading JavaScript dependencies
|
||||
|
|
|
@ -488,7 +488,7 @@ export class Typeahead<ItemType extends string | object> {
|
|||
this.query =
|
||||
this.input_element.type === "contenteditable"
|
||||
? this.input_element.$element.text()
|
||||
: this.input_element.$element.val() ?? "";
|
||||
: (this.input_element.$element.val() ?? "");
|
||||
|
||||
if (
|
||||
(!this.helpOnEmptyStrings || hideOnEmpty) &&
|
||||
|
|
|
@ -357,7 +357,7 @@ function image_to_zulip_markdown(
|
|||
const src = node.getAttribute("src") ?? node.getAttribute("href") ?? "";
|
||||
const title = deduplicate_newlines(node.getAttribute("title") ?? "");
|
||||
// Using Zulip's link like syntax for images
|
||||
return src ? "[" + title + "](" + src + ")" : node.getAttribute("alt") ?? "";
|
||||
return src ? "[" + title + "](" + src + ")" : (node.getAttribute("alt") ?? "");
|
||||
}
|
||||
|
||||
function within_single_element(html_fragment: HTMLElement): boolean {
|
||||
|
@ -565,7 +565,7 @@ export function paste_handler_converter(paste_html: string): string {
|
|||
|
||||
const className = codeElement.getAttribute("class") ?? "";
|
||||
const language = node.parentElement?.classList.contains("zulip-code-block")
|
||||
? node.closest<HTMLElement>(".codehilite")?.dataset?.codeLanguage ?? ""
|
||||
? (node.closest<HTMLElement>(".codehilite")?.dataset?.codeLanguage ?? "")
|
||||
: (className.match(/language-(\S+)/) ?? [null, ""])[1];
|
||||
|
||||
assert(options.fence !== undefined);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type {UppyFile} from "@uppy/core";
|
||||
import type {Meta, UppyFile} from "@uppy/core";
|
||||
import {Uppy} from "@uppy/core";
|
||||
import XHRUpload from "@uppy/xhr-upload";
|
||||
import $ from "jquery";
|
||||
|
@ -33,7 +33,7 @@ export function feature_check(): XMLHttpRequestUpload {
|
|||
return window.XMLHttpRequest && new window.XMLHttpRequest().upload;
|
||||
}
|
||||
|
||||
export function get_translated_status(file: File | UppyFile): string {
|
||||
export function get_translated_status(file: File | UppyFile<Meta, Record<string, never>>): string {
|
||||
const status = $t({defaultMessage: "Uploading {filename}…"}, {filename: file.name});
|
||||
return "[" + status + "]()";
|
||||
}
|
||||
|
@ -263,6 +263,7 @@ export function setup_upload(config: Config): Uppy {
|
|||
),
|
||||
failedToUpload: $t({defaultMessage: "Failed to upload %'{file}'"}),
|
||||
},
|
||||
pluralize: (_n) => 0,
|
||||
},
|
||||
});
|
||||
uppy.setMeta({
|
||||
|
@ -280,6 +281,7 @@ export function setup_upload(config: Config): Uppy {
|
|||
defaultMessage: "Upload stalled for %'{seconds}' seconds, aborting.",
|
||||
}),
|
||||
},
|
||||
pluralize: (_n) => 0,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -289,6 +291,7 @@ export function setup_upload(config: Config): Uppy {
|
|||
|
||||
uppy.on("upload-progress", (file, progress) => {
|
||||
assert(file !== undefined);
|
||||
assert(progress.bytesTotal !== null);
|
||||
const percent_complete = (100 * progress.bytesUploaded) / progress.bytesTotal;
|
||||
$(`${config.upload_banner_identifier(file.id)} .moving_bar`).css({
|
||||
width: `${percent_complete}%`,
|
||||
|
@ -479,7 +482,7 @@ export function deactivate_upload(config: Config): void {
|
|||
// Uninstall all plugins and close down the Uppy instance.
|
||||
// Also runs uppy.cancelAll() before uninstalling - which
|
||||
// cancels all uploads, resets progress and removes all files.
|
||||
uppy.close();
|
||||
uppy.destroy();
|
||||
} catch (error) {
|
||||
blueslip.error("Failed to close upload object.", {config}, error);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ export function append_person(opts: {
|
|||
|
||||
export function get_user_ids(pill_widget: UserPillWidget | CombinedPillContainer): number[] {
|
||||
const items = pill_widget.items();
|
||||
return items.flatMap((item) => (item.type === "user" ? item.user_id ?? [] : [])); // be defensive about undefined users
|
||||
return items.flatMap((item) => (item.type === "user" ? (item.user_id ?? []) : [])); // be defensive about undefined users
|
||||
}
|
||||
|
||||
export function has_unconverted_data(pill_widget: UserPillWidget): boolean {
|
||||
|
|
Loading…
Reference in New Issue