DEV: Update moment.js (#18207)

Closes #18176
This commit is contained in:
Jarek Radosz 2022-09-12 10:56:39 +02:00 committed by GitHub
parent 0a49db14a4
commit 584dbb7202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 12 deletions

View File

@ -17,7 +17,7 @@
"diffhtml": "^1.0.0-beta.20",
"eslint-config-discourse": "^3.3.0",
"magnific-popup": "1.1.0",
"moment": "2.29.2",
"moment": "2.29.4",
"moment-timezone": "0.5.31",
"pikaday": "1.8.0",
"squoosh": "discourse/squoosh#dc9649d",

View File

@ -38,7 +38,8 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;
if (key.length === 1) {
// Nominativ
@ -46,7 +47,7 @@
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}
const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'годину') {
return number + ' година';

View File

@ -38,7 +38,8 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;
if (key.length === 1) {
// Nominativ
@ -46,7 +47,7 @@
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}
const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'godinu') {
return number + ' godina';

View File

@ -1,5 +1,5 @@
//! moment.js
//! version : 2.29.2
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
@ -2454,7 +2454,7 @@
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^)]*\)|[\n\t]/g, ' ')
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
@ -5635,7 +5635,7 @@
//! moment.js
hooks.version = '2.29.2';
hooks.version = '2.29.4';
setHookCallback(createLocal);

View File

@ -1774,10 +1774,10 @@ moment-timezone@0.5.31:
dependencies:
moment ">= 2.9.0"
moment@2.29.2, "moment@>= 2.9.0":
version "2.29.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.2.tgz#00910c60b20843bcba52d37d58c628b47b1f20e4"
integrity sha512-UgzG4rvxYpN15jgCmVJwac49h9ly9NurikMWGPdVxm8GZD6XjkKPxDTjQQ43gtGgnV3X0cAyWDdP2Wexoquifg==
moment@2.29.4, "moment@>= 2.9.0":
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
ms@2.0.0:
version "2.0.0"