New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atlaspack/runtime-js

Package Overview
Dependencies
Maintainers
0
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaspack/runtime-js - npm Package Compare versions

Comparing version 2.12.1-canary.3613 to 2.12.1-canary.3614

lib/helpers/browser/analytics/analytics.js

28

lib/helpers/browser/esm-js-loader-retry.js

@@ -47,13 +47,11 @@ "use strict";

// eslint-disable-next-line no-undef
return await __parcel__import__(`${url}?t=${Date.now()}`);
const result = await __parcel__import__(`${url}?t=${Date.now()}`);
sendAnalyticsEvent('recovered', url, i);
return result;
} catch (error) {
if (i === maxRetries) throw error;
// Dispatch event for reporting
const event = {
detail: {
target: url,
attempt: i
}
};
globalThis.dispatchEvent(new CustomEvent('atlaspack:import_retry', event));
if (i === maxRetries) {
sendAnalyticsEvent('failure', url, i);
throw error;
}
sendAnalyticsEvent('progress', url, i);
}

@@ -65,2 +63,12 @@ }

}
function sendAnalyticsEvent(status, targetUrl, attempt) {
require('./analytics/analytics.js').sendAnalyticsEvent({
action: 'importRetry',
attributes: {
status,
targetUrl,
attempt
}
});
}
module.exports = load;
{
"name": "@atlaspack/runtime-js",
"version": "2.12.1-canary.3613+d904a75ee",
"version": "2.12.1-canary.3614+c789b2fe4",
"license": "(MIT OR Apache-2.0)",

@@ -15,14 +15,14 @@ "publishConfig": {

"engines": {
"atlaspack": "2.12.1-canary.3613+d904a75ee",
"atlaspack": "2.12.1-canary.3614+c789b2fe4",
"node": ">= 16.0.0"
},
"dependencies": {
"@atlaspack/diagnostic": "2.12.1-canary.3613+d904a75ee",
"@atlaspack/domain-sharding": "2.12.1-canary.3613+d904a75ee",
"@atlaspack/feature-flags": "2.12.1-canary.3613+d904a75ee",
"@atlaspack/plugin": "2.12.1-canary.3613+d904a75ee",
"@atlaspack/utils": "2.12.1-canary.3613+d904a75ee",
"@atlaspack/diagnostic": "2.12.1-canary.3614+c789b2fe4",
"@atlaspack/domain-sharding": "2.12.1-canary.3614+c789b2fe4",
"@atlaspack/feature-flags": "2.12.1-canary.3614+c789b2fe4",
"@atlaspack/plugin": "2.12.1-canary.3614+c789b2fe4",
"@atlaspack/utils": "2.12.1-canary.3614+c789b2fe4",
"nullthrows": "^1.1.1"
},
"gitHead": "d904a75eecaea2c2e62cd8ff18f217057d545fc4"
"gitHead": "c789b2fe40acf04714fbbd27c7851b505e70dff8"
}

@@ -45,10 +45,11 @@ async function load(id) {

// eslint-disable-next-line no-undef
return await __parcel__import__(`${url}?t=${Date.now()}`);
const result = await __parcel__import__(`${url}?t=${Date.now()}`);
sendAnalyticsEvent('recovered', url, i);
return result;
} catch (error) {
if (i === maxRetries) throw error;
// Dispatch event for reporting
const event = {detail: {target: url, attempt: i}};
globalThis.dispatchEvent(
new CustomEvent('atlaspack:import_retry', event),
);
if (i === maxRetries) {
sendAnalyticsEvent('failure', url, i);
throw error;
}
sendAnalyticsEvent('progress', url, i);
}

@@ -62,2 +63,13 @@ }

function sendAnalyticsEvent(status, targetUrl, attempt) {
require('./analytics/analytics.js').sendAnalyticsEvent({
action: 'importRetry',
attributes: {
status,
targetUrl,
attempt,
},
});
}
module.exports = load;
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc