Make the custom build message work with -rc.1 and fix build.

Former-commit-id: 96f31fff906fa978a0d10fad90d9322c761e1d26
This commit is contained in:
John-David Dalton
2012-12-02 00:14:46 -08:00
parent e3eabcf648
commit f58f255fc8
2 changed files with 10 additions and 15 deletions

View File

@@ -263,7 +263,7 @@
* @returns {String} Returns the modified source.
*/
function addCommandsToHeader(source, commands) {
return source.replace(/(\/\*!\n)( \*)?( *Lo-Dash [0-9.]+)(.*)/, function() {
return source.replace(/(\/\*!\n)( \*)?( *Lo-Dash [\w.-]+)(.*)/, function() {
// convert unmatched groups to empty strings
var parts = _.map(slice.call(arguments, 1), function(part) {
return part || '';
@@ -646,8 +646,9 @@
*/
function removeCreateFunction(source) {
source = removeVar(source, 'isFirefox');
source = removeFunction(source, 'createFunction');
return source.replace(/(?:\s*\/\/.*)*\s*if *\(isIeOpera[^}]+}\n/, '');
return removeFunction(source, 'createFunction')
.replace(/createFunction/g, 'Function')
.replace(/(?:\s*\/\/.*)*\s*if *\(isIeOpera[^}]+}\n/, '');
}
/**
@@ -1556,7 +1557,7 @@
/*----------------------------------------------------------------------*/
if (isLegacy) {
_.each(['isBindFast', 'nativeBind', 'nativeIsArray', 'nativeKeys'], function(varName) {
_.each(['isBindFast', 'isV8', 'nativeBind', 'nativeIsArray', 'nativeKeys', 'reNative'], function(varName) {
source = removeVar(source, varName);
});
@@ -1588,9 +1589,8 @@
source = removeIsArgumentsFallback(source);
}
source = removeVar(source, 'reNative');
source = removeFromCreateIterator(source, 'nativeKeys');
source = removeCreateFunction(source);
}
/*----------------------------------------------------------------------*/
@@ -1691,7 +1691,7 @@
// remove `hasDontEnumBug`, `iteratesOwnLast`, and `noArgsEnum` declarations and assignments
source = source
.replace(/ *\(function\(\) *{[\s\S]+?}\(1\)\);\n/, '')
.replace(/^ *\(function\(\) *{[\s\S]+?}\(1\)\);\n/m, '')
.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *var (?:hasDontEnumBug|iteratesOwnLast|noArgsEnum).+\n/g, '');
// remove `iteratesOwnLast` from `shimIsPlainObject`
@@ -1709,11 +1709,6 @@
return match.replace(/noCharByIndex[^:]+:/, '');
});
// replace `createFunction` with `Function` in `_.template`
source = source.replace(matchFunction(source, 'template'), function(match) {
return match.replace(/createFunction/g, 'Function');
});
source = removeVar(source, 'iteratorTemplate');
source = removeCreateFunction(source);
source = removeNoArgsClass(source);
@@ -1868,11 +1863,11 @@
source = removeFunction(source, 'createIterator');
source = source.replace(/(?:\n +\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)?\n *var noArgsEnum;|.+?noArgsEnum *=.+/g, '');
}
if (isRemoved(source, 'createIterator', 'bind')) {
if (isRemoved(source, 'createIterator', 'bind', 'keys', 'template')) {
source = removeVar(source, 'isBindFast');
source = removeVar(source, 'nativeBind');
}
if (isRemoved(source, 'createIterator', 'bind', 'isArray', 'isPlainObject', 'keys')) {
if (isRemoved(source, 'createIterator', 'bind', 'isArray', 'isPlainObject', 'keys', 'template')) {
source = removeVar(source, 'reNative');
}
if (isRemoved(source, 'createIterator', 'isEqual')) {

View File

@@ -116,7 +116,7 @@
stringClass = '[object String]';
/** Detect various environments */
var isFirefox = !/1/.test(function(){1}),
var isFirefox = !/1/.test(Function('1')),
isIeOpera = !!window.attachEvent,
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);