monoban 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,6 +29,7 @@ monoban schedule MON-12 fri # plan it for a day: tomorrow, next week,
29
29
  monoban start MON-12 # in the repo: check out mon-12-title (from the commit you're on), move it to In progress
30
30
  monoban move MON-12 in-progress # columns match loosely: any case, a unique prefix
31
31
  monoban move MON-12 --to WEB # to another project (MON-12 becomes WEB-7); add a column to choose it
32
+ monoban move MON-12 todo --if-column-since 2026-10-14T10:00:00Z # only if it's been in its column since then
32
33
  monoban done MON-12
33
34
  monoban edit MON-12 # title and description in $EDITOR (or --title, -d, no editor)
34
35
  monoban tag MON-12 bug ui # untag MON-12 bug takes one off; list --tag bug filters
package/dist/index.mjs CHANGED
@@ -7327,7 +7327,7 @@ strictObject({ email: email().max(254).meta({ example: "ada@example.com" }) }).m
7327
7327
  //#endregion
7328
7328
  //#region src/version.ts
7329
7329
  /** This CLI's version, from package.json (set at build time by tsdown, and by vitest in tests). */
7330
- const VERSION = "1.3.0";
7330
+ const VERSION = "1.4.0";
7331
7331
  /** Sent as X-Monoban-Client, and shown in Devices & tokens. */
7332
7332
  const CLIENT = `cli/${VERSION}`;
7333
7333
  //#endregion
@@ -11773,6 +11773,7 @@ async function tags(ctx, options) {
11773
11773
  async function move(ctx, ref, columnQuery, options) {
11774
11774
  const api = apis(ctx).signedIn;
11775
11775
  const task = await taskByRef(api, ref, ctx);
11776
+ if (options.ifColumnSince !== void 0) unmovedSince(task, options.ifColumnSince);
11776
11777
  const { key } = taskRefOf(task.ref);
11777
11778
  const to = options.to?.trim().toUpperCase();
11778
11779
  if (to && to !== key) return transfer(ctx, api, task, to, columnQuery, options);
@@ -11783,6 +11784,15 @@ async function move(ctx, ref, columnQuery, options) {
11783
11784
  const columns = await columnsOf(api, key);
11784
11785
  await moveTo(ctx, api, task, columns, findColumn(columns, columnQuery), options);
11785
11786
  }
11787
+ /**
11788
+ * --if-column-since: only a task still in the column it arrived in at `since` (its columnSince then). The
11789
+ * write that follows carries the version this read saw, so a move in between is a 412 too.
11790
+ */
11791
+ function unmovedSince(task, since) {
11792
+ const at = Date.parse(since);
11793
+ if (Number.isNaN(at)) throw new CliError(`--if-column-since takes a time like 2026-10-14T10:00:00Z (a task's columnSince).`, EXIT.usage);
11794
+ if (Date.parse(task.columnSince) !== at) throw new CliError(`${task.ref} changed elsewhere in the meantime: it has been in its column since ${task.columnSince}, not ${since}.`);
11795
+ }
11786
11796
  /** Moves a task to project `to` (its column `columnQuery`, if given). */
11787
11797
  async function transfer(ctx, api, task, to, columnQuery, options) {
11788
11798
  const columns = await columnsOf(api, to);
@@ -12749,7 +12759,7 @@ async function latestVersion(ctx) {
12749
12759
  async function upgrade(ctx, options, kind = thisInstall()) {
12750
12760
  const latest = await latestVersion(ctx);
12751
12761
  const { how, command } = UPGRADE[kind];
12752
- const outdated = latest !== null && newer(latest, "1.3.0");
12762
+ const outdated = latest !== null && newer(latest, "1.4.0");
12753
12763
  if (options.json) {
12754
12764
  ctx.out(JSON.stringify({
12755
12765
  version: VERSION,
@@ -12787,7 +12797,7 @@ function program(ctx) {
12787
12797
  cli.command("today").argument("[day]", "another day: tomorrow, fri, oct 12, 2026-10-12…").description("Show what's planned for today in every project (overdue first), or for another day").option("-w, --week", "the 7 days from it").addOption(json()).action(async (day, options) => todayView(await ctx(), day, options));
12788
12798
  cli.command("search").argument("<words...>", "all of them: in the title or description, a tag, or a reference like MON-12").description("Find tasks in every project, the last changed first").option("-n, --number <count>", "how many tasks (default 30)").addOption(json()).action(async (words, options) => search(await ctx(), words, options));
12789
12799
  cli.command("schedule").argument("<task>", "like MON-12").argument("[day]", "today, tomorrow, fri, next week, +3, oct 12, 2026-10-12…").description("Plan a task for a day (it shows in `monoban today` then), or take its date off with --clear").option("--clear", "take the date off").addOption(json()).action(async (ref, day, options) => schedule(await ctx(), ref, day, options));
12790
- cli.command("move").argument("<task>", "like MON-12").argument("[column]", "where to (any case; a prefix works)").description("Move a task to the end of another column, or (--to) to another project").option("--to <project>", "another project's key: the task gets a number there (MON-12 becomes WEB-7)").addOption(json()).action(async (ref, column, options) => move(await ctx(), ref, column, options));
12800
+ cli.command("move").argument("<task>", "like MON-12").argument("[column]", "where to (any case; a prefix works)").description("Move a task to the end of another column, or (--to) to another project").option("--to <project>", "another project's key: the task gets a number there (MON-12 becomes WEB-7)").option("--if-column-since <time>", "only if it's been in its column since then (its columnSince): nobody moved it").addOption(json()).action(async (ref, column, options) => move(await ctx(), ref, column, options));
12791
12801
  cli.command("done").argument("<task>", "like MON-12").description("Move a task to Done (or the last column)").addOption(json()).action(async (ref, options) => done(await ctx(), ref, options));
12792
12802
  cli.command("start").argument("<task>", "like MON-12").description("Start a task: check out its branch (mon-12-title, made from the commit you're on) and move it to In progress").option("--no-branch", "only move it").option("--no-move", "only check out its branch").addOption(json()).action(async (ref, options) => start(await ctx(), ref, options));
12793
12803
  cli.command("edit").argument("<task>", "like MON-12").description("Edit a task's title (the first line) and description in $EDITOR, or set them with --title and -d").option("--title <text>", "a new title (no editor)").option("-d, --description <text>", "a new description, replacing it (- reads it from stdin; no editor)").addOption(json()).action(async (ref, options) => edit(await ctx(), ref, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monoban",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A keyboard-first kanban board in your terminal: list, add and move tasks on monoban.dev.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://monoban.dev",