@ibgib/vcs-gib 0.0.6 → 0.0.17
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 +24 -2
- package/VCS_CLI_USER_GUIDE.md +2 -2
- package/dist/AUTO-GENERATED-version.d.mts +1 -1
- package/dist/AUTO-GENERATED-version.d.mts.map +1 -1
- package/dist/AUTO-GENERATED-version.mjs +1 -1
- package/dist/AUTO-GENERATED-version.mjs.map +1 -1
- package/dist/bootstrap/node-bootstrap.d.mts.map +1 -1
- package/dist/bootstrap/node-bootstrap.mjs +6 -0
- package/dist/bootstrap/node-bootstrap.mjs.map +1 -1
- package/dist/cli/cli-arg-parser.d.mts +3 -0
- package/dist/cli/cli-arg-parser.d.mts.map +1 -1
- package/dist/cli/cli-arg-parser.mjs +13 -1
- package/dist/cli/cli-arg-parser.mjs.map +1 -1
- package/dist/cli/cli-constants.d.mts +5 -0
- package/dist/cli/cli-constants.d.mts.map +1 -1
- package/dist/cli/cli-constants.mjs +23 -0
- package/dist/cli/cli-constants.mjs.map +1 -1
- package/dist/cli/cli-e2e.respec.node.mjs +1 -1
- package/dist/cli/cli-e2e.respec.node.mjs.map +1 -1
- package/dist/cli/commands/add-cmd.d.mts.map +1 -1
- package/dist/cli/commands/add-cmd.mjs +33 -28
- package/dist/cli/commands/add-cmd.mjs.map +1 -1
- package/dist/cli/commands/branch-checkout-cmd.respec.node.mjs +70 -0
- package/dist/cli/commands/branch-checkout-cmd.respec.node.mjs.map +1 -1
- package/dist/cli/commands/branch-cmd.d.mts +2 -1
- package/dist/cli/commands/branch-cmd.d.mts.map +1 -1
- package/dist/cli/commands/branch-cmd.mjs +57 -6
- package/dist/cli/commands/branch-cmd.mjs.map +1 -1
- package/dist/cli/commands/checkout-cmd.d.mts.map +1 -1
- package/dist/cli/commands/checkout-cmd.mjs +23 -11
- package/dist/cli/commands/checkout-cmd.mjs.map +1 -1
- package/dist/cli/commands/commit-cmd.d.mts.map +1 -1
- package/dist/cli/commands/commit-cmd.mjs +24 -21
- package/dist/cli/commands/commit-cmd.mjs.map +1 -1
- package/dist/cli/commands/reset-cmd.d.mts +21 -0
- package/dist/cli/commands/reset-cmd.d.mts.map +1 -0
- package/dist/cli/commands/reset-cmd.mjs +93 -0
- package/dist/cli/commands/reset-cmd.mjs.map +1 -0
- package/dist/cli/commands/reset-restore-cmd.respec.node.d.mts +7 -0
- package/dist/cli/commands/reset-restore-cmd.respec.node.d.mts.map +1 -0
- package/dist/cli/commands/reset-restore-cmd.respec.node.mjs +185 -0
- package/dist/cli/commands/reset-restore-cmd.respec.node.mjs.map +1 -0
- package/dist/cli/commands/restore-cmd.d.mts +22 -0
- package/dist/cli/commands/restore-cmd.d.mts.map +1 -0
- package/dist/cli/commands/restore-cmd.mjs +115 -0
- package/dist/cli/commands/restore-cmd.mjs.map +1 -0
- package/dist/cli/commands/status-add-cmd.respec.node.mjs +24 -0
- package/dist/cli/commands/status-add-cmd.respec.node.mjs.map +1 -1
- package/dist/cli/vcs-cli-main.d.mts.map +1 -1
- package/dist/cli/vcs-cli-main.mjs +29 -3
- package/dist/cli/vcs-cli-main.mjs.map +1 -1
- package/dist/engine/branch/branch-graph-helper.d.mts +12 -3
- package/dist/engine/branch/branch-graph-helper.d.mts.map +1 -1
- package/dist/engine/branch/branch-graph-helper.mjs +50 -18
- package/dist/engine/branch/branch-graph-helper.mjs.map +1 -1
- package/dist/engine/branch/branch-space-helper.d.mts +1 -0
- package/dist/engine/branch/branch-space-helper.d.mts.map +1 -1
- package/dist/engine/branch/branch-space-helper.mjs +1 -0
- package/dist/engine/branch/branch-space-helper.mjs.map +1 -1
- package/dist/engine/branch/branch-space.respec.node.mjs +11 -6
- package/dist/engine/branch/branch-space.respec.node.mjs.map +1 -1
- package/dist/engine/index/index-helper.d.mts +35 -0
- package/dist/engine/index/index-helper.d.mts.map +1 -1
- package/dist/engine/index/index-helper.mjs +241 -0
- package/dist/engine/index/index-helper.mjs.map +1 -1
- package/dist/engine/item/item-helper.d.mts +29 -3
- package/dist/engine/item/item-helper.d.mts.map +1 -1
- package/dist/engine/item/item-helper.mjs +234 -56
- package/dist/engine/item/item-helper.mjs.map +1 -1
- package/dist/engine/item/item.respec.node.d.mts +7 -0
- package/dist/engine/item/item.respec.node.d.mts.map +1 -0
- package/dist/engine/item/item.respec.node.mjs +75 -0
- package/dist/engine/item/item.respec.node.mjs.map +1 -0
- package/package.json +3 -3
- package/src/AUTO-GENERATED-version.mts +1 -1
- package/src/bootstrap/node-bootstrap.mts +2 -0
- package/src/cli/cli-arg-parser.mts +15 -0
- package/src/cli/cli-constants.mts +26 -0
- package/src/cli/cli-e2e.respec.node.mts +2 -2
- package/src/cli/commands/add-cmd.mts +36 -26
- package/src/cli/commands/branch-checkout-cmd.respec.node.mts +79 -0
- package/src/cli/commands/branch-cmd.mts +75 -6
- package/src/cli/commands/checkout-cmd.mts +25 -14
- package/src/cli/commands/commit-cmd.mts +30 -23
- package/src/cli/commands/reset-cmd.mts +128 -0
- package/src/cli/commands/reset-restore-cmd.respec.node.mts +222 -0
- package/src/cli/commands/restore-cmd.mts +155 -0
- package/src/cli/commands/status-add-cmd.respec.node.mts +27 -0
- package/src/cli/vcs-cli-main.mts +29 -3
- package/src/engine/branch/branch-graph-helper.mts +66 -18
- package/src/engine/branch/branch-space-helper.mts +6 -0
- package/src/engine/branch/branch-space.respec.node.mts +12 -6
- package/src/engine/index/index-helper.mts +324 -0
- package/src/engine/item/item-helper.mts +284 -58
- package/src/engine/item/item.respec.node.mts +92 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/test_runs/001-hello-node/20260728_090100_0001-flow-core-main.md +0 -39
- package/test_runs/001-hello-node/20260728_090200_0003-flow-branching-worktree.md +0 -54
- package/test_runs/001-hello-node/20260728_090300_0002-flow-selective-add.md +0 -45
- package/test_runs/001-hello-node/20260728_142100_0007-flow-edge-cases.md +0 -44
- package/test_runs/001-hello-node/20260728_142400_0005-flow-hardcoded-ignores.md +0 -36
- package/tools/pack-for-test.mjs +0 -73
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Test Run: 0002-flow-selective-add
|
|
2
|
-
|
|
3
|
-
**Repo**: 001-hello-node
|
|
4
|
-
**Version**: @ibgib/vcs-gib v0.0.3
|
|
5
|
-
**Date**: 2026-07-28 09:03 local
|
|
6
|
-
**Tester**: agent (Antigravity)
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Results
|
|
11
|
-
|
|
12
|
-
| Step | Command | Status | Notes |
|
|
13
|
-
|---|---|---|---|
|
|
14
|
-
| 1 | `ibgib --version` | ✅ PASS | `@ibgib/vcs-gib v0.0.3` |
|
|
15
|
-
| 2 | `ibgib init .` | ✅ PASS | |
|
|
16
|
-
| 3 | `ibgib add -a` | ✅ PASS | All 3 files staged |
|
|
17
|
-
| 4 | `ibgib commit -m "initial"` | ✅ PASS | |
|
|
18
|
-
| 5 | *(create version.js, edit README.md)* | ✅ PASS | 2 dirty files |
|
|
19
|
-
| 6 | `ibgib status` | ✅ PASS | `untracked: version.js`, `modified: README.md` shown separately |
|
|
20
|
-
| 7 | `ibgib add version.js` (relative path) | ✅ PASS | Only `version.js` staged; README.md left unstaged |
|
|
21
|
-
| 8 | `ibgib status` | ✅ PASS | `staged: version.js` AND `modified: README.md` |
|
|
22
|
-
| 9 | `ibgib commit -m "add version.js"` | ✅ PASS | 1 file changed |
|
|
23
|
-
| 10 | `ibgib add C:\...\README.md` (absolute path) | ✅ PASS | Only `README.md` staged |
|
|
24
|
-
| 11 | `ibgib status` | ✅ PASS | `staged: README.md` only |
|
|
25
|
-
| 12 | `ibgib commit -m "update README"` | ✅ PASS | 1 file changed |
|
|
26
|
-
| 13 | *(edit index.js AND version.js)* | ✅ PASS | 2 dirty `.js` files |
|
|
27
|
-
| 14 | `ibgib add "*.js"` (glob) | ✅ PASS | Matched dirty `.js` files — `staged: version.js` (index.js was clean at time of test) |
|
|
28
|
-
| 15 | `ibgib status` | ✅ PASS | Staged list correct |
|
|
29
|
-
| 16 | `ibgib commit -m "glob test"` | ✅ PASS | |
|
|
30
|
-
| 17 | `ibgib add nonexistent.js` | ⏭️ SKIP | Deferred to 0007-flow-edge-cases |
|
|
31
|
-
| 18 | `ibgib add` (no args) | ⏭️ SKIP | Deferred to 0007-flow-edge-cases |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Summary
|
|
36
|
-
|
|
37
|
-
- **Total steps**: 18
|
|
38
|
-
- **Passed**: 16
|
|
39
|
-
- **Failed**: 0
|
|
40
|
-
- **Skipped**: 2 (steps 17–18)
|
|
41
|
-
|
|
42
|
-
## Findings / Bugs
|
|
43
|
-
|
|
44
|
-
- **Step 14 note**: At time of glob test, `index.js` was already committed and clean; only `version.js` was dirty. Glob correctly staged only the dirty `.js` file. A future run should confirm glob with *multiple simultaneously dirty* `.js` files.
|
|
45
|
-
- `ibgib add "*.js"` was ❌ FAIL in v0.0.2 (`Error: Path does not exist: *.js`). Confirmed fixed in v0.0.3. ✅
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Test Run: 0007-flow-edge-cases
|
|
2
|
-
|
|
3
|
-
**Repo**: 001-hello-node
|
|
4
|
-
**Version**: @ibgib/vcs-gib v0.0.3
|
|
5
|
-
**Date**: 2026-07-28 14:21 local
|
|
6
|
-
**Tester**: agent (Antigravity)
|
|
7
|
-
**Run from**: `tmp/001-hello-node/` (via `node scripts/prep-run.js 001-hello-node`)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Results
|
|
12
|
-
|
|
13
|
-
| Step | Command | Status | Notes |
|
|
14
|
-
|---|---|---|---|
|
|
15
|
-
| 1 | `ibgib --version` | ✅ PASS | `@ibgib/vcs-gib v0.0.3` |
|
|
16
|
-
| 2 | `ibgib init .` | ✅ PASS | Initialized, `.vcsgib/ibgib/b2s_main/` created |
|
|
17
|
-
| 3 | `ibgib init .` (already initialized) | ⚠️ PARTIAL | No error — succeeds silently, generates a new root item hash. Does not warn or no-op. |
|
|
18
|
-
| 4 | `ibgib add -a` | ✅ PASS | All 3 files staged |
|
|
19
|
-
| 5 | `ibgib commit -m "initial"` | ✅ PASS | `[main 66A4276]`, 3 file(s) changed |
|
|
20
|
-
| 6 | `ibgib commit -m "empty"` (nothing staged) | ✅ PASS | Error: "Nothing to commit (no staged items)", exit code 1 |
|
|
21
|
-
| 7 | `ibgib commit` (no `-m` flag) | ✅ PASS | Error: "Commit message is required", exit code 1 |
|
|
22
|
-
| 8 | `ibgib checkout nonexistent-branch` | ✅ PASS | Error: "Branch 'nonexistent-branch' does not exist", exit code 1 |
|
|
23
|
-
| 9 | `ibgib branch feature-x` | ✅ PASS | "Created branch 'feature-x'" |
|
|
24
|
-
| 10 | `ibgib branch feature-x` (already exists) | ✅ PASS | Error: "Branch 'feature-x' already exists", exit code 1 |
|
|
25
|
-
| 11 | `ibgib add nonexistent.js` | ✅ PASS | Error: "Path does not exist: nonexistent.js", exit code 1 |
|
|
26
|
-
| 12 | `ibgib add` (no args) | ⚠️ PARTIAL | Silent exit 0 — no output, no error, no usage hint. Expected: error or usage hint. |
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Summary
|
|
31
|
-
|
|
32
|
-
- **Total steps**: 12
|
|
33
|
-
- **Passed**: 10
|
|
34
|
-
- **Failed**: 0
|
|
35
|
-
- **Partial**: 2 (steps 3, 12)
|
|
36
|
-
- **Skipped**: 0
|
|
37
|
-
|
|
38
|
-
## Findings / Bugs
|
|
39
|
-
|
|
40
|
-
**Step 3 — `ibgib init .` on already-initialized repo**
|
|
41
|
-
Re-init completes successfully and generates a *new* root item hash instead of erroring or no-oping. This could silently clobber an existing repo's init state. Expected behavior: detect `.vcsgib/` already present and either error with "Already initialized" or explicitly no-op with a message.
|
|
42
|
-
|
|
43
|
-
**Step 12 — `ibgib add` with no arguments**
|
|
44
|
-
Silent exit 0 with no output. Expected: either an error ("No path specified") or a usage hint. The silent success could be confusing to users who accidentally omit arguments.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Test Run: 0005-flow-hardcoded-ignores
|
|
2
|
-
|
|
3
|
-
**Repo**: 001-hello-node
|
|
4
|
-
**Version**: @ibgib/vcs-gib v0.0.3
|
|
5
|
-
**Date**: 2026-07-28 14:24 local
|
|
6
|
-
**Tester**: agent (Antigravity)
|
|
7
|
-
**Run from**: `tmp/001-hello-node/` (via `node scripts/prep-run.js 001-hello-node`)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Results
|
|
12
|
-
|
|
13
|
-
| Step | Command | Status | Notes |
|
|
14
|
-
|---|---|---|---|
|
|
15
|
-
| 1 | `ibgib --version` | ✅ PASS | `@ibgib/vcs-gib v0.0.3` |
|
|
16
|
-
| 2 | `ibgib init .` | ✅ PASS | Initialized |
|
|
17
|
-
| 3 | `ibgib add -a` | ✅ PASS | All 3 files staged |
|
|
18
|
-
| 4 | `ibgib commit -m "initial"` | ✅ PASS | `[main 2A7E4E7]`, 3 file(s) changed |
|
|
19
|
-
| 5 | *(create `node_modules/lodash/index.js`)* | ✅ PASS | Directory created |
|
|
20
|
-
| 6 | `ibgib status` | ✅ PASS | "nothing to commit, working tree clean" — `node_modules/` absent ✅ |
|
|
21
|
-
| 7 | *(create `.git/HEAD`)* | ✅ PASS | Directory created |
|
|
22
|
-
| 8 | `ibgib status` | ✅ PASS | "nothing to commit, working tree clean" — `.git/` absent ✅ |
|
|
23
|
-
| 9 | `ibgib add -a` | ✅ PASS | Silent exit 0, nothing staged — ignored dirs correctly excluded |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Summary
|
|
28
|
-
|
|
29
|
-
- **Total steps**: 9
|
|
30
|
-
- **Passed**: 9
|
|
31
|
-
- **Failed**: 0
|
|
32
|
-
- **Skipped**: 0
|
|
33
|
-
|
|
34
|
-
## Findings / Bugs
|
|
35
|
-
|
|
36
|
-
None. `node_modules/` and `.git/` are both correctly suppressed from `status` output and from `add -a` staging. Hardcoded ignore behavior is working as intended in v0.0.3.
|
package/tools/pack-for-test.mjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file pack-for-test.mjs
|
|
3
|
-
*
|
|
4
|
-
* Builds vcs-gib, bumps the patch version in package.json, packs the npm tarball,
|
|
5
|
-
* and deploys it to the downstream test_repos/packages/ directory for hermetic testing.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import fs from 'node:fs';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
import { execSync } from 'node:child_process';
|
|
11
|
-
import { fileURLToPath } from 'node:url';
|
|
12
|
-
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname = path.dirname(__filename);
|
|
15
|
-
|
|
16
|
-
const vcsGibDir = path.resolve(__dirname, '..');
|
|
17
|
-
const monorepoRoot = path.resolve(vcsGibDir, '../..');
|
|
18
|
-
|
|
19
|
-
// 1. Load .env from monorepo root if present
|
|
20
|
-
const envPath = path.join(monorepoRoot, '.env');
|
|
21
|
-
let testPackageDir = process.env.VCS_GIB_TEST_PACKAGE_DIR || process.env.TEST_REPOS_PACKAGES_DIR;
|
|
22
|
-
|
|
23
|
-
if (!testPackageDir && fs.existsSync(envPath)) {
|
|
24
|
-
const envContent = fs.readFileSync(envPath, 'utf8');
|
|
25
|
-
for (const line of envContent.split('\n')) {
|
|
26
|
-
const match = line.match(/^\s*(VCS_GIB_TEST_PACKAGE_DIR|TEST_REPOS_PACKAGES_DIR)\s*=\s*["']?([^"'\r\n]+)["']?/);
|
|
27
|
-
if (match) {
|
|
28
|
-
testPackageDir = match[2];
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (!testPackageDir) {
|
|
35
|
-
testPackageDir = 'c:\\Users\\billm\\antigravity\\test_repos\\packages';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
console.log(`[pack-for-test] Target test packages dir: ${testPackageDir}`);
|
|
39
|
-
|
|
40
|
-
// 2. Bump patch version in apps/vcs-gib/package.json
|
|
41
|
-
const pkgPath = path.join(vcsGibDir, 'package.json');
|
|
42
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
43
|
-
const currentVersion = pkg.version || '0.0.0';
|
|
44
|
-
const versionParts = currentVersion.split('.').map(Number);
|
|
45
|
-
versionParts[2] = (versionParts[2] || 0) + 1;
|
|
46
|
-
const newVersion = versionParts.join('.');
|
|
47
|
-
pkg.version = newVersion;
|
|
48
|
-
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
49
|
-
console.log(`[pack-for-test] Bumped version from ${currentVersion} to ${newVersion}`);
|
|
50
|
-
|
|
51
|
-
// 3. Build vcs-gib
|
|
52
|
-
console.log(`[pack-for-test] Running npm run build:vcs-gib...`);
|
|
53
|
-
execSync('npm run build:vcs-gib', { cwd: monorepoRoot, stdio: 'inherit' });
|
|
54
|
-
|
|
55
|
-
// 4. Pack tarball
|
|
56
|
-
console.log(`[pack-for-test] Packing npm tarball...`);
|
|
57
|
-
const packOutput = execSync('npm pack', { cwd: vcsGibDir, encoding: 'utf8' }).trim();
|
|
58
|
-
const tarballName = packOutput.split('\n').pop().trim();
|
|
59
|
-
const tarballPath = path.join(vcsGibDir, tarballName);
|
|
60
|
-
console.log(`[pack-for-test] Packed tarball: ${tarballName}`);
|
|
61
|
-
|
|
62
|
-
// 5. Ensure target directory exists & copy tarball to vcs-gib-latest.tgz
|
|
63
|
-
fs.mkdirSync(testPackageDir, { recursive: true });
|
|
64
|
-
const targetLatestPath = path.join(testPackageDir, 'vcs-gib-latest.tgz');
|
|
65
|
-
const targetVersionedPath = path.join(testPackageDir, `vcs-gib-${newVersion}.tgz`);
|
|
66
|
-
|
|
67
|
-
fs.copyFileSync(tarballPath, targetLatestPath);
|
|
68
|
-
fs.copyFileSync(tarballPath, targetVersionedPath);
|
|
69
|
-
fs.unlinkSync(tarballPath);
|
|
70
|
-
|
|
71
|
-
console.log(`[pack-for-test] Successfully deployed to:`);
|
|
72
|
-
console.log(` - ${targetLatestPath}`);
|
|
73
|
-
console.log(` - ${targetVersionedPath}`);
|