@mherod/get-cookie 4.2.2 → 4.3.1

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/eslint.config.js CHANGED
@@ -1,5 +1,5 @@
1
- import tsParser from "@typescript-eslint/parser";
2
1
  import tsPlugin from "@typescript-eslint/eslint-plugin";
2
+ import tsParser from "@typescript-eslint/parser";
3
3
  import importPlugin from "eslint-plugin-import";
4
4
  import jsdocPlugin from "eslint-plugin-jsdoc";
5
5
  import globals from "globals";
package/jest.setup.js CHANGED
@@ -5,7 +5,30 @@ jest.mock("lodash-es/merge", () => require("lodash/merge"));
5
5
  jest.mock("lodash-es/memoize", () => require("lodash/memoize"));
6
6
  jest.mock("lodash-es/uniqBy", () => require("lodash/uniqBy"));
7
7
 
8
+ // Create a mock logger that can be reused
9
+ const mockLogger = {
10
+ debug: jest.fn(),
11
+ info: jest.fn(),
12
+ success: jest.fn(),
13
+ warn: jest.fn(),
14
+ error: jest.fn(),
15
+ fatal: jest.fn(),
16
+ log: jest.fn(),
17
+ withTag: jest.fn(),
18
+ };
19
+
20
+ mockLogger.withTag.mockReturnValue(mockLogger);
21
+
8
22
  // Mock the logger
9
- jest.mock("@utils/logger");
23
+ jest.mock("@utils/logger", () => mockLogger);
24
+
25
+ // Mock logHelpers to ensure createTaggedLogger works
26
+ jest.mock("@utils/logHelpers", () => ({
27
+ createTaggedLogger: jest.fn(() => mockLogger),
28
+ logError: jest.fn(),
29
+ logOperationResult: jest.fn(),
30
+ logWarn: jest.fn(),
31
+ logger: mockLogger,
32
+ }));
10
33
 
11
34
  // Add any other global setup here
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mherod/get-cookie",
3
- "version": "4.2.2",
4
- "description": "Node.js module for querying a local user's Chrome cookie",
3
+ "version": "4.3.1",
4
+ "description": "Node.js module for querying cookies from Chrome, Firefox, and Safari browsers",
5
5
  "packageManager": "pnpm@9.15.2",
6
6
  "type": "module",
7
7
  "source": "src/index.ts",
@@ -13,13 +13,13 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "types": "./dist/index.d.ts",
16
- "import": "./dist/index.mjs",
17
- "require": "./dist/index.js"
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.cjs"
18
18
  },
19
19
  "./cli": {
20
- "types": "./dist/cli/cli.d.ts",
21
- "import": "./dist/cli/cli.mjs",
22
- "require": "./dist/cli/cli.js"
20
+ "types": "./dist/cli.d.cts",
21
+ "import": "./dist/cli.cjs",
22
+ "require": "./dist/cli.cjs"
23
23
  }
24
24
  },
25
25
  "publishConfig": {
@@ -32,13 +32,14 @@
32
32
  "build": "pnpm run build:lib && pnpm run build:cli",
33
33
  "test": "jest",
34
34
  "type-check": "tsc --noEmit --skipLibCheck",
35
- "lint": "eslint . --format=codeframe",
36
- "lint:fix": "eslint . --format=codeframe --fix",
35
+ "lint": "biome check --diagnostic-level=error .",
36
+ "lint:fix": "biome check --write .",
37
+ "lint:staged": "biome check --staged --write .",
38
+ "format": "biome format --write .",
39
+ "format:check": "biome check --diagnostic-level=error .",
37
40
  "validate": "pnpm run type-check && pnpm run lint && pnpm run test && pnpm run check-links && pnpm run format:check",
38
41
  "prepack": "pnpm run validate",
39
42
  "prepublishOnly": "pnpm run clean && pnpm run validate && pnpm run build",
40
- "format": "prettier --write .",
41
- "format:check": "prettier --check \"**/*.{js,ts,json,md,yml,yaml}\" \"docs/**/*.{md,vue}\"",
42
43
  "dev": "tsc -w -p tsconfig.json & tsc-alias -w -p tsconfig.json",
43
44
  "read-github": "NODE_OPTIONS=\"-r tsconfig-paths/register\" tsx scripts/read-github-cookies.ts",
44
45
  "prepare": "husky install",
@@ -48,18 +49,18 @@
48
49
  "check-links": "./scripts/check-vitepress-links.sh"
49
50
  },
50
51
  "engines": {
51
- "node": "^20.0.0 || ^22.0.0"
52
+ "node": "^20.0.0 || ^22.0.0 || ^24.0.0"
52
53
  },
53
54
  "keywords": [],
54
55
  "author": "Matthew Herod",
55
56
  "license": "ISC",
