@ccusage/amp 18.0.8 → 18.0.9

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import process$1 from "node:process";
4
4
  import a, { readFile } from "node:fs/promises";
5
5
  import path, { sep } from "node:path";
6
6
  import b from "node:fs";
7
- import F from "node:os";
7
+ import F, { homedir } from "node:os";
8
8
  import * as nativeFs$1 from "fs";
9
9
  import nativeFs from "fs";
10
10
  import path$1, { basename, dirname, normalize, posix, relative, resolve, sep as sep$1 } from "path";
@@ -1143,7 +1143,7 @@ async function executeCommand(cmd, ctx, name$1) {
1143
1143
  //#endregion
1144
1144
  //#region package.json
1145
1145
  var name = "@ccusage/amp";
1146
- var version = "18.0.8";
1146
+ var version = "18.0.9";
1147
1147
  var description = "Usage analysis tool for Amp CLI sessions";
1148
1148
 
1149
1149
  //#endregion
@@ -6840,7 +6840,7 @@ const DEFAULT_AMP_PATH = ".local/share/amp";
6840
6840
  /**
6841
6841
  * User home directory
6842
6842
  */
6843
- const USER_HOME_DIR = process$1.env.HOME ?? process$1.env.USERPROFILE ?? process$1.cwd();
6843
+ const USER_HOME_DIR = homedir();
6844
6844
  /**
6845
6845
  * Default Amp data directory (absolute path)
6846
6846
  */
@@ -8129,7 +8129,7 @@ if (import.meta.vitest != null) describe("loadAmpUsageEvents", () => {
8129
8129
  it("handles missing directories gracefully", async () => {
8130
8130
  const { events, missingDirectories } = await loadAmpUsageEvents({ threadDirs: ["/nonexistent/path"] });
8131
8131
  expect(events).toEqual([]);
8132
- expect(missingDirectories).toContain("/nonexistent/path");
8132
+ expect(missingDirectories).toContain(path.resolve("/nonexistent/path"));
8133
8133
  });
8134
8134
  it("handles malformed JSON gracefully", async () => {
8135
8135
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccusage/amp",
3
3
  "type": "module",
4
- "version": "18.0.8",
4
+ "version": "18.0.9",
5
5
  "description": "Usage analysis tool for Amp CLI sessions",
6
6
  "author": "ryoppippi",
7
7
  "license": "MIT",