1.0.1 • Published 7 months ago

@altano/repository-tools v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

repository-tools

npm Typed with TypeScript ESM only

Misc tools for dealing with repositories of multiple version control systems

Supported Version Control Systems

  • git
  • mercurial
  • sapling
  • subversion

Tools

findRootSync

Given a path inside a repository, find the path of the root

Example:

findRootSync("/my-git-repo/some/subdirectory"); // => "/my-git-repo"

Example:

await findRoot("/my-git-repo/some/subdirectory"); // => "/my-git-repo"

Importing

NOTE: As of v1.0.0 this is an ESM-only module package. It can be imported as an ESM module from any Node.js version but if requiring this package from a CJS package, you must use Node.js v20.19.0+ or v22.12.0+. If you get a ERR_REQUIRE_ESM error when calling require("@altano/repository-tools") make sure you're on a new enough version of Node.js.

You may import all the tools, or import functions directly:

Using sub-path exportsImport to use
Noimport { findRoot } from "@altano/repository-tools";
Yesimport { findRoot } from "@altano/repository-tools/findRoot.js";
1.0.1

7 months ago

1.0.0

7 months ago

0.1.0

1 year ago

0.1.1

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

2 years ago