Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"eleven-kiwis-remain",
"fair-parrots-sleep",
"feat-login-path",
"feat-session-management",
"fix-devtools-launch-option",
"honest-ads-tap",
"large-suns-buy",
Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @heymp/scratchpad

## 1.0.0-next.23

### Minor Changes

- 750b851: Add named session management with a new `session` command.

Sessions are stored in `~/.scratchpad/sessions/<name>.json` and can be reused from any project directory.

**Save a session**

```bash
npx @heymp/scratchpad@next session login
npx @heymp/scratchpad@next session login --name work
```

**Use a session**

```bash
npx @heymp/scratchpad@next run --session work ./my-test-file.js
npx @heymp/scratchpad@next run --session ./my-test-file.js
```

**Manage sessions**

```bash
npx @heymp/scratchpad@next session list
npx @heymp/scratchpad@next session rename work personal
npx @heymp/scratchpad@next session delete work
```

Interactive session selection uses an arrow-key picker (with a numbered readline fallback in non-interactive environments). Press `s` during `run` to save the current browser session mid-flight.

**Breaking changes**

- Removed `scratchpad generate login` (use `scratchpad session login` instead)
- Removed `--login` and `--session-path` from `scratchpad run` (use `--session [name]` instead)
- Removed `login` and `sessionPath` config options (use `session` instead)

**Migration**

If you previously used `generate login`, move your session file to the new location:

```bash
mkdir -p ~/.scratchpad/sessions
cp .scratchpad/login.json ~/.scratchpad/sessions/default.json
```

## 1.0.0-next.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@heymp/scratchpad",
"description": "Run TS/JS snippets in a locally",
"version": "1.0.0-next.22",
"version": "1.0.0-next.23",
"main": "src/lib/index.js",
"module": "src/lib/index.js",
"type": "module",
Expand Down
Loading