claude-switch-profile 1.4.12 → 1.4.13

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 CHANGED
@@ -9,6 +9,14 @@ All notable changes to `claude-switch-profile` are documented here.
9
9
 
10
10
  ---
11
11
 
12
+ ## [1.4.12] - 2026-04-02
13
+
14
+ ### Fixed
15
+ - **Isolated launch snapshot semantics**: Fixed an issue where launching a non-default profile in isolated mode could seed runtime state from the live `~/.claude` directory instead of the stored profile snapshot. Isolated launches now preserve the selected profile's saved snapshot semantics.
16
+ - **CLI integration coverage across platforms**: Updated CLI integration tests to align with Windows tar behavior so the test suite remains green on multiple platforms.
17
+
18
+ ---
19
+
12
20
  ## [1.4.11] - 2026-04-01
13
21
 
14
22
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-switch-profile",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "CLI tool for managing multiple Claude Code profiles",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@ import {
12
12
  } from 'node:fs';
13
13
  import { join, dirname } from 'node:path';
14
14
  import { homedir } from 'node:os';
15
- import { MANAGED_ITEMS, COPY_ITEMS, COPY_DIRS, CLAUDE_DIR } from './constants.js';
15
+ import { MANAGED_ITEMS, COPY_ITEMS, COPY_DIRS, CLAUDE_DIR, DEFAULT_PROFILE } from './constants.js';
16
16
  import {
17
17
  getActive,
18
18
  getProfileDir,
@@ -147,23 +147,20 @@ const getStaticItems = () => {
147
147
  return [...new Set([...MANAGED_ITEMS, ...COPY_ITEMS, ...COPY_DIRS])];
148
148
  };
149
149
 
150
+ const shouldUseLiveClaudeDir = (profileName) => {
151
+ return profileName === DEFAULT_PROFILE && getActive() === profileName;
152
+ };
153
+
150
154
  const resolveSourceDir = (profileName) => {
151
- const active = getActive();
152
- return active === profileName ? CLAUDE_DIR : getProfileDir(profileName);
155
+ return shouldUseLiveClaudeDir(profileName) ? CLAUDE_DIR : getProfileDir(profileName);
153
156
  };
154
157
 
155
158
  const resolveItemSource = (profileName, item) => {
156
159
  const profileDir = getProfileDir(profileName);
157
- const active = getActive();
158
- const profileIsActive = active === profileName;
159
160
 
160
- if (profileIsActive) {
161
+ if (shouldUseLiveClaudeDir(profileName)) {
161
162
  const claudePath = join(CLAUDE_DIR, item);
162
163
  if (existsSync(claudePath)) return claudePath;
163
-
164
- const profilePath = join(profileDir, item);
165
- if (existsSync(profilePath)) return profilePath;
166
- return null;
167
164
  }
168
165
 
169
166
  const profilePath = join(profileDir, item);