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

@parcel/utils

Package Overview
Dependencies
Maintainers
1
Versions
907
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parcel/utils - npm Package Compare versions

Comparing version 2.0.0-nightly.368 to 2.0.0-nightly.370

15

lib/collection.js

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

exports.unique = unique;
exports.flat = flat;
exports.flatMap = flatMap;

@@ -17,7 +18,17 @@ exports.objectSortedEntries = objectSortedEntries;

function flat(array) {
let out = [];
for (let v of array) {
out.push(...v);
}
return out;
}
function flatMap(array, projectFn) {
let out = [];
for (let arr of array.map(projectFn)) {
out.push(...arr);
for (let i = 0; i < array.length; i++) {
out.push(...projectFn(array[i], i, array));
}

@@ -24,0 +35,0 @@

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

exports.loadSourceMap = loadSourceMap;
exports.SOURCEMAP_EXTENSIONS = exports.SOURCEMAP_RE = void 0;

@@ -20,3 +21,6 @@ var _sourceMap = _interopRequireDefault(require("@parcel/source-map"));

const SOURCEMAP_RE = /(?:\/\*|\/\/)\s*[@#]\s*sourceMappingURL\s*=\s*([^\s*]+)(?:\s*\*\/)?\s*$/;
exports.SOURCEMAP_RE = SOURCEMAP_RE;
const DATA_URL_RE = /^data:[^;]+(?:;charset=[^;]+)?;base64,(.*)/;
const SOURCEMAP_EXTENSIONS = new Set(['js', 'jsx', 'mjs', 'es', 'es6', 'css']);
exports.SOURCEMAP_EXTENSIONS = SOURCEMAP_EXTENSIONS;

@@ -23,0 +27,0 @@ function matchSourceMappingURL(contents) {

12

package.json
{
"name": "@parcel/utils",
"version": "2.0.0-nightly.368+803ec970",
"version": "2.0.0-nightly.370+771715b9",
"description": "Blazing fast, zero configuration web application bundler",

@@ -24,6 +24,6 @@ "license": "MIT",

"@iarna/toml": "^2.2.0",
"@parcel/codeframe": "2.0.0-nightly.368+803ec970",
"@parcel/diagnostic": "2.0.0-nightly.368+803ec970",
"@parcel/logger": "2.0.0-nightly.368+803ec970",
"@parcel/markdown-ansi": "2.0.0-nightly.368+803ec970",
"@parcel/codeframe": "2.0.0-nightly.370+771715b9",
"@parcel/diagnostic": "2.0.0-nightly.370+771715b9",
"@parcel/logger": "2.0.0-nightly.370+771715b9",
"@parcel/markdown-ansi": "2.0.0-nightly.370+771715b9",
"@parcel/source-map": "2.0.0-alpha.4.13",

@@ -50,3 +50,3 @@ "ansi-html": "^0.0.7",

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

@@ -7,2 +7,10 @@ // @flow strict-local

export function flat<T>(array: $ReadOnlyArray<$ReadOnlyArray<T>>): Array<T> {
let out = [];
for (let v of array) {
out.push(...v);
}
return out;
}
export function flatMap<T, U>(

@@ -14,4 +22,4 @@ array: Array<T>,

for (let arr of array.map(projectFn)) {
out.push(...arr);
for (let i = 0; i < array.length; i++) {
out.push(...projectFn(array[i], i, array));
}

@@ -18,0 +26,0 @@ return out;

@@ -7,4 +7,12 @@ // @flow

const SOURCEMAP_RE = /(?:\/\*|\/\/)\s*[@#]\s*sourceMappingURL\s*=\s*([^\s*]+)(?:\s*\*\/)?\s*$/;
export const SOURCEMAP_RE: RegExp = /(?:\/\*|\/\/)\s*[@#]\s*sourceMappingURL\s*=\s*([^\s*]+)(?:\s*\*\/)?\s*$/;
const DATA_URL_RE = /^data:[^;]+(?:;charset=[^;]+)?;base64,(.*)/;
export const SOURCEMAP_EXTENSIONS: Set<string> = new Set<string>([
'js',
'jsx',
'mjs',
'es',
'es6',
'css',
]);

@@ -11,0 +19,0 @@ export function matchSourceMappingURL(

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