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

@bscotch/pathy

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscotch/pathy - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

19

dist/lib/pathy.static.js
import { __decorate, __metadata } from "tslib";
import { stringIsMatch } from '@bscotch/utility';
import { arrayIsDuplicates, stringIsMatch } from '@bscotch/utility';
import { ok } from 'assert';

@@ -202,3 +202,16 @@ import fse from 'fs-extra';

static equals(firstPath, otherPath) {
return (PathyStatic.normalize(firstPath) === PathyStatic.normalize(otherPath));
// If one path has a cwd and the other does
// not, assume the same cwd for the other
const cwds = [firstPath, otherPath]
.map((p) => (typeof p === 'string' ? undefined : p.workingDirectory))
.filter((x) => x);
const cwd = arrayIsDuplicates(cwds) && cwds[0];
const normalized = [firstPath, otherPath].map((p) => {
p = PathyStatic.normalize(p);
if (cwd) {
p = PathyStatic.resolve(cwd, p);
}
return p;
});
return normalized[0] === normalized[1];
}

@@ -373,3 +386,3 @@ /**

}
fse.ensureDir(nodePath.dirname(filepath));
await fse.ensureDir(nodePath.dirname(filepath));
let serialized;

@@ -376,0 +389,0 @@ if (typeof options?.serialize == 'function') {

4

package.json
{
"name": "@bscotch/pathy",
"version": "0.3.1",
"version": "0.4.0",
"type": "module",

@@ -19,3 +19,3 @@ "exports": {

"dependencies": {
"@bscotch/utility": "^5.0.0",
"@bscotch/utility": "^5.1.0",
"chai": "^4.3.6",

@@ -22,0 +22,0 @@ "fs-extra": "^10.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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