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 2.5.1 to 2.6.0

0

dist/index.d.ts

@@ -0,0 +0,0 @@ export * from './lib/pathy.js';

@@ -0,0 +0,0 @@ export * from './lib/pathy.js';

2

dist/lib/pathy.d.ts

@@ -267,3 +267,3 @@ /// <reference types="node" resolution-mode="require"/>

*/
static asInstance(stringOrInstance: string | Pathy | undefined): Pathy<unknown>;
static asInstance<T = unknown>(stringOrInstance: string | Pathy | undefined): Pathy<T>;
static isString(thing: any): thing is string;

@@ -270,0 +270,0 @@ static isPathy(thing: any): thing is Pathy;

@@ -341,3 +341,3 @@ import { __decorate, __metadata } from "tslib";

const fromPattern = arrayWrapped(from).map(ensureDot).join('|');
newPath = newPath.replace(new RegExp(`(${fromPattern})$`), newPath);
newPath = newPath.replace(new RegExp(`(${fromPattern})$`), newExtension);
}

@@ -344,0 +344,0 @@ return new Pathy(newPath, this.workingDirectory);

export declare const trace: import("@bscotch/utility/browser").Decorator<any, any>;
//# sourceMappingURL=pathy.lib.d.ts.map
import { Trace } from '@bscotch/utility/browser';
export const trace = Trace('@bscotch');
//# sourceMappingURL=pathy.lib.js.map

@@ -57,2 +57,3 @@ /// <reference types="node" resolution-mode="require"/>

static explode(path: PathyOrString): string[];
static compare(path1: PathyOrString, path2: PathyOrString): number;
/**

@@ -59,0 +60,0 @@ * Get all parent paths eventually leading to a given

@@ -120,2 +120,15 @@ import { __decorate, __metadata } from "tslib";

}
static compare(path1, path2) {
const path1Parts = PathyStatic.explode(path1);
const path2Parts = PathyStatic.explode(path2);
const minParts = Math.min(path1Parts.length, path2Parts.length);
for (let i = 0; i < minParts; i++) {
const part1 = path1Parts[i];
const part2 = path2Parts[i];
if (part1 !== part2) {
return part1.localeCompare(part2);
}
}
return path1Parts.length - path2Parts.length;
}
/**

@@ -253,2 +266,3 @@ * Get all parent paths eventually leading to a given

static async listChildrenRecursively(dir, options = {}) {
await dir.isDirectory({ assert: true });
const _children = [];

@@ -255,0 +269,0 @@ const addChild = (child) => {

export {};
//# sourceMappingURL=pathy.test.d.ts.map

@@ -0,0 +0,0 @@ /// <reference types="node" resolution-mode="require"/>

export {};
//# sourceMappingURL=pathy.types.js.map
{
"name": "@bscotch/pathy",
"version": "2.5.1",
"version": "2.6.0",
"type": "module",

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

"dependencies": {
"@bscotch/utility": "6.7.0",
"fs-extra": "10.1.0",
"json5": "^2.2.1",
"tslib": "^2.4.0",
"yaml": "2.1.3"
"fs-extra": "11.1.0",
"json5": "^2.2.3",
"tslib": "^2.4.1",
"yaml": "2.2.1",
"@bscotch/utility": "6.8.0"
},
"devDependencies": {
"@local/helpers": "0.0.0",
"@types/chai": "^4.3.3",
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^10.0.0",
"chai": "^4.3.6",
"mocha": "^10.1.0",
"rimraf": "^3.0.2",
"type-fest": "^3.0.0",
"typescript": "4.9.1-beta",
"zod": "3.19.1"
"@types/chai": "^4.3.4",
"@types/fs-extra": "^11.0.1",
"@types/mocha": "^10.0.1",
"chai": "^4.3.7",
"mocha": "^10.2.0",
"rimraf": "^4.1.0",
"type-fest": "^3.5.2",
"typescript": "4.9.4",
"zod": "^3.20.2",
"@local/helpers": "0.0.0"
},

@@ -33,0 +33,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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