56
57
  "dependencies": {
57
- "better-sqlite3": "^11.7.0",
58
- "consola": "^3.3.3",
58
+ "better-sqlite3": "^12.2.0",
59
+ "consola": "^3.4.2",
59
60
  "date-fns": "4.1.0",
60
- "destr": "^2.0.3",
61
- "dotenv": "16.4.7",
62
- "fast-glob": "^3.3.2",
61
+ "destr": "^2.0.5",
62
+ "dotenv": "16.5.0",
63
+ "fast-glob": "^3.3.3",
63
64
  "jsonwebtoken": "^9.0.2",
64
65
  "lodash-es": "^4.17.21",
65
66
  "minimist": "^1.2.8",
@@ -67,50 +68,50 @@
67
68
  "zod": "^3.24.1"
68
69
  },
69
70
  "devDependencies": {
70
- "@commitlint/cli": "19.6.1",
71
- "@commitlint/config-conventional": "19.6.0",
72
- "@jest/globals": "^29.7.0",
71
+ "@biomejs/biome": "1.9.4",
72
+ "@commitlint/cli": "19.8.1",
73
+ "@commitlint/config-conventional": "19.8.1",
74
+ "@jest/globals": "^30.0.4",
73
75
  "@types/better-sqlite3": "^7.6.12",
74
76
  "@types/jest": "^29.5.14",
75
- "@types/jsonwebtoken": "^9.0.7",
77
+ "@types/jsonwebtoken": "^9.0.10",
76
78
  "@types/lodash": "^4.17.13",
77
79
  "@types/lodash-es": "4.17.12",
78
80
  "@types/minimist": "^1.2.5",
79
- "@types/node": "^22.10.4",
80
- "@typescript-eslint/eslint-plugin": "^8.19.0",
81
- "@typescript-eslint/parser": "^8.19.0",
82
- "eslint": "^9.17.0",
81
+ "@types/node": "^24.0.14",
82
+ "@typescript-eslint/eslint-plugin": "^8.34.0",
83
+ "@typescript-eslint/parser": "^8.35.1",
84
+ "eslint": "^9.31.0",
83
85
  "eslint-formatter-codeframe": "^7.32.1",
84
86
  "eslint-import-resolver-typescript": "^3.7.0",
85
87
  "eslint-plugin-import": "^2.31.0",
86
- "eslint-plugin-jsdoc": "^50.6.1",
87
- "globals": "15.14.0",
88
+ "eslint-plugin-jsdoc": "^51.3.3",
89
+ "globals": "16.2.0",
88
90
  "husky": "^9.1.7",
89
91
  "jest": "^29.7.0",
90
92
  "lint-staged": "^15.3.0",
91
93
  "lodash": "4.17.21",
92
- "pnpm": "9.15.2",
94
+ "pnpm": "10.12.4",
93
95
  "prettier": "^3.4.2",
94
- "ts-jest": "^29.2.5",
96
+ "ts-jest": "^29.4.0",
95
97
  "ts-node": "^10.9.2",
96
- "tsc-alias": "^1.8.10",
97
- "tsup": "^8.3.5",
98
- "tsx": "4.19.2",
99
- "typedoc": "^0.27.6",
100
- "typedoc-plugin-markdown": "^4.4.1",
101
- "typescript": "^5.7.2",
102
- "vitepress": "^1.5.0"
98
+ "tsc-alias": "^1.8.16",
99
+ "tsup": "^8.5.0",
100
+ "tsx": "4.20.3",
101
+ "typedoc": "^0.28.7",
102
+ "typedoc-plugin-markdown": "^4.7.0",
103
+ "typescript": "^5.8.3",
104
+ "vitepress": "^1.6.3"
103
105
  },
104
106
  "lint-staged": {
105
107
  "*.{js,ts}": [
106
- "eslint --fix --format=codeframe",
107
- "prettier --write"
108
+ "biome check --write --no-errors-on-unmatched"
108
109
  ],
109
110
  "*.{json,md,yml,yaml}": [
110
- "prettier --write"
111
+ "biome format --write --no-errors-on-unmatched"
111
112
  ],
112
113
  "docs/**/*.{md,vue}": [
113
- "prettier --write",
114
+ "biome format --write --no-errors-on-unmatched",
114
115
  "./scripts/check-vitepress-links.sh"
115
116
  ]
116
117
  }
package/tsup.lib.ts CHANGED
@@ -19,7 +19,7 @@ export default defineConfig({
19
19
  platform: "node",
20
20
  bundle: true,
21
21
  tsconfig: "./tsconfig.tsup.json",
22
- external: ["fs", "path", "crypto", "os", "child_process"],
22
+ external: ["fs", "path", "crypto", "os", "child_process", "lodash-es"],
23
23
  esbuildOptions(options) {
24
24
  options.alias = {
25
25
  lodash: "lodash-es",