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

@parcel/core

Package Overview
Dependencies
Maintainers
1
Versions
897
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.366 to 2.0.0-nightly.368

7

lib/Transformation.js

@@ -109,3 +109,8 @@ "use strict";

});
let asset = await this.loadAsset();
let asset = await this.loadAsset(); // Load existing sourcemaps
if (_utils.SOURCEMAP_EXTENSIONS.has(asset.value.type)) {
await asset.loadExistingSourcemap();
}
let pipeline = await this.loadPipeline(this.request.filePath, asset.value.isSource, this.request);

@@ -112,0 +117,0 @@ let results = await this.runPipelines(pipeline, asset);

@@ -160,2 +160,22 @@ "use strict";

async loadExistingSourcemap() {
if (this.map) {
return this.map;
}
let code = await this.getCode();
let map = await (0, _utils.loadSourceMap)(this.value.filePath, code, {
fs: this.options.inputFS,
projectRoot: this.options.projectRoot
});
if (map) {
this.map = map;
this.mapBuffer = map.toBuffer();
this.setCode(code.replace(_utils.SOURCEMAP_RE, ''));
}
return this.map;
}
getMapBuffer() {

@@ -162,0 +182,0 @@ return Promise.resolve(this.mapBuffer);

24

package.json
{
"name": "@parcel/core",
"version": "2.0.0-nightly.366+803ec970",
"version": "2.0.0-nightly.368+771715b9",
"license": "MIT",

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

"dependencies": {
"@parcel/cache": "2.0.0-nightly.368+803ec970",
"@parcel/diagnostic": "2.0.0-nightly.368+803ec970",
"@parcel/events": "2.0.0-nightly.368+803ec970",
"@parcel/fs": "2.0.0-nightly.368+803ec970",
"@parcel/logger": "2.0.0-nightly.368+803ec970",
"@parcel/package-manager": "2.0.0-nightly.368+803ec970",
"@parcel/plugin": "2.0.0-nightly.368+803ec970",
"@parcel/cache": "2.0.0-nightly.370+771715b9",
"@parcel/diagnostic": "2.0.0-nightly.370+771715b9",
"@parcel/events": "2.0.0-nightly.370+771715b9",
"@parcel/fs": "2.0.0-nightly.370+771715b9",
"@parcel/logger": "2.0.0-nightly.370+771715b9",
"@parcel/package-manager": "2.0.0-nightly.370+771715b9",
"@parcel/plugin": "2.0.0-nightly.370+771715b9",
"@parcel/source-map": "2.0.0-alpha.4.13",
"@parcel/types": "2.0.0-nightly.368+803ec970",
"@parcel/utils": "2.0.0-nightly.368+803ec970",
"@parcel/workers": "2.0.0-nightly.368+803ec970",
"@parcel/types": "2.0.0-nightly.370+771715b9",
"@parcel/utils": "2.0.0-nightly.370+771715b9",
"@parcel/workers": "2.0.0-nightly.370+771715b9",
"abortcontroller-polyfill": "^1.1.9",

@@ -52,3 +52,3 @@ "base-x": "^3.0.8",

},
"gitHead": "803ec9700bdd384b5b8bfedd41f2398494094776"
"gitHead": "771715b9e41021a4867715d94e7fc46f93d0303a"
}

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

import ThrowableDiagnostic, {errorToDiagnostic} from '@parcel/diagnostic';
import {SOURCEMAP_EXTENSIONS} from '@parcel/utils';

@@ -117,2 +118,7 @@ import ConfigLoader from './ConfigLoader';

// Load existing sourcemaps
if (SOURCEMAP_EXTENSIONS.has(asset.value.type)) {
await asset.loadExistingSourcemap();
}
let pipeline = await this.loadPipeline(

@@ -119,0 +125,0 @@ this.request.filePath,

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

TapStream,
loadSourceMap,
SOURCEMAP_RE,
} from '@parcel/utils';

@@ -186,2 +188,22 @@ import {createDependency, mergeDependencies} from './Dependency';

async loadExistingSourcemap(): Promise<?SourceMap> {
if (this.map) {
return this.map;
}
let code = await this.getCode();
let map = await loadSourceMap(this.value.filePath, code, {
fs: this.options.inputFS,
projectRoot: this.options.projectRoot,
});
if (map) {
this.map = map;
this.mapBuffer = map.toBuffer();
this.setCode(code.replace(SOURCEMAP_RE, ''));
}
return this.map;
}
getMapBuffer(): Promise<?Buffer> {

@@ -188,0 +210,0 @@ return Promise.resolve(this.mapBuffer);

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