eserstack Tool — eser/stack on GitHub Install:
pnpm add @eserstack/codebase
@eserstack/codebase holds the git, package config and workspace discovery
helpers of eserstack, and the TypeScript types of the codebase native
functions. The validators, git hooks, release, changelog, GitHub and commit
message commands are Go: run them as eser codebase <command>, documented in
cmd/eser.
import * as codebase from "@eserstack/codebase";
// Git operations
const commits = await codebase.getCommitsBetween("v1.0.0", "HEAD");
const branch = await codebase.getCurrentBranch();
// Workspace discovery
const packages = await codebase.discoverPackages(".");| Export | What it holds |
|---|---|
. and ./mod |
The git, package config and workspace discovery functions below |
./git |
Commits between refs, branches, tags, staging, commit and push |
./package |
Load, update and sync the fields of package.json files |
./workspace-discovery |
Workspace packages and their entry points |
./native-functions |
Input and output types of the codebase native functions (fromNative) |
./native-functions is generated by go run ./cmd/eser codebase native-types
from the Go functions in pkg/ajan/codebasefx; call them through fromNative
of @eserstack/functions/native.
./cli-support re-exports
@eserstack/shell/cli-support,
and ./directive-analysis is a copy of the one in @eserstack/laroux-bundler.
Import them from those packages; both exports are removed in 6.0.0.
The TypeScript commands and validators of this package are removed; the Go
eser runs the same commands with the same flags and manifest options.
// Before: the validators from code
import * as validation from "@eserstack/codebase/validation";
await validation.validate({ root: "." });# After: the Go eser (npm install -g eser, or npx eser) runs one validator, or
# every validator step of .eser/manifest.yml
npx eser codebase validate-eof --fix
npx eser workflows run -e precommitThe removed exports are ./module, ./validation, ./install, ./release,
./versions, ./changelog-gen, ./release-notes, ./release-tag, ./gh,
./gh-contributors, ./commitmsg, ./file-tool, ./file-tools-shared,
./walk-stream, ./validate-stream, ./npm-externals,
./npm-workspace-specifiers and every ./validate-*. The package root is the
library (./mod) instead of the CLI.
🔗 For further details, visit the eserstack repository.