Skip to content

Commit

Permalink
2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 11, 2016
1 parent 3eb1165 commit ab92628
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 6,698 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## Changelog
##### 2.0.3 - 2016.01.11
- Added fallback for V8 ~ Chrome 49 `Promise` subclassing bug causes unhandled rejection on feature detection, [#159](https://github.com/zloirock/core-js/issues/159)
- Added fix for very specific environments with global `window === null`

##### 2.0.2 - 2016.01.04
- Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`.
- Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`.

##### 2.0.1 - 2015.12.31
- forced usage `Promise.resolve` polyfill in the `library` version for correct work with wrapper
Expand Down
88 changes: 44 additions & 44 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": "2.0.2",
"version": "2.0.3",
"description": "Standard Library",
"keywords": [
"ES3",
Expand Down
4 changes: 2 additions & 2 deletions build/core-js-builder/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "core-js-builder",
"description": "core-js builder",
"version": "2.0.2",
"version": "2.0.3",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
},
"main": "index.js",
"dependencies": {
"core-js": "2.0.2",
"core-js": "2.0.3",
"webpack": "1.12.x",
"temp": "0.8.x"
},
Expand Down
23 changes: 13 additions & 10 deletions client/core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* core-js 2.0.2
* core-js 2.0.3
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
Expand Down Expand Up @@ -538,7 +538,7 @@
/* 5 */
/***/ function(module, exports) {

var core = module.exports = {version: '2.0.2'};
var core = module.exports = {version: '2.0.3'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -1306,7 +1306,7 @@
, getNames = __webpack_require__(2).getNames
, toString = {}.toString;

var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function(it){
Expand All @@ -1318,8 +1318,7 @@
};

module.exports.get = function getOwnPropertyNames(it){
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
return getNames(toIObject(it));
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : getNames(toIObject(it));
};

/***/ },
Expand Down Expand Up @@ -3255,12 +3254,16 @@
, process = global.process
, $Promise = global[PROMISE]
, isNode = classof(process) == 'process'
, empty = function(){ /* empty */ }
, Internal, GenericPromiseCapability, Wrapper;

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

var USE_NATIVE = function(){
Expand All @@ -3275,7 +3278,7 @@
setProto(SubPromise, $Promise);
SubPromise.prototype = $.create($Promise.prototype, {constructor: {value: SubPromise}});
// actual Firefox has broken subclass support, test that
if(!(SubPromise.resolve(5).then(function(){}) instanceof SubPromise)){
if(!(SubPromise.resolve(5).then(empty) instanceof SubPromise)){
works = false;
}
// V8 4.8- bug, https://code.google.com/p/v8/issues/detail?id=4162
Expand Down Expand Up @@ -3502,7 +3505,7 @@
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(131)(function(iter){
$Promise.all(iter)['catch'](function(){});
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
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.

23 changes: 13 additions & 10 deletions client/library.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* core-js 2.0.2
* core-js 2.0.3
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
Expand Down Expand Up @@ -546,7 +546,7 @@
/* 5 */
/***/ function(module, exports) {

var core = module.exports = {version: '2.0.2'};
var core = module.exports = {version: '2.0.3'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -1283,7 +1283,7 @@
, getNames = __webpack_require__(2).getNames
, toString = {}.toString;

var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function(it){
Expand All @@ -1295,8 +1295,7 @@
};

module.exports.get = function getOwnPropertyNames(it){
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
return getNames(toIObject(it));
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : getNames(toIObject(it));
};

/***/ },
Expand Down Expand Up @@ -2935,12 +2934,16 @@
, process = global.process
, $Promise = global[PROMISE]
, isNode = classof(process) == 'process'
, empty = function(){ /* empty */ }
, Internal, GenericPromiseCapability, Wrapper;

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

var USE_NATIVE = function(){
Expand All @@ -2955,7 +2958,7 @@
setProto(SubPromise, $Promise);
SubPromise.prototype = $.create($Promise.prototype, {constructor: {value: SubPromise}});
// actual Firefox has broken subclass support, test that
if(!(SubPromise.resolve(5).then(function(){}) instanceof SubPromise)){
if(!(SubPromise.resolve(5).then(empty) instanceof SubPromise)){
works = false;
}
// V8 4.8- bug, https://code.google.com/p/v8/issues/detail?id=4162
Expand Down Expand Up @@ -3182,7 +3185,7 @@
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(127)(function(iter){
$Promise.all(iter)['catch'](function(){});
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
Expand Down
6 changes: 3 additions & 3 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.

23 changes: 13 additions & 10 deletions client/shim.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* core-js 2.0.2
* core-js 2.0.3
* https://github.com/zloirock/core-js
* License: http://rock.mit-license.org
* © 2016 Denis Pushkarev
Expand Down Expand Up @@ -524,7 +524,7 @@
/* 5 */
/***/ function(module, exports) {

var core = module.exports = {version: '2.0.2'};
var core = module.exports = {version: '2.0.3'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef

/***/ },
Expand Down Expand Up @@ -1292,7 +1292,7 @@
, getNames = __webpack_require__(2).getNames
, toString = {}.toString;

var windowNames = typeof window == 'object' && Object.getOwnPropertyNames
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];

var getWindowNames = function(it){
Expand All @@ -1304,8 +1304,7 @@
};

module.exports.get = function getOwnPropertyNames(it){
if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);
return getNames(toIObject(it));
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : getNames(toIObject(it));
};

/***/ },
Expand Down Expand Up @@ -3241,12 +3240,16 @@
, process = global.process
, $Promise = global[PROMISE]
, isNode = classof(process) == 'process'
, empty = function(){ /* empty */ }
, Internal, GenericPromiseCapability, Wrapper;

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

var USE_NATIVE = function(){
Expand All @@ -3261,7 +3264,7 @@
setProto(SubPromise, $Promise);
SubPromise.prototype = $.create($Promise.prototype, {constructor: {value: SubPromise}});
// actual Firefox has broken subclass support, test that
if(!(SubPromise.resolve(5).then(function(){}) instanceof SubPromise)){
if(!(SubPromise.resolve(5).then(empty) instanceof SubPromise)){
works = false;
}
// V8 4.8- bug, https://code.google.com/p/v8/issues/detail?id=4162
Expand Down Expand Up @@ -3488,7 +3491,7 @@
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(131)(function(iter){
$Promise.all(iter)['catch'](function(){});
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable){
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/_core.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var core = module.exports = {version: '2.0.2'};
var core = module.exports = {version: '2.0.3'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
2 changes: 1 addition & 1 deletion modules/_core.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var core = module.exports = {version: '2.0.2'};
var core = module.exports = {version: '2.0.3'};
if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
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": "2.0.2",
"version": "2.0.3",
"repository": {
"type": "git",
"url": "https://github.com/zloirock/core-js.git"
Expand Down
Loading

0 comments on commit ab92628

Please sign in to comment.