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

@parcel/utils

Package Overview
Dependencies
Maintainers
1
Versions
884
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.88 to 2.0.0-nightly.92

17

lib/getRootDir.js

@@ -8,2 +8,4 @@ "use strict";

var _glob = require("./glob");
const path = require('path');

@@ -16,2 +18,3 @@

let parsed = path.parse(file);
parsed.dir = findGlobRoot(parsed.dir);

@@ -40,2 +43,16 @@ if (!cur) {

return cur ? cur.dir : process.cwd();
} // Transforms a path like `packages/*/src/index.js` to the root of the glob, `packages/`
function findGlobRoot(dir) {
let parts = dir.split(path.sep);
let last = parts.length;
for (let i = parts.length - 1; i >= 0; i--) {
if ((0, _glob.isGlob)(parts[i])) {
last = i;
}
}
return parts.slice(0, last).join(path.sep);
}

12

package.json
{
"name": "@parcel/utils",
"version": "2.0.0-nightly.88+7f447bec",
"version": "2.0.0-nightly.92+c0655c56",
"description": "Blazing fast, zero configuration web application bundler",

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

"@iarna/toml": "^2.2.0",
"@parcel/codeframe": "2.0.0-nightly.88+7f447bec",
"@parcel/diagnostic": "2.0.0-nightly.88+7f447bec",
"@parcel/logger": "2.0.0-nightly.88+7f447bec",
"@parcel/markdown-ansi": "2.0.0-nightly.88+7f447bec",
"@parcel/codeframe": "2.0.0-nightly.92+c0655c56",
"@parcel/diagnostic": "2.0.0-nightly.92+c0655c56",
"@parcel/logger": "2.0.0-nightly.92+c0655c56",
"@parcel/markdown-ansi": "2.0.0-nightly.92+c0655c56",
"ansi-html": "^0.0.7",

@@ -44,3 +44,3 @@ "chalk": "^2.4.2",

},
"gitHead": "7f447bec1eaf6d16b64114658b0be67ae042bea5"
"gitHead": "c0655c56f7973492fdb28671029ddd923f17a244"
}
// @flow strict-local
import type {FilePath} from '@parcel/types';
import {isGlob} from './glob';

@@ -12,2 +13,3 @@ const path = require('path');

let parsed = path.parse(file);
parsed.dir = findGlobRoot(parsed.dir);
if (!cur) {

@@ -35,1 +37,14 @@ cur = parsed;

}
// Transforms a path like `packages/*/src/index.js` to the root of the glob, `packages/`
function findGlobRoot(dir: FilePath) {
let parts = dir.split(path.sep);
let last = parts.length;
for (let i = parts.length - 1; i >= 0; i--) {
if (isGlob(parts[i])) {
last = i;
}
}
return parts.slice(0, last).join(path.sep);
}
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