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

@data-eden/network

Package Overview
Dependencies
Maintainers
4
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@data-eden/network - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

19

dist/settled-tracking-middleware.js

@@ -1,2 +0,19 @@

const TrackingInfoPerFetch = new WeakMap();
const TrackingInfoPerFetchSymbol = Symbol.for('_DATA_EDEN_TRACKING_INFO_PER_FETCH');
const TrackingInfoPerFetch = (() => {
// in some bundling contexts (e.g. webpack as used by ember-auto-import) you might
// end up with multiple copies of this module in the final bundle. In that case
// we need to ensure that we have a single global tracking map. We do this by
// using a symbol that is the same across all copies, and then using that symbol
// to store the map on the global object.
//
// this ensures that at any given time (regardless of how many copies of this module exist)
// we can always get the same map (and therefore our API's work properly).
// TODO: figure out how to make this work without the casting `globalThis`
let _global = globalThis;
let trackingInfoPerFetch = _global[TrackingInfoPerFetchSymbol];
if (!trackingInfoPerFetch) {
trackingInfoPerFetch = _global[TrackingInfoPerFetchSymbol] = new WeakMap();
}
return trackingInfoPerFetch;
})();
const RequestsCompletedPromisesByToken = new WeakMap();

@@ -3,0 +20,0 @@ /**

4

package.json
{
"name": "@data-eden/network",
"version": "0.7.0",
"version": "0.7.1",
"repository": {

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

"devDependencies": {
"@data-eden/shared-test-utilities": "0.7.0",
"@data-eden/shared-test-utilities": "0.7.1",
"cross-fetch": "^3.1.5"

@@ -36,0 +36,0 @@ },

@@ -18,3 +18,27 @@ import type { MiddlewareMetadata, NormalizedFetch } from './fetch.js';

const TrackingInfoPerFetch: WeakMap<Fetch, FetchDebugInfo[]> = new WeakMap();
const TrackingInfoPerFetchSymbol = Symbol.for(
'_DATA_EDEN_TRACKING_INFO_PER_FETCH'
);
const TrackingInfoPerFetch: WeakMap<Fetch, FetchDebugInfo[]> = (() => {
// in some bundling contexts (e.g. webpack as used by ember-auto-import) you might
// end up with multiple copies of this module in the final bundle. In that case
// we need to ensure that we have a single global tracking map. We do this by
// using a symbol that is the same across all copies, and then using that symbol
// to store the map on the global object.
//
// this ensures that at any given time (regardless of how many copies of this module exist)
// we can always get the same map (and therefore our API's work properly).
// TODO: figure out how to make this work without the casting `globalThis`
let _global = globalThis as Record<string | symbol, unknown>;
let trackingInfoPerFetch = _global[TrackingInfoPerFetchSymbol];
if (!trackingInfoPerFetch) {
trackingInfoPerFetch = _global[TrackingInfoPerFetchSymbol] = new WeakMap();
}
return trackingInfoPerFetch as WeakMap<Fetch, FetchDebugInfo[]>;
})();
const RequestsCompletedPromisesByToken: WeakMap<Fetch, InternalDeferred> =

@@ -21,0 +45,0 @@ new WeakMap();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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