@davmash/bygone 0.5.2
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/CHANGELOG.md +23 -0
- package/LICENSE.txt +21 -0
- package/README.md +240 -0
- package/bin/bygone.js +112 -0
- package/media/bygone-screenshot.png +0 -0
- package/media/editor.worker.js +14251 -0
- package/media/icon.png +0 -0
- package/media/webview.css +9819 -0
- package/media/webview.js +133435 -0
- package/out/standalone-main.js +19493 -0
- package/out/standalone-preload.js +20 -0
- package/package.json +39 -0
- package/standalone/index.html +177 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Added modified-file detection and drill-down for directory comparisons
|
|
6
|
+
- Added prototype three-directory comparison with adjacent multi-panel file drill-down
|
|
7
|
+
|
|
8
|
+
## 0.2.0
|
|
9
|
+
|
|
10
|
+
- Added working tree vs `HEAD` as the newest git file history step
|
|
11
|
+
- Added GitHub Actions release checks
|
|
12
|
+
- Added scoped npm packaging and dry-run validation
|
|
13
|
+
- Added desktop app icons for packaged builds
|
|
14
|
+
- Split desktop packaging targets and made macOS DMG packaging the default
|
|
15
|
+
|
|
16
|
+
## 0.1.0
|
|
17
|
+
|
|
18
|
+
- Added editable two-way flowing diff rendering
|
|
19
|
+
- Added inline and line-level change highlighting
|
|
20
|
+
- Added git file history navigation with commit-by-commit stepping
|
|
21
|
+
- Added private/pre-release packaging metadata and release documentation
|
|
22
|
+
- Renamed the project from Melden to Bygone and updated the extension id, CLI, and difftool entrypoints
|
|
23
|
+
- Kept the product surface focused on diff and history workflows
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 David Mashburn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Bygone
|
|
2
|
+
|
|
3
|
+
Bygone is a VS Code extension and standalone desktop app for visual diff and file history.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Editable two-way side-by-side diff view
|
|
10
|
+
- Dynamic adjacent multi-panel diff view
|
|
11
|
+
- Flowing connectors, block contours, and inline change highlighting
|
|
12
|
+
- Git file history viewer with commit-by-commit navigation
|
|
13
|
+
|
|
14
|
+
## Status
|
|
15
|
+
|
|
16
|
+
This project is usable as a local or private pre-release VS Code extension. The two-way diff and git history flows are the most complete. The multi-panel view is diff-focused, not a merge tool.
|
|
17
|
+
|
|
18
|
+
## Migration Note
|
|
19
|
+
|
|
20
|
+
This project was renamed from `Melden` to `Bygone`.
|
|
21
|
+
|
|
22
|
+
- VS Code extension id changed from `davidmashburn.melden` to `davidmashburn.bygone`
|
|
23
|
+
- CLI changed from `melden` to `bygone`
|
|
24
|
+
- Git difftool names changed from `melden` / `melden-vscode` to `bygone` / `bygone-vscode`
|
|
25
|
+
- Existing users should reinstall the extension and re-run the difftool setup scripts
|
|
26
|
+
|
|
27
|
+
## Install For Development
|
|
28
|
+
|
|
29
|
+
Install dependencies and compile:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install
|
|
33
|
+
npm run compile
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Run the extension in VS Code:
|
|
37
|
+
|
|
38
|
+
1. Open this folder in VS Code.
|
|
39
|
+
2. Press `F5`.
|
|
40
|
+
3. In the Extension Development Host, run one of the Bygone commands from the Command Palette.
|
|
41
|
+
|
|
42
|
+
Run the standalone desktop app locally:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run standalone:start
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run a headless standalone smoke check:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm run standalone:smoke
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For development only, you can install the repo-local launcher globally:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install -g .
|
|
58
|
+
bygone
|
|
59
|
+
bygone path/to/file-or-directory
|
|
60
|
+
bygone --diff path/to/left path/to/right
|
|
61
|
+
bygone --diff path/to/file1 path/to/file2 path/to/file3 [...]
|
|
62
|
+
bygone --dir path/to/left-dir path/to/right-dir
|
|
63
|
+
bygone --diff3 path/to/left path/to/middle path/to/right
|
|
64
|
+
bygone --dir3 path/to/left-dir path/to/middle-dir path/to/right-dir
|
|
65
|
+
bygone --history path/to/file
|
|
66
|
+
bygone --help
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
CLI defaults:
|
|
70
|
+
|
|
71
|
+
- `bygone` opens Git directory history for the current directory.
|
|
72
|
+
- `bygone <file>` opens file history.
|
|
73
|
+
- `bygone <directory>` opens Git directory history for that directory.
|
|
74
|
+
- `bygone <left> <right>` auto-selects file diff or directory compare.
|
|
75
|
+
- `bygone --diff <file1> <file2> <file3> ...` opens multi-panel diff.
|
|
76
|
+
|
|
77
|
+
If the native desktop app is installed, the npm/source launcher prefers it and forwards the shell working directory. Set `BYGONE_FORCE_BUNDLED=1` to force the npm-bundled Electron runtime instead.
|
|
78
|
+
|
|
79
|
+
The desktop app also includes `Help -> Install Command Line Tools...` for non-npm installs. Homebrew cask installs can provide the `bygone` command automatically.
|
|
80
|
+
|
|
81
|
+
## Package For External Use
|
|
82
|
+
|
|
83
|
+
This repo is set up for local/private packaging. A typical release flow is:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install
|
|
87
|
+
npm test
|
|
88
|
+
npx @vscode/vsce package
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
That produces a `.vsix` you can install with `Extensions: Install from VSIX...`.
|
|
92
|
+
|
|
93
|
+
Build the standalone desktop packages:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm install
|
|
97
|
+
npm run package:desktop
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
That produces a macOS DMG in `dist/`. Cross-target packaging is split out because Windows and Linux builds may need additional Electron downloads or Wine support:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm run package:desktop:mac:zip
|
|
104
|
+
npm run package:desktop:linux
|
|
105
|
+
npm run package:desktop:win
|
|
106
|
+
npm run package:desktop:all
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Stage the scoped npm standalone package:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm install
|
|
113
|
+
npm run package:npm
|
|
114
|
+
npm pack --dry-run ./dist/npm-package
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The root `package.json` is the VS Code extension manifest and intentionally keeps the unscoped extension name `bygone`. The npm distribution is staged separately as `@davidmashburn/bygone` so the global launcher can avoid the already-taken `bygone` package name while preserving the VS Code extension id `davidmashburn.bygone`.
|
|
118
|
+
|
|
119
|
+
Homebrew packaging templates live in `packaging/homebrew/`. They are staged for local validation only until release artifact URLs and checksums exist.
|
|
120
|
+
|
|
121
|
+
Build the full local release artifact matrix:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run release:build
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
That runs tests, rebuilds the VSIX, stages and dry-run checks the npm package, builds desktop artifacts, and styles the Homebrew templates. If the local macOS DMG or Windows cross-build toolchain is unavailable, use `node ./scripts/release.mjs --skip-dmg` or `node ./scripts/release.mjs --skip-windows` while validating the rest of the matrix.
|
|
128
|
+
|
|
129
|
+
Publishing is intentionally explicit:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm run release:publish
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`release:publish` publishes the npm package, publishes the VS Code package, creates a GitHub release for desktop artifacts, and updates a Homebrew tap. Set `BYGONE_HOMEBREW_TAP` to a local tap checkout before publishing Homebrew formulas.
|
|
136
|
+
|
|
137
|
+
Run the release checks:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm run release:check
|
|
141
|
+
npm run standalone:smoke
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The standalone smoke check is intentionally run directly because Electron can abort on macOS when launched from a longer nested npm command chain, while the same smoke check passes as a direct release gate.
|
|
145
|
+
|
|
146
|
+
In the standalone window, you can also drag and drop:
|
|
147
|
+
|
|
148
|
+
- 1 file to open git history for that file
|
|
149
|
+
- 2 files or directories to open a side-by-side compare
|
|
150
|
+
- 3 or more files to open a multi-panel compare
|
|
151
|
+
- 3 directories to open a three-directory compare
|
|
152
|
+
|
|
153
|
+
## Git Difftool
|
|
154
|
+
|
|
155
|
+
Bygone can be launched from `git difftool` through either the standalone app or the VS Code extension.
|
|
156
|
+
|
|
157
|
+
Configure the standalone launcher:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
./scripts/configure-git-difftool-standalone.sh
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
That registers:
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
git difftool -t bygone
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Configure the VS Code launcher:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
./scripts/configure-git-difftool.sh
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
That registers:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
git difftool -t bygone-vscode
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The VS Code path launches:
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
vscode://davidmashburn.bygone/diff?left=...&right=...
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The wrapper scripts are:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
./scripts/bygone-difftool.sh <left-file> <right-file>
|
|
191
|
+
./scripts/bygone-standalone-difftool.sh <left-file> <right-file>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Commands
|
|
195
|
+
|
|
196
|
+
- `Bygone: Compare Files`
|
|
197
|
+
- `Bygone: Compare Directories`
|
|
198
|
+
- `Bygone: Compare Three Directories (Prototype)`
|
|
199
|
+
- `Bygone: Compare Multiple Files`
|
|
200
|
+
- `Bygone: Compare with Selected`
|
|
201
|
+
- `Bygone: Compare Test Files`
|
|
202
|
+
- `Bygone: Compare File History`
|
|
203
|
+
- `Bygone: Compare Active File History`
|
|
204
|
+
|
|
205
|
+
## Limitations
|
|
206
|
+
|
|
207
|
+
- Bygone is intentionally diff-focused; merge tooling is not exposed as a product feature.
|
|
208
|
+
- Directory compare supports modified-file detection and file drill-down; deep tree ergonomics are still early.
|
|
209
|
+
- The git history viewer currently steps through single-parent commit history for one file at a time.
|
|
210
|
+
- Marketplace publishing metadata is not finalized yet.
|
|
211
|
+
|
|
212
|
+
## Release Work
|
|
213
|
+
|
|
214
|
+
The current release checklist and remaining publication blockers are tracked in [RELEASE_PLAN.md](./RELEASE_PLAN.md).
|
|
215
|
+
|
|
216
|
+
## Codebase Guide
|
|
217
|
+
|
|
218
|
+
Architecture and implementation details are documented in [CODEBASE.md](./CODEBASE.md).
|
|
219
|
+
|
|
220
|
+
## Walkthrough
|
|
221
|
+
|
|
222
|
+
A screenshot-based walkthrough using Bygone on its own source tree lives in [docs/walkthrough.md](./docs/walkthrough.md).
|
|
223
|
+
|
|
224
|
+
## Why “Bygone”?
|
|
225
|
+
|
|
226
|
+
**In short: this project is openly inspired by Meld, and Bygone is meant to carry that visual tradition into a more history-aware tool.**
|
|
227
|
+
|
|
228
|
+
Meld was a direct inspiration for this project. Its visual diff metaphor is still one of the clearest and most human ways to understand change, and Bygone builds on that lineage while pushing further into revision history.
|
|
229
|
+
|
|
230
|
+
The name also nods to the bygone era before vibe-coding, when people were at least pretending to read, understand, and take responsibility for the code they were writing. This tool is about looking directly at what changed, where it came from, and how the current state emerged.
|
|
231
|
+
|
|
232
|
+
And yes, Codex, the irony is noted. Thanks for the assist.
|
|
233
|
+
|
|
234
|
+
## Tests
|
|
235
|
+
|
|
236
|
+
Run the current unit checks with:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npm test
|
|
240
|
+
```
|
package/bin/bygone.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const packageJson = require('../package.json');
|
|
7
|
+
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
const cliCwd = process.cwd();
|
|
10
|
+
|
|
11
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
12
|
+
process.stdout.write(`Bygone ${packageJson.version}
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
bygone
|
|
16
|
+
bygone <file-or-directory>
|
|
17
|
+
bygone <left> <right>
|
|
18
|
+
bygone --diff <left> <right>
|
|
19
|
+
bygone --diff <file1> <file2> <file3> [...]
|
|
20
|
+
bygone --diff3 <left> <middle> <right>
|
|
21
|
+
bygone --dir <left-dir> <right-dir>
|
|
22
|
+
bygone --dir3 <left-dir> <middle-dir> <right-dir>
|
|
23
|
+
bygone --history <file>
|
|
24
|
+
bygone --dir-history <directory>
|
|
25
|
+
bygone --test
|
|
26
|
+
|
|
27
|
+
Notes:
|
|
28
|
+
- No args opens Git directory history for the current directory.
|
|
29
|
+
- One positional path opens file history or Git directory history.
|
|
30
|
+
- Two positional paths auto-select file diff or directory compare.
|
|
31
|
+
- \`--diff\` accepts 2 or more files; 3+ opens multi-panel diff.
|
|
32
|
+
- In the standalone app, drop 1 file for history, 2 files/directories for compare, 3+ files for multi-panel diff, or 3 directories for directory compare.
|
|
33
|
+
`);
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
38
|
+
process.stdout.write(`${packageJson.version}\n`);
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const packageRoot = path.join(__dirname, '..');
|
|
43
|
+
const electronBinary = process.platform === 'win32'
|
|
44
|
+
? '.\\node_modules\\.bin\\electron.cmd'
|
|
45
|
+
: './node_modules/.bin/electron';
|
|
46
|
+
const appEntry = './out/standalone-main.js';
|
|
47
|
+
const forwardedArgs = ['--cwd', cliCwd, ...args];
|
|
48
|
+
const installedApp = findInstalledApp();
|
|
49
|
+
const preferBundledApp = fs.existsSync(path.join(packageRoot, '.git'));
|
|
50
|
+
|
|
51
|
+
const child = installedApp && process.env.BYGONE_FORCE_BUNDLED !== '1'
|
|
52
|
+
&& !preferBundledApp
|
|
53
|
+
? spawnInstalledApp(installedApp, forwardedArgs)
|
|
54
|
+
: spawn(electronBinary, [appEntry, ...forwardedArgs], {
|
|
55
|
+
cwd: packageRoot,
|
|
56
|
+
stdio: 'inherit'
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
child.on('exit', (code, signal) => {
|
|
60
|
+
if (signal) {
|
|
61
|
+
process.kill(process.pid, signal);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
process.exit(code ?? 0);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
function findInstalledApp() {
|
|
69
|
+
if (process.platform === 'darwin') {
|
|
70
|
+
const candidates = [
|
|
71
|
+
'/Applications/Bygone.app',
|
|
72
|
+
path.join(process.env.HOME || '', 'Applications', 'Bygone.app')
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
return candidates.find((candidate) => fs.existsSync(candidate));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (process.platform === 'win32') {
|
|
79
|
+
const localAppData = process.env.LOCALAPPDATA;
|
|
80
|
+
if (!localAppData) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const candidates = [
|
|
85
|
+
path.join(localAppData, 'Programs', 'Bygone', 'Bygone.exe'),
|
|
86
|
+
path.join(localAppData, 'Bygone', 'Bygone.exe')
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
return candidates.find((candidate) => fs.existsSync(candidate));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const candidates = [
|
|
93
|
+
'/opt/Bygone/bygone',
|
|
94
|
+
'/opt/Bygone/Bygone',
|
|
95
|
+
'/usr/local/bin/bygone-desktop',
|
|
96
|
+
path.join(process.env.HOME || '', '.local', 'bin', 'bygone-desktop')
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
return candidates.find((candidate) => fs.existsSync(candidate));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function spawnInstalledApp(installedApp, launchArgs) {
|
|
103
|
+
if (process.platform === 'darwin') {
|
|
104
|
+
return spawn('open', ['-W', installedApp, '--args', ...launchArgs], {
|
|
105
|
+
stdio: 'inherit'
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return spawn(installedApp, launchArgs, {
|
|
110
|
+
stdio: 'inherit'
|
|
111
|
+
});
|
|
112
|
+
}
|
|
Binary file
|