Skip to content

Commit

Permalink
Build 2.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ichernev committed Oct 11, 2017
1 parent 40564b1 commit 29afed6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 60 deletions.
27 changes: 7 additions & 20 deletions min/moment-with-locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -1830,28 +1830,15 @@ function chooseLocale(names) {

function loadLocale(name) {
var oldLocale = null;

// TODO: Find a better way to register and load all the locales in Node
if (!locales[name] && (typeof module !== 'undefined') &&
module && module.exports) {
oldLocale = globalLocale._abbr;
try {
// workaround for React Native 0.49+
var pretendingNotToRequireV1 = require;
pretendingNotToRequireV1('moment/locale/' + name);
} catch (e) {
// In the test environment, the external module 'moment'
// can't be resolved because we're running inside it.
// Fallback to using the old relative import
try {
var pretendingNotToRequireV2 = require;
pretendingNotToRequireV2('./locale/' + name);
} catch (e) { }
}

// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
getSetGlobalLocale(oldLocale);
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
aliasedRequire('./locale/' + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
return locales[name];
}
Expand Down Expand Up @@ -4484,12 +4471,12 @@ addParseToken('x', function (input, array, config) {
// Side effect imports

//! moment.js
//! version : 2.19.0
//! version : 2.19.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com

hooks.version = '2.19.0';
hooks.version = '2.19.1';

setHookCallback(createLocal);

Expand Down
2 changes: 1 addition & 1 deletion min/moment-with-locales.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion min/moment.min.js

Large diffs are not rendered by default.

23 changes: 5 additions & 18 deletions min/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -60088,28 +60088,15 @@ function chooseLocale(names) {

function loadLocale(name) {
var oldLocale = null;

// TODO: Find a better way to register and load all the locales in Node
if (!locales[name] && (typeof module !== 'undefined') &&
module && module.exports) {
oldLocale = globalLocale._abbr;
try {
// workaround for React Native 0.49+
var pretendingNotToRequireV1 = require;
pretendingNotToRequireV1('moment/locale/' + name);
} catch (e) {
// In the test environment, the external module 'moment'
// can't be resolved because we're running inside it.
// Fallback to using the old relative import
try {
var pretendingNotToRequireV2 = require;
pretendingNotToRequireV2('./locale/' + name);
} catch (e) { }
}

// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
getSetGlobalLocale(oldLocale);
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
aliasedRequire('./locale/' + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
return locales[name];
}
Expand Down
27 changes: 7 additions & 20 deletions moment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! moment.js
//! version : 2.19.0
//! version : 2.19.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
Expand Down Expand Up @@ -1836,28 +1836,15 @@ function chooseLocale(names) {

function loadLocale(name) {
var oldLocale = null;

// TODO: Find a better way to register and load all the locales in Node
if (!locales[name] && (typeof module !== 'undefined') &&
module && module.exports) {
oldLocale = globalLocale._abbr;
try {
// workaround for React Native 0.49+
var pretendingNotToRequireV1 = require;
pretendingNotToRequireV1('moment/locale/' + name);
} catch (e) {
// In the test environment, the external module 'moment'
// can't be resolved because we're running inside it.
// Fallback to using the old relative import
try {
var pretendingNotToRequireV2 = require;
pretendingNotToRequireV2('./locale/' + name);
} catch (e) { }
}

// because defineLocale currently also sets the global locale, we
// want to undo that for lazy loaded locales
getSetGlobalLocale(oldLocale);
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
aliasedRequire('./locale/' + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
return locales[name];
}
Expand Down Expand Up @@ -4490,7 +4477,7 @@ addParseToken('x', function (input, array, config) {
// Side effect imports


hooks.version = '2.19.0';
hooks.version = '2.19.1';

setHookCallback(createLocal);

Expand Down

0 comments on commit 29afed6

Please sign in to comment.