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

@atlaspack/core

Package Overview
Dependencies
Maintainers
0
Versions
299
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaspack/core - npm Package Compare versions

Comparing version 2.13.1-canary.3630 to 2.13.1-canary.3631

lib/IdentifierRegistry.js

8

lib/assetUtils.js

@@ -68,5 +68,6 @@ "use strict";

}
var _IdentifierRegistry = require("./IdentifierRegistry");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createAssetIdFromOptions(options) {
return (0, _rust().createAssetId)({
const data = {
environmentId: options.env.id,

@@ -79,3 +80,6 @@ filePath: options.filePath,

fileType: options.type
});
};
const id = (0, _rust().createAssetId)(data);
_IdentifierRegistry.identifierRegistry.addIdentifier('asset', id, data);
return id;
}

@@ -82,0 +86,0 @@ function createAsset(projectRoot, options) {

@@ -26,2 +26,3 @@ "use strict";

}
var _IdentifierRegistry = require("./IdentifierRegistry");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -52,3 +53,5 @@ function createDependencyId({

};
return (0, _rust().createDependencyId)(params);
const id = (0, _rust().createDependencyId)(params);
_IdentifierRegistry.identifierRegistry.addIdentifier('dependency', id, params);
return id;
}

@@ -55,0 +58,0 @@ function createDependency(projectRoot, opts) {

@@ -17,2 +17,3 @@ "use strict";

var _Environment = _interopRequireWildcard(require("./public/Environment"));
var _IdentifierRegistry = require("./IdentifierRegistry");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }

@@ -130,3 +131,3 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }

function getEnvironmentHash(env) {
return (0, _rust().createEnvironmentId)({
const data = {
context: env.context,

@@ -141,3 +142,6 @@ engines: env.engines,

sourceMap: env.sourceMap
});
};
const id = (0, _rust().createEnvironmentId)(data);
_IdentifierRegistry.identifierRegistry.addIdentifier('environment', id, data);
return id;
}

@@ -40,5 +40,17 @@ "use strict";

var _BundleGroup = _interopRequireWildcard(require("./BundleGroup"));
var _IdentifierRegistry = require("../IdentifierRegistry");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createBundleId(data) {
const {
entryAssetId,
uniqueKey,
distDir,
bundleBehavior
} = data;
const id = (0, _rust().hashString)(`bundle:${String(entryAssetId != null ? entryAssetId : uniqueKey)}${(0, _projectPath.fromProjectPathRelative)(distDir)}${bundleBehavior ?? ''}`);
_IdentifierRegistry.identifierRegistry.addIdentifier('bundle', id, data);
return id;
}
class MutableBundleGraph extends _BundleGraph.default {

@@ -115,3 +127,8 @@ #graph /*: InternalBundleGraph */;

let target = (0, _Target.targetToInternalTarget)(opts.target);
let bundleId = (0, _rust().hashString)('bundle:' + (opts.entryAsset ? opts.entryAsset.id : opts.uniqueKey) + (0, _projectPath.fromProjectPathRelative)(target.distDir) + (opts.bundleBehavior ?? ''));
let bundleId = createBundleId({
entryAssetId: (entryAsset === null || entryAsset === void 0 ? void 0 : entryAsset.id) ?? null,
uniqueKey: opts.uniqueKey ?? null,
distDir: target.distDir,
bundleBehavior: opts.bundleBehavior ?? null
});
let existing = this.#graph._graph.getNodeByContentKey(bundleId);

@@ -118,0 +135,0 @@ if (existing != null) {

{
"name": "@atlaspack/core",
"version": "2.13.1-canary.3630+10a6f37ef",
"version": "2.13.1-canary.3631+64cd5e9ae",
"license": "(MIT OR Apache-2.0)",

@@ -23,17 +23,17 @@ "publishConfig": {

"dependencies": {
"@atlaspack/build-cache": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/cache": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/diagnostic": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/events": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/feature-flags": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/fs": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/graph": "3.3.1-canary.3630+10a6f37ef",
"@atlaspack/logger": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/package-manager": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/plugin": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/profiler": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/rust": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/types": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/utils": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/workers": "2.13.1-canary.3630+10a6f37ef",
"@atlaspack/build-cache": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/cache": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/diagnostic": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/events": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/feature-flags": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/fs": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/graph": "3.3.1-canary.3631+64cd5e9ae",
"@atlaspack/logger": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/package-manager": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/plugin": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/profiler": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/rust": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/types": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/utils": "2.13.1-canary.3631+64cd5e9ae",
"@atlaspack/workers": "2.13.1-canary.3631+64cd5e9ae",
"@mischnic/json-sourcemap": "^0.1.0",

@@ -70,3 +70,3 @@ "@parcel/source-map": "^2.1.1",

},
"gitHead": "10a6f37ef063d0227ebb26310383e899dbd9b1e6"
"gitHead": "64cd5e9ae573dbf0bee64488c7cf2026f991a1ed"
}

@@ -42,2 +42,3 @@ // @flow strict-local

import {PluginTracer} from '@atlaspack/profiler';
import {identifierRegistry} from './IdentifierRegistry';

@@ -73,3 +74,3 @@ export type AssetOptions = {|

export function createAssetIdFromOptions(options: AssetOptions): string {
return createAssetIdRust({
const data = {
environmentId: options.env.id,

@@ -82,3 +83,6 @@ filePath: options.filePath,

fileType: options.type,
});
};
const id = createAssetIdRust(data);
identifierRegistry.addIdentifier('asset', id, data);
return id;
}

@@ -85,0 +89,0 @@

@@ -23,2 +23,3 @@ // @flow

import assert from 'assert';
import {identifierRegistry} from './IdentifierRegistry';

@@ -84,3 +85,5 @@ type DependencyOpts = {|

};
return createDependencyIdRust(params);
const id = createDependencyIdRust(params);
identifierRegistry.addIdentifier('dependency', id, params);
return id;
}

@@ -87,0 +90,0 @@

@@ -12,2 +12,3 @@ // @flow

import {environmentToInternalEnvironment} from './public/Environment';
import {identifierRegistry} from './IdentifierRegistry';

@@ -141,3 +142,3 @@ const DEFAULT_ENGINES = {

function getEnvironmentHash(env: Environment): string {
return createEnvironmentId({
const data = {
context: env.context,

@@ -152,3 +153,6 @@ engines: env.engines,

sourceMap: env.sourceMap,
});
};
const id = createEnvironmentId(data);
identifierRegistry.addIdentifier('environment', id, data);
return id;
}

@@ -33,3 +33,21 @@ // @flow strict-local

import BundleGroup, {bundleGroupToInternalBundleGroup} from './BundleGroup';
import type {ProjectPath} from '../projectPath';
import {identifierRegistry} from '../IdentifierRegistry';
function createBundleId(data: {|
entryAssetId: string | null,
uniqueKey: string | null,
distDir: ProjectPath,
bundleBehavior: string | null,
|}): string {
const {entryAssetId, uniqueKey, distDir, bundleBehavior} = data;
const id = hashString(
`bundle:${String(
entryAssetId != null ? entryAssetId : uniqueKey,
)}${fromProjectPathRelative(distDir)}${bundleBehavior ?? ''}`,
);
identifierRegistry.addIdentifier('bundle', id, data);
return id;
}
export default class MutableBundleGraph

@@ -185,8 +203,8 @@ extends BundleGraph<IBundle>

let target = targetToInternalTarget(opts.target);
let bundleId = hashString(
'bundle:' +
(opts.entryAsset ? opts.entryAsset.id : opts.uniqueKey) +
fromProjectPathRelative(target.distDir) +
(opts.bundleBehavior ?? ''),
);
let bundleId = createBundleId({
entryAssetId: entryAsset?.id ?? null,
uniqueKey: opts.uniqueKey ?? null,
distDir: target.distDir,
bundleBehavior: opts.bundleBehavior ?? null,
});

@@ -193,0 +211,0 @@ let existing = this.#graph._graph.getNodeByContentKey(bundleId);

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