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
512f16690a
commit
42abc1b635
|
@ -98,7 +98,12 @@
|
|||
"unicorn/no-process-exit": "off",
|
||||
"unicorn/no-useless-undefined": "off",
|
||||
"unicorn/number-literal-case": "off",
|
||||
"unicorn/numeric-separators-style": "off",
|
||||
"unicorn/prefer-array-flat": "off",
|
||||
"unicorn/prefer-module": "off",
|
||||
"unicorn/prefer-node-protocol": "off",
|
||||
"unicorn/prefer-spread": "off",
|
||||
"unicorn/prefer-switch": "off",
|
||||
"unicorn/prefer-ternary": "off",
|
||||
"unicorn/prevent-abbreviations": "off",
|
||||
"valid-typeof": ["error", {"requireStringLiterals": true}],
|
||||
|
|
|
@ -55,8 +55,7 @@ run_test("clean_function_name", () => {
|
|||
"Function.../zulip-npm-cache/de76fb6f582a29b053274f…es/underscore/underscore.js?3817._.each._.forEach",
|
||||
),
|
||||
{
|
||||
scope:
|
||||
"Function.../zulip-npm-cache/de76fb6f582a29b053274f…es/underscore/underscore.js?3817._.each._.",
|
||||
scope: "Function.../zulip-npm-cache/de76fb6f582a29b053274f…es/underscore/underscore.js?3817._.each._.",
|
||||
name: "forEach",
|
||||
},
|
||||
);
|
||||
|
|
|
@ -136,7 +136,8 @@ test("videos", (override) => {
|
|||
page_params.jitsi_server_url = "https://meet.jit.si";
|
||||
handler(ev);
|
||||
// video link ids consist of 15 random digits
|
||||
const video_link_regex = /\[translated: Click to join video call]\(https:\/\/meet.jit.si\/\d{15}\)/;
|
||||
const video_link_regex =
|
||||
/\[translated: Click to join video call]\(https:\/\/meet.jit.si\/\d{15}\)/;
|
||||
assert(called);
|
||||
assert.match(syntax_to_insert, video_link_regex);
|
||||
})();
|
||||
|
@ -214,13 +215,13 @@ test("videos", (override) => {
|
|||
channel.get = (options) => {
|
||||
assert(options.url === "/json/calls/bigbluebutton/create");
|
||||
options.success({
|
||||
url:
|
||||
"/calls/bigbluebutton/join?meeting_id=%22zulip-1%22&password=%22AAAAAAAAAA%22&checksum=%2232702220bff2a22a44aee72e96cfdb4c4091752e%22",
|
||||
url: "/calls/bigbluebutton/join?meeting_id=%22zulip-1%22&password=%22AAAAAAAAAA%22&checksum=%2232702220bff2a22a44aee72e96cfdb4c4091752e%22",
|
||||
});
|
||||
};
|
||||
|
||||
handler(ev);
|
||||
const video_link_regex = /\[translated: Click to join video call]\(\/calls\/bigbluebutton\/join\?meeting_id=%22zulip-1%22&password=%22AAAAAAAAAA%22&checksum=%2232702220bff2a22a44aee72e96cfdb4c4091752e%22\)/;
|
||||
const video_link_regex =
|
||||
/\[translated: Click to join video call]\(\/calls\/bigbluebutton\/join\?meeting_id=%22zulip-1%22&password=%22AAAAAAAAAA%22&checksum=%2232702220bff2a22a44aee72e96cfdb4c4091752e%22\)/;
|
||||
assert(called);
|
||||
assert.match(syntax_to_insert, video_link_regex);
|
||||
})();
|
||||
|
|
|
@ -49,8 +49,7 @@ run_test("$tr", () => {
|
|||
assert.equal(
|
||||
$t_html(
|
||||
{
|
||||
id:
|
||||
"<p>The stream <b>{stream_name}</b> does not exist.</p><p>Manage your subscriptions <z-link>on your Streams page</z-link>.</p>",
|
||||
id: "<p>The stream <b>{stream_name}</b> does not exist.</p><p>Manage your subscriptions <z-link>on your Streams page</z-link>.</p>",
|
||||
defaultMessage:
|
||||
"<p>The stream <b>{stream_name}</b> does not exist.</p><p>Manage your subscriptions <z-link>on your Streams page</z-link>.</p>",
|
||||
},
|
||||
|
|
|
@ -302,8 +302,7 @@ test("marked", () => {
|
|||
'<div class="codehilite"><pre><span></span><code>fenced code\n</code></pre></div>\n<p>and then after</p>',
|
||||
},
|
||||
{
|
||||
input:
|
||||
"\n```\n fenced code trailing whitespace \n```\n\nand then after\n",
|
||||
input: "\n```\n fenced code trailing whitespace \n```\n\nand then after\n",
|
||||
expected:
|
||||
'<div class="codehilite"><pre><span></span><code> fenced code trailing whitespace\n</code></pre></div>\n<p>and then after</p>',
|
||||
},
|
||||
|
@ -401,8 +400,7 @@ test("marked", () => {
|
|||
'<p>Silent mention: <span class="user-mention silent" data-user-id="101">Cordelia, Lear's daughter</span></p>',
|
||||
},
|
||||
{
|
||||
input:
|
||||
"> Mention in quote: @**Cordelia, Lear's daughter**\n\nMention outside quote: @**Cordelia, Lear's daughter**",
|
||||
input: "> Mention in quote: @**Cordelia, Lear's daughter**\n\nMention outside quote: @**Cordelia, Lear's daughter**",
|
||||
expected:
|
||||
'<blockquote>\n<p>Mention in quote: <span class="user-mention silent" data-user-id="101">Cordelia, Lear's daughter</span></p>\n</blockquote>\n<p>Mention outside quote: <span class="user-mention" data-user-id="101">@Cordelia, Lear's daughter</span></p>',
|
||||
},
|
||||
|
|
|
@ -216,8 +216,7 @@ test("basics", () => {
|
|||
local_id: "unicode_emoji,1f680",
|
||||
count: 3,
|
||||
user_ids: [5, 6, 7],
|
||||
label:
|
||||
"translated: You (click to remove), Bob van Roberts and Cali reacted with :rocket:",
|
||||
label: "translated: You (click to remove), Bob van Roberts and Cali reacted with :rocket:",
|
||||
emoji_alt_code: false,
|
||||
class: "message_reaction reacted",
|
||||
},
|
||||
|
|
|
@ -293,13 +293,8 @@ function test_submit_settings_form(override, submit_form) {
|
|||
}
|
||||
|
||||
function test_change_save_button_state() {
|
||||
const {
|
||||
save_button_controls,
|
||||
save_button_text,
|
||||
save_button,
|
||||
discard_button,
|
||||
props,
|
||||
} = createSaveButtons("msg-editing");
|
||||
const {save_button_controls, save_button_text, save_button, discard_button, props} =
|
||||
createSaveButtons("msg-editing");
|
||||
save_button.attr("id", "org-submit-msg-editing");
|
||||
|
||||
{
|
||||
|
|
|
@ -547,7 +547,8 @@ test("notifications", () => {
|
|||
antarctica.push_notifications = null;
|
||||
antarctica.wildcard_mentions_notify = null;
|
||||
|
||||
const unmatched_streams = stream_settings_data.get_unmatched_streams_for_notification_settings();
|
||||
const unmatched_streams =
|
||||
stream_settings_data.get_unmatched_streams_for_notification_settings();
|
||||
const expected_streams = [
|
||||
{
|
||||
desktop_notifications: true,
|
||||
|
|
|
@ -414,15 +414,12 @@ class CommonUtils {
|
|||
async get_rendered_messages(page: Page, table = "zhome"): Promise<[string, string[]][]> {
|
||||
const recipient_rows = await page.$$(`#${CSS.escape(table)} .recipient_row`);
|
||||
return Promise.all(
|
||||
recipient_rows.map(
|
||||
async (element): Promise<[string, string[]]> => {
|
||||
recipient_rows.map(async (element): Promise<[string, string[]]> => {
|
||||
const stream_label = await element.$(".stream_label");
|
||||
const stream_name = (await this.get_element_text(stream_label!)).trim();
|
||||
const topic_label = await element.$(".stream_topic a");
|
||||
const topic_name =
|
||||
topic_label === null
|
||||
? ""
|
||||
: (await this.get_element_text(topic_label)).trim();
|
||||
topic_label === null ? "" : (await this.get_element_text(topic_label)).trim();
|
||||
let key = stream_name;
|
||||
if (topic_name !== "") {
|
||||
// If topic_name is '' then this is PMs, so only
|
||||
|
@ -433,14 +430,11 @@ class CommonUtils {
|
|||
const messages = await Promise.all(
|
||||
(
|
||||
await element.$$(".message_row .message_content")
|
||||
).map(async (message_row) =>
|
||||
(await this.get_element_text(message_row)).trim(),
|
||||
),
|
||||
).map(async (message_row) => (await this.get_element_text(message_row)).trim()),
|
||||
);
|
||||
|
||||
return [key, messages];
|
||||
},
|
||||
),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -552,7 +546,7 @@ class CommonUtils {
|
|||
console_ready = (async () => {
|
||||
const frames = await Promise.all(
|
||||
ErrorStackParser.parse(error1).map(async (frame1) => {
|
||||
let frame = (frame1 as unknown) as StackFrame;
|
||||
let frame = frame1 as unknown as StackFrame;
|
||||
try {
|
||||
frame = await this.gps.getMappedLocation(frame);
|
||||
} catch {
|
||||
|
|
|
@ -8,7 +8,8 @@ import common from "../puppeteer_lib/common";
|
|||
const OUTGOING_WEBHOOK_BOT_TYPE = "3";
|
||||
const GENERIC_BOT_TYPE = "1";
|
||||
|
||||
const zuliprc_regex = /^data:application\/octet-stream;charset=utf-8,\[api]\nemail=.+\nkey=.+\nsite=.+\n$/;
|
||||
const zuliprc_regex =
|
||||
/^data:application\/octet-stream;charset=utf-8,\[api]\nemail=.+\nkey=.+\nsite=.+\n$/;
|
||||
|
||||
async function get_decoded_url_in_selector(page: Page, selector: string): Promise<string> {
|
||||
return await page.evaluate(
|
||||
|
@ -115,7 +116,8 @@ async function test_webhook_bot_creation(page: Page): Promise<void> {
|
|||
const download_zuliprc_selector = `.download_bot_zuliprc[data-email="${CSS.escape(
|
||||
bot_email,
|
||||
)}"]`;
|
||||
const outgoing_webhook_zuliprc_regex = /^data:application\/octet-stream;charset=utf-8,\[api]\nemail=.+\nkey=.+\nsite=.+\ntoken=.+\n$/;
|
||||
const outgoing_webhook_zuliprc_regex =
|
||||
/^data:application\/octet-stream;charset=utf-8,\[api]\nemail=.+\nkey=.+\nsite=.+\ntoken=.+\n$/;
|
||||
|
||||
await page.waitForSelector(download_zuliprc_selector, {visible: true});
|
||||
await page.click(download_zuliprc_selector);
|
||||
|
@ -157,7 +159,8 @@ async function test_botserverrc(page: Page): Promise<void> {
|
|||
page,
|
||||
"#download_botserverrc",
|
||||
);
|
||||
const botserverrc_regex = /^data:application\/octet-stream;charset=utf-8,\[]\nemail=.+\nkey=.+\nsite=.+\ntoken=.+\n$/;
|
||||
const botserverrc_regex =
|
||||
/^data:application\/octet-stream;charset=utf-8,\[]\nemail=.+\nkey=.+\nsite=.+\ntoken=.+\n$/;
|
||||
assert(botserverrc_regex.test(botserverrc_decoded_url), "Incorrect botserverrc format.");
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"@babel/register": "^7.6.2",
|
||||
"@formatjs/intl": "^1.9.7",
|
||||
"@giphy/js-components": "^4.3.1",
|
||||
"@giphy/js-fetch-api": "^2.4.0",
|
||||
"@giphy/js-fetch-api": "^3.0.0",
|
||||
"@uppy/core": "^1.7.1",
|
||||
"@uppy/progress-bar": "^1.3.4",
|
||||
"@uppy/xhr-upload": "^1.4.2",
|
||||
|
@ -36,7 +36,7 @@
|
|||
"emoji-datasource-google-blob": "npm:emoji-datasource-google@^3.0.0",
|
||||
"emoji-datasource-twitter": "^6.0.0",
|
||||
"error-stack-parser": "^2.0.2",
|
||||
"eslint-plugin-unicorn": "^29.0.0",
|
||||
"eslint-plugin-unicorn": "^32.0.0",
|
||||
"expose-loader": "^1.0.0",
|
||||
"file-loader": "^6.0.0",
|
||||
"flatpickr": "^4.5.7",
|
||||
|
@ -66,7 +66,7 @@
|
|||
"simplebar": "^5.2.1",
|
||||
"sortablejs": "^1.9.0",
|
||||
"sorttable": "^1.0.2",
|
||||
"source-code-pro": "https://codeload.github.com/adobe-fonts/source-code-pro/tar.gz/72d3d0eb3567e68669a2b97904a1274ac3b376fa",
|
||||
"source-code-pro": "^2.38.0",
|
||||
"source-sans": "^3.28.0",
|
||||
"spectrum-colorpicker": "^1.8.1",
|
||||
"stacktrace-gps": "^3.0.4",
|
||||
|
@ -114,7 +114,7 @@
|
|||
"source-map": "https://codeload.github.com/benthemonkey/source-map/tar.gz/d95423f77edef6cbb9e21d2d6014c7de85ae220a",
|
||||
"stylelint": "^13.0.0",
|
||||
"stylelint-config-prettier": "^8.0.2",
|
||||
"stylelint-config-standard": "^21.0.0",
|
||||
"stylelint-config-standard": "^22.0.0",
|
||||
"svgo": "^2.0.3",
|
||||
"swagger-parser": "^10.0.0",
|
||||
"ts-node": "^9.1.1",
|
||||
|
|
|
@ -89,7 +89,7 @@ export async function display_stacktrace(error: string, stack: string): Promise<
|
|||
ErrorStackParser.parse(ex).map(async (stack_frame: ErrorStackParser.StackFrame) => {
|
||||
// Work around mistake in ErrorStackParser.StackFrame definition
|
||||
// https://github.com/stacktracejs/error-stack-parser/pull/54
|
||||
let location = (stack_frame as unknown) as StackFrame;
|
||||
let location = stack_frame as unknown as StackFrame;
|
||||
try {
|
||||
location = await stack_trace_gps.getMappedLocation(location);
|
||||
} catch {
|
||||
|
|
|
@ -204,9 +204,8 @@ export const update_elements = (content) => {
|
|||
const $pre = $codehilite.find("pre");
|
||||
const fenced_code_lang = $codehilite.data("code-language");
|
||||
if (fenced_code_lang !== undefined) {
|
||||
const playground_info = realm_playground.get_playground_info_for_languages(
|
||||
fenced_code_lang,
|
||||
);
|
||||
const playground_info =
|
||||
realm_playground.get_playground_info_for_languages(fenced_code_lang);
|
||||
if (playground_info !== undefined) {
|
||||
// If a playground is configured for this language,
|
||||
// offer to view the code in that playground. When
|
||||
|
|
|
@ -105,8 +105,8 @@ export function build_page() {
|
|||
general_settings: settings_config.all_notifications().general_settings,
|
||||
notification_settings: settings_config.all_notifications().settings,
|
||||
desktop_icon_count_display_values: settings_config.desktop_icon_count_display_values,
|
||||
show_push_notifications_tooltip: settings_config.all_notifications()
|
||||
.show_push_notifications_tooltip,
|
||||
show_push_notifications_tooltip:
|
||||
settings_config.all_notifications().show_push_notifications_tooltip,
|
||||
display_settings: settings_config.get_all_display_settings(),
|
||||
user_can_change_name: settings_data.user_can_change_name(),
|
||||
user_can_change_avatar: settings_data.user_can_change_avatar(),
|
||||
|
|
|
@ -20,7 +20,8 @@ function rerender_ui() {
|
|||
return;
|
||||
}
|
||||
|
||||
const unmatched_streams = stream_settings_data.get_unmatched_streams_for_notification_settings();
|
||||
const unmatched_streams =
|
||||
stream_settings_data.get_unmatched_streams_for_notification_settings();
|
||||
|
||||
unmatched_streams_table.find(".stream-row").remove();
|
||||
|
||||
|
|
|
@ -783,7 +783,8 @@ export function build_page() {
|
|||
data.allow_message_editing = Boolean(data.message_content_edit_limit_seconds);
|
||||
} else {
|
||||
data.allow_message_editing = true;
|
||||
data.message_content_edit_limit_seconds = settings_config.msg_edit_limit_dropdown_values.get(
|
||||
data.message_content_edit_limit_seconds =
|
||||
settings_config.msg_edit_limit_dropdown_values.get(
|
||||
edit_limit_setting_value,
|
||||
).seconds;
|
||||
}
|
||||
|
@ -798,7 +799,8 @@ export function build_page() {
|
|||
data.allow_message_deleting = Boolean(data.message_content_delete_limit_seconds);
|
||||
} else {
|
||||
data.allow_message_deleting = true;
|
||||
data.message_content_delete_limit_seconds = settings_config.msg_delete_limit_dropdown_values.get(
|
||||
data.message_content_delete_limit_seconds =
|
||||
settings_config.msg_delete_limit_dropdown_values.get(
|
||||
delete_limit_setting_value,
|
||||
).seconds;
|
||||
}
|
||||
|
|
|
@ -45,4 +45,4 @@ API_FEATURE_LEVEL = 64
|
|||
# historical commits sharing the same major version, in which case a
|
||||
# minor version bump suffices.
|
||||
|
||||
PROVISION_VERSION = "144.0"
|
||||
PROVISION_VERSION = "145.0"
|
||||
|
|
Loading…
Reference in New Issue