Skip to content

Commit

Permalink
1.2.7, close #207
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jul 17, 2016
1 parent 2c00e65 commit 11a0a09
Show file tree
Hide file tree
Showing 17 changed files with 122 additions and 95 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelog
##### 1.2.7 [LEGACY] - 2016.07.18
* some fixes for issues like #159, #186, #194, #207

##### 1.2.6 - 2015.11.09
* reject with `TypeError` on attempt resolve promise itself
* correct behavior with broken `Promise` subclass constructors / methods
Expand Down
80 changes: 40 additions & 40 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core.js",
"main": "client/core.js",
"version": "1.2.6",
"version": "1.2.7",
"description": "Standard Library",
"keywords": [
"ES6",
Expand Down
26 changes: 16 additions & 10 deletions client/core.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* core-js 1.2.6
* core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
* © 2016 Denis Pushkarev
*/
!function(__e, __g, undefined){
'use strict';
Expand Down Expand Up @@ -2551,7 +2551,7 @@
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down Expand Up @@ -2970,12 +2970,16 @@
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
, empty = function(){ /* empty */ }
, Wrapper;

var testResolve = function(sub){
var test = new P(function(){});
if(sub)test.constructor = Object;
return P.resolve(test) === test;
var test = new P(empty), promise;
if(sub)test.constructor = function(exec){
exec(empty, empty);
};
(promise = P.resolve(test))['catch'](empty);
return promise === test;
};

var USE_NATIVE = function(){
Expand Down Expand Up @@ -3892,12 +3896,13 @@
/***/ function(module, exports, __webpack_require__) {

// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(3)
, _apply = Function.apply;
var $export = __webpack_require__(3)
, _apply = Function.apply
, anObject = __webpack_require__(20);

$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
return _apply.call(target, thisArgument, argumentsList);
return _apply.call(target, thisArgument, anObject(argumentsList));
}
});

Expand All @@ -3921,10 +3926,11 @@
}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
if(args != undefined)switch(anObject(args).length){
switch(args.length){
case 0: return new Target;
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
Expand Down
8 changes: 4 additions & 4 deletions client/core.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/core.min.js.map

Large diffs are not rendered by default.

26 changes: 16 additions & 10 deletions client/library.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* core-js 1.2.6
* core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
* © 2016 Denis Pushkarev
*/
!function(__e, __g, undefined){
'use strict';
Expand Down Expand Up @@ -2397,7 +2397,7 @@
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down Expand Up @@ -2643,12 +2643,16 @@
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
, empty = function(){ /* empty */ }
, Wrapper;

var testResolve = function(sub){
var test = new P(function(){});
if(sub)test.constructor = Object;
return P.resolve(test) === test;
var test = new P(empty), promise;
if(sub)test.constructor = function(exec){
exec(empty, empty);
};
(promise = P.resolve(test))['catch'](empty);
return promise === test;
};

var USE_NATIVE = function(){
Expand Down Expand Up @@ -3541,12 +3545,13 @@
/***/ function(module, exports, __webpack_require__) {

// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(3)
, _apply = Function.apply;
var $export = __webpack_require__(3)
, _apply = Function.apply
, anObject = __webpack_require__(17);

$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
return _apply.call(target, thisArgument, argumentsList);
return _apply.call(target, thisArgument, anObject(argumentsList));
}
});

Expand All @@ -3570,10 +3575,11 @@
}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
if(args != undefined)switch(anObject(args).length){
switch(args.length){
case 0: return new Target;
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
Expand Down
8 changes: 4 additions & 4 deletions client/library.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/library.min.js.map

Large diffs are not rendered by default.

26 changes: 16 additions & 10 deletions client/shim.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* core-js 1.2.6
* core-js 1.2.7
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2015 Denis Pushkarev
* © 2016 Denis Pushkarev
*/
!function(__e, __g, undefined){
'use strict';
Expand Down Expand Up @@ -2537,7 +2537,7 @@
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down Expand Up @@ -2956,12 +2956,16 @@
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
, empty = function(){ /* empty */ }
, Wrapper;

var testResolve = function(sub){
var test = new P(function(){});
if(sub)test.constructor = Object;
return P.resolve(test) === test;
var test = new P(empty), promise;
if(sub)test.constructor = function(exec){
exec(empty, empty);
};
(promise = P.resolve(test))['catch'](empty);
return promise === test;
};

var USE_NATIVE = function(){
Expand Down Expand Up @@ -3878,12 +3882,13 @@
/***/ function(module, exports, __webpack_require__) {

// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(3)
, _apply = Function.apply;
var $export = __webpack_require__(3)
, _apply = Function.apply
, anObject = __webpack_require__(20);

$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
return _apply.call(target, thisArgument, argumentsList);
return _apply.call(target, thisArgument, anObject(argumentsList));
}
});

Expand All @@ -3907,10 +3912,11 @@
}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
if(args != undefined)switch(anObject(args).length){
switch(args.length){
case 0: return new Target;
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
Expand Down
8 changes: 4 additions & 4 deletions client/shim.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/shim.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion library/modules/$.iter-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(exec, skipClosing){
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down
10 changes: 7 additions & 3 deletions library/modules/es6.promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ var $ = require('./$')
, process = global.process
, isNode = classof(process) == 'process'
, P = global[PROMISE]
, empty = function(){ /* empty */ }
, Wrapper;

var testResolve = function(sub){
var test = new P(function(){});
if(sub)test.constructor = Object;
return P.resolve(test) === test;
var test = new P(empty), promise;
if(sub)test.constructor = function(exec){
exec(empty, empty);
};
(promise = P.resolve(test))['catch'](empty);
return promise === test;
};

var USE_NATIVE = function(){
Expand Down
7 changes: 4 additions & 3 deletions library/modules/es6.reflect.apply.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = require('./$.export')
, _apply = Function.apply;
var $export = require('./$.export')
, _apply = Function.apply
, anObject = require('./$.an-object');

$export($export.S, 'Reflect', {
apply: function apply(target, thisArgument, argumentsList){
return _apply.call(target, thisArgument, argumentsList);
return _apply.call(target, thisArgument, anObject(argumentsList));
}
});
3 changes: 2 additions & 1 deletion library/modules/es6.reflect.construct.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ $export($export.S + $export.F * require('./$.fails')(function(){
}), 'Reflect', {
construct: function construct(Target, args /*, newTarget*/){
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if(Target == newTarget){
// w/o altered newTarget, optimization for 0-4 arguments
if(args != undefined)switch(anObject(args).length){
switch(args.length){
case 0: return new Target;
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "core-js",
"description": "Standard library",
"version": "1.2.6",
"version": "1.2.7",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down

0 comments on commit 11a0a09

Please sign in to comment.