0.1.1 • Published 11 months ago

@altano/repository-tools v0.1.1

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

repository-tools

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

This is a dual ESM/CJS package, and publishes both a top-level module with all exports, and sub-path exports. So feel free to import using any of the following:

Your package typeUsing sub-path exportsImport to use
ESMNoimport { findRoot } from "@altano/repository-tools";
ESMYesimport { findRoot } from "@altano/repository-tools/findRoot.js";
CJSNoconst { findRoot } = require("@altano/repository-tools")
CJSYesconst { findRoot } = require("@altano/repository-tools/findSync.cjs")

Contributing

This is a dual ESM/CJS package which is really hard to get right. Manually run pnpm build && pnpm dlx @arethetypeswrong/cli --pack before making any changes that would affect the build, packaging, or publishing.

0.1.0

11 months ago

0.1.1

11 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago