Socket
Socket
Sign inDemoInstall

core-js-pure

Package Overview
Dependencies
0
Maintainers
2
Versions
151
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.11.1 to 3.11.2

internals/engine-is-browser.js

2

internals/microtask.js

@@ -50,2 +50,4 @@ var global = require('../internals/global');

promise = Promise.resolve(undefined);
// workaround of WebKit ~ iOS Safari 10.1 bug
promise.constructor = Promise;
then = promise.then;

@@ -52,0 +54,0 @@ notify = function () {

2

internals/shared.js

@@ -7,5 +7,5 @@ var IS_PURE = require('../internals/is-pure');

})('versions', []).push({
version: '3.11.1',
version: '3.11.2',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
});

@@ -28,2 +28,3 @@ 'use strict';

var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_BROWSER = require('../internals/engine-is-browser');
var IS_NODE = require('../internals/engine-is-node');

@@ -53,2 +54,3 @@ var V8_VERSION = require('../internals/engine-v8-version');

var UNHANDLED = 2;
var SUBCLASSING = false;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;

@@ -58,10 +60,6 @@

var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
if (!GLOBAL_CORE_JS_PROMISE) {
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// We can't detect it synchronously, so just check versions
if (V8_VERSION === 66) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
if (!IS_NODE && !NATIVE_REJECTION_EVENT) return true;
}
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// We can't detect it synchronously, so just check versions
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
// We need Promise#finally in the pure version for preventing prototype pollution

@@ -74,3 +72,3 @@ if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;

// Detect correctness of subclassing with @@species support
var promise = PromiseConstructor.resolve(1);
var promise = new PromiseConstructor(function (resolve) { resolve(1); });
var FakePromise = function (exec) {

@@ -81,3 +79,6 @@ exec(function () { /* empty */ }, function () { /* empty */ });

constructor[SPECIES] = FakePromise;
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
if (!SUBCLASSING) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
});

@@ -296,3 +297,3 @@

// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
if (!SUBCLASSING) redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
var that = this;

@@ -299,0 +300,0 @@ return new PromiseConstructor(function (resolve, reject) {

{
"name": "core-js-pure",
"description": "Standard library",
"version": "3.11.1",
"version": "3.11.2",
"repository": {

@@ -58,3 +58,3 @@ "type": "git",

},
"gitHead": "1e9c4fbb22c7954d50a4db09d40d5c7648bead88"
"gitHead": "040f7836ad467dae5a0b849b02442a3ed2607b18"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc