Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@parcel/core

Package Overview
Dependencies
Maintainers
1
Versions
889
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/core - npm Package Compare versions

Comparing version 2.0.0-nightly.293 to 2.0.0-nightly.296

5

lib/PackagerRunner.js

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

file: _path.default.basename(filePath + '.map'),
// $FlowFixMe
fs: this.options.inputFS,

@@ -363,5 +364,5 @@ rootDir: this.options.projectRoot,

let filePath = (0, _nullthrows.default)(bundle.filePath);
let thisHashReference = bundle.hashReference;
let thisHashReference = bundle.hashReference; // Without content hashing, the hash reference is already the correct id
if (filePath.includes(thisHashReference)) {
if (this.options.contentHash && filePath.includes(thisHashReference)) {
let thisNameHash = (0, _nullthrows.default)(hashRefToNameHash.get(thisHashReference));

@@ -368,0 +369,0 @@ filePath = filePath.replace(thisHashReference, thisNameHash);

2

lib/public/MutableBundleGraph.js

@@ -145,3 +145,3 @@ "use strict";

id: bundleId,
hashReference: _constants.HASH_REF_PREFIX + bundleId,
hashReference: _classPrivateFieldGet(this, _options).contentHash ? _constants.HASH_REF_PREFIX + bundleId : bundleId.slice(0, 8),
type: (_opts$type = opts.type) !== null && _opts$type !== void 0 ? _opts$type : (0, _nullthrows.default)(entryAsset).type,

@@ -148,0 +148,0 @@ env: opts.env ? (0, _Environment.environmentToInternalEnvironment)(opts.env) : (0, _nullthrows.default)(entryAsset).env,

@@ -31,3 +31,3 @@ "use strict";

async function resolveOptions(initialOptions) {
var _initialOptions$mode, _initialOptions$minif, _initialOptions$publi, _initialOptions$patch, _initialOptions$env, _initialOptions$autoi, _initialOptions$hot, _initialOptions$disab, _initialOptions$killW, _initialOptions$profi, _initialOptions$sourc, _initialOptions$scope, _initialOptions$logLe;
var _initialOptions$mode, _initialOptions$minif, _initialOptions$publi, _initialOptions$patch, _initialOptions$env, _initialOptions$autoi, _initialOptions$hot, _initialOptions$conte, _initialOptions$disab, _initialOptions$killW, _initialOptions$profi, _initialOptions$sourc, _initialOptions$scope, _initialOptions$logLe;

@@ -89,2 +89,3 @@ let entries;

hot: (_initialOptions$hot = initialOptions.hot) !== null && _initialOptions$hot !== void 0 ? _initialOptions$hot : null,
contentHash: (_initialOptions$conte = initialOptions.contentHash) !== null && _initialOptions$conte !== void 0 ? _initialOptions$conte : initialOptions.mode === 'production',
serve: initialOptions.serve ? { ...initialOptions.serve,

@@ -91,0 +92,0 @@ distDir: distDir !== null && distDir !== void 0 ? distDir : _path.default.join(outputCwd, 'dist')

@@ -159,3 +159,3 @@ "use strict";

let dir = dependency.sourcePath ? (0, _utils.escapeMarkdown)((0, _utils.relatifyPath)(this.options.projectRoot, dependency.sourcePath)) : '';
let dir = dependency.sourcePath ? (0, _utils.escapeMarkdown)((0, _utils.relativePath)(this.options.projectRoot, dependency.sourcePath)) : '';
let specifier = (0, _utils.escapeMarkdown)(dependency.moduleSpecifier || '');

@@ -162,0 +162,0 @@ let err = await this.getThrowableDiagnostic(dependency, `Failed to resolve '${specifier}' ${dir ? `from '${dir}'` : ''}`); // Merge resolver errors

@@ -165,3 +165,3 @@ "use strict";

let idBase = code != null ? hash : _path.default.relative(this.options.projectRoot, filePath).replace(/[\\/]+/g, '/');
let idBase = code != null ? hash : (0, _utils.normalizeSeparators)(_path.default.relative(this.options.projectRoot, filePath));
return new _UncommittedAsset.default({

@@ -168,0 +168,0 @@ idBase,

@@ -195,3 +195,3 @@ "use strict";

let idBase = code != null ? hash : _path.default.relative(this.options.projectRoot, filePath).replace(/[\\/]+/g, '/');
let idBase = code != null ? hash : (0, _utils.normalizeSeparators)(_path.default.relative(this.options.projectRoot, filePath));
return new _UncommittedAsset.default({

@@ -198,0 +198,0 @@ idBase,

{
"name": "@parcel/core",
"version": "2.0.0-nightly.293+3f9c496b",
"version": "2.0.0-nightly.296+8fdd6193",
"license": "MIT",

@@ -19,13 +19,13 @@ "publishConfig": {

"dependencies": {
"@parcel/cache": "2.0.0-nightly.295+3f9c496b",
"@parcel/diagnostic": "2.0.0-nightly.295+3f9c496b",
"@parcel/events": "2.0.0-nightly.295+3f9c496b",
"@parcel/fs": "2.0.0-nightly.295+3f9c496b",
"@parcel/logger": "2.0.0-nightly.295+3f9c496b",
"@parcel/package-manager": "2.0.0-nightly.295+3f9c496b",
"@parcel/plugin": "2.0.0-nightly.295+3f9c496b",
"@parcel/source-map": "2.0.0-alpha.4.11",
"@parcel/types": "2.0.0-nightly.295+3f9c496b",
"@parcel/utils": "2.0.0-nightly.295+3f9c496b",
"@parcel/workers": "2.0.0-nightly.295+3f9c496b",
"@parcel/cache": "2.0.0-nightly.298+8fdd6193",
"@parcel/diagnostic": "2.0.0-nightly.298+8fdd6193",
"@parcel/events": "2.0.0-nightly.298+8fdd6193",
"@parcel/fs": "2.0.0-nightly.298+8fdd6193",
"@parcel/logger": "2.0.0-nightly.298+8fdd6193",
"@parcel/package-manager": "2.0.0-nightly.298+8fdd6193",
"@parcel/plugin": "2.0.0-nightly.298+8fdd6193",
"@parcel/source-map": "2.0.0-alpha.4.13",
"@parcel/types": "2.0.0-nightly.298+8fdd6193",
"@parcel/utils": "2.0.0-nightly.298+8fdd6193",
"@parcel/workers": "2.0.0-nightly.298+8fdd6193",
"abortcontroller-polyfill": "^1.1.9",

@@ -46,3 +46,3 @@ "browserslist": "^4.6.6",

},
"gitHead": "3f9c496b1ee7c72a4c051e903001462ce6eef449"
"gitHead": "8fdd6193a20d0e82e7639115fe31dd0ff145589b"
}

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

file: path.basename(mapFilename),
// $FlowFixMe
fs: this.options.inputFS,

@@ -432,3 +433,4 @@ rootDir: this.options.projectRoot,

let thisHashReference = bundle.hashReference;
if (filePath.includes(thisHashReference)) {
// Without content hashing, the hash reference is already the correct id
if (this.options.contentHash && filePath.includes(thisHashReference)) {
let thisNameHash = nullthrows(hashRefToNameHash.get(thisHashReference));

@@ -435,0 +437,0 @@ filePath = filePath.replace(thisHashReference, thisNameHash);

@@ -143,3 +143,5 @@ // @flow strict-local

id: bundleId,
hashReference: HASH_REF_PREFIX + bundleId,
hashReference: this.#options.contentHash
? HASH_REF_PREFIX + bundleId
: bundleId.slice(0, 8),
type: opts.type ?? nullthrows(entryAsset).type,

@@ -146,0 +148,0 @@ env: opts.env

@@ -108,2 +108,4 @@ // @flow strict-local

hot: initialOptions.hot ?? null,
contentHash:
initialOptions.contentHash ?? initialOptions.mode === 'production',
serve: initialOptions.serve

@@ -110,0 +112,0 @@ ? {

@@ -8,3 +8,3 @@ // @flow

import {PluginLogger} from '@parcel/logger';
import {relatifyPath} from '@parcel/utils';
import {relativePath} from '@parcel/utils';
import ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';

@@ -145,3 +145,3 @@ import path from 'path';

? escapeMarkdown(
relatifyPath(this.options.projectRoot, dependency.sourcePath),
relativePath(this.options.projectRoot, dependency.sourcePath),
)

@@ -148,0 +148,0 @@ : '';

@@ -23,3 +23,3 @@ // @flow strict-local

import nullthrows from 'nullthrows';
import {md5FromObject} from '@parcel/utils';
import {md5FromObject, normalizeSeparators} from '@parcel/utils';
import {PluginLogger} from '@parcel/logger';

@@ -167,5 +167,5 @@ import {init as initSourcemaps} from '@parcel/source-map';

? hash
: path
.relative(this.options.projectRoot, filePath)
.replace(/[\\/]+/g, '/');
: normalizeSeparators(
path.relative(this.options.projectRoot, filePath),
);
return new UncommittedAsset({

@@ -172,0 +172,0 @@ idBase,

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

hot: ?HMROptions,
contentHash: boolean,
serve: ServerOptions | false,

@@ -152,0 +153,0 @@ autoinstall: boolean,

@@ -14,3 +14,3 @@ // @flow strict-local

import path from 'path';
import {resolveConfig} from '@parcel/utils';
import {resolveConfig, normalizeSeparators} from '@parcel/utils';
import logger, {PluginLogger} from '@parcel/logger';

@@ -198,5 +198,5 @@ import ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';

? hash
: path
.relative(this.options.projectRoot, filePath)
.replace(/[\\/]+/g, '/');
: normalizeSeparators(
path.relative(this.options.projectRoot, filePath),
);
return new UncommittedAsset({

@@ -203,0 +203,0 @@ idBase,

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

hot: undefined,
contentHash: true,
serve: false,

@@ -25,0 +26,0 @@ mode: 'development',

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