@mherod/get-cookie 4.3.1 → 4.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mherod/get-cookie",
3
- "version": "4.3.1",
3
+ "version": "4.4.0",
4
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",
@@ -33,7 +33,9 @@
33
33
  "test": "jest",
34
34
  "type-check": "tsc --noEmit --skipLibCheck",
35
35
  "lint": "biome check --diagnostic-level=error .",
36
- "lint:fix": "biome check --write .",
36
+ "lint:eslint": "eslint --config eslint.config.js \"src/**/*.{ts,js}\"",
37
+ "lint:all": "pnpm run lint && pnpm run lint:eslint",
38
+ "lint:fix": "biome check --write --unsafe . && eslint --config eslint.config.js --fix \"src/**/*.{ts,js}\"",
37
39
  "lint:staged": "biome check --staged --write .",
38
40
  "format": "biome format --write .",
39
41
  "format:check": "biome check --diagnostic-level=error .",
@@ -46,7 +48,13 @@
46
48
  "docs": "typedoc && ./scripts/fix-typedoc.sh && vitepress build docs",
47
49
  "docs:dev": "vitepress dev docs",
48
50
  "docs:preview": "vitepress preview docs",
49
- "check-links": "./scripts/check-vitepress-links.sh"
51
+ "check-links": "./scripts/check-vitepress-links.sh",
52
+ "deps": "madge --ts-config ./tsconfig.json src/index.ts",
53
+ "deps:circular": "madge --circular --ts-config ./tsconfig.json src/",
54
+ "deps:orphans": "madge --orphans --ts-config ./tsconfig.json src/",
55
+ "deps:text": "depcruise src --include-only \"^src\" --output-type text",
56
+ "deps:html": "depcruise src --include-only \"^src\" --output-type html --output-to dependency-report.html",
57
+ "deps:validate": "depcruise src --config .dependency-cruiser.js"
50
58
  },
51
59
  "engines": {
52
60
  "node": "^20.0.0 || ^22.0.0 || ^24.0.0"
@@ -67,12 +75,15 @@
67
75
  "tsconfig-paths": "^4.2.0",
68
76
  "zod": "^3.24.1"
69
77
  },
78
+ "optionalDependencies": {
79
+ "@primno/dpapi": "^2.0.1"
80
+ },
70
81
  "devDependencies": {
71
- "@biomejs/biome": "1.9.4",
82
+ "@biomejs/biome": "2.2.3",
72
83
  "@commitlint/cli": "19.8.1",
73
84
  "@commitlint/config-conventional": "19.8.1",
74
85
  "@jest/globals": "^30.0.4",
75
- "@types/better-sqlite3": "^7.6.12",
86
+ "@types/better-sqlite3": "^7.6.13",
76
87
  "@types/jest": "^29.5.14",
77
88
  "@types/jsonwebtoken": "^9.0.10",
78
89
  "@types/lodash": "^4.17.13",
@@ -81,18 +92,20 @@
81
92
  "@types/node": "^24.0.14",
82
93
  "@typescript-eslint/eslint-plugin": "^8.34.0",
83
94
  "@typescript-eslint/parser": "^8.35.1",
95
+ "dependency-cruiser": "17.0.1",
84
96
  "eslint": "^9.31.0",
85
97
  "eslint-formatter-codeframe": "^7.32.1",
86
- "eslint-import-resolver-typescript": "^3.7.0",
98
+ "eslint-import-resolver-typescript": "^4.4.4",
87
99
  "eslint-plugin-import": "^2.31.0",
88
- "eslint-plugin-jsdoc": "^51.3.3",
100
+ "eslint-plugin-jsdoc": "^54.3.1",
89
101
  "globals": "16.2.0",
90
102
  "husky": "^9.1.7",
91
103
  "jest": "^29.7.0",
92
104
  "lint-staged": "^15.3.0",
93
105
  "lodash": "4.17.21",
106
+ "madge": "8.0.0",
94
107
  "pnpm": "10.12.4",
95
- "prettier": "^3.4.2",
108
+ "prettier": "^3.6.2",
96
109
  "ts-jest": "^29.4.0",
97
110
  "ts-node": "^10.9.2",
98
111
  "tsc-alias": "^1.8.16",
@@ -103,6 +116,11 @@
103
116
  "typescript": "^5.8.3",
104
117
  "vitepress": "^1.6.3"
105
118
  },
119
+ "pnpm": {
120
+ "overrides": {
121
+ "esbuild": "^0.25.0"
122
+ }
123
+ },
106
124
  "lint-staged": {
107
125
  "*.{js,ts}": [
108
126
  "biome check --write --no-errors-on-unmatched"
package/tsconfig.cli.json CHANGED
@@ -7,6 +7,10 @@
7
7
  "moduleResolution": "bundler",
8
8
  "composite": false,
9
9
  "declaration": true,
10
- "declarationMap": true
10
+ "declarationMap": true,
11
+ "strict": true,
12
+ "noEmitOnError": true,
13
+ "isolatedModules": true,
14
+ "verbatimModuleSyntax": false
11
15
  }
12
16
  }
package/tsup.cli.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { execSync } from "node:child_process";
2
+
1
3
  import { defineConfig } from "tsup";
2
4
 
3
5
  /**
@@ -12,7 +14,14 @@ import { defineConfig } from "tsup";
12
14
  export default defineConfig({
13
15
  entry: ["src/cli/cli.ts"],
14
16
  format: ["cjs"],
15
- dts: true,
17
+ dts: {
18
+ resolve: true,
19
+ entry: ["src/cli/cli.ts"],
20
+ compilerOptions: {
21
+ strict: true,
22
+ noEmitOnError: true,
23
+ },
24
+ },
16
25
  clean: false,
17
26
  sourcemap: true,
18
27
  minify: true,
@@ -20,9 +29,30 @@ export default defineConfig({
20
29
  bundle: true,
21
30
  tsconfig: "./tsconfig.cli.json",
22
31
  noExternal: ["lodash-es"],
32
+ treeshake: true,
33
+ splitting: false,
34
+ skipNodeModulesBundle: true,
23
35
  esbuildOptions(options) {
24
36
  options.alias = {
25
37
  lodash: "lodash-es",
26
38
  };
39
+ // Inject build timestamp at compile time
40
+ const now = new Date();
41
+ const timestamp = now.toISOString().replace("T", " ").slice(0, 19);
42
+
43
+ // Try to get git branch name
44
+ let gitBranch = "local";
45
+ try {
46
+ gitBranch = execSync("git rev-parse --abbrev-ref HEAD", {
47
+ encoding: "utf8",
48
+ }).trim();
49
+ } catch {
50
+ // Ignore git errors
51
+ }
52
+
53
+ options.define = {
54
+ ...options.define,
55
+ BUILD_TIMESTAMP: JSON.stringify(`${timestamp} UTC (${gitBranch})`),
56
+ };
27
57
  },
28
58
  });
package/tsup.lib.ts CHANGED
@@ -12,7 +12,14 @@ import { defineConfig } from "tsup";
12
12
  export default defineConfig({
13
13
  entry: ["src/index.ts"],
14
14
  format: ["cjs", "esm"],
15
- dts: true,
15
+ dts: {
16
+ resolve: true,
17
+ entry: ["src/index.ts"],
18
+ compilerOptions: {
19
+ strict: true,
20
+ noEmitOnError: true,
21
+ },
22
+ },
16
23
  clean: true,
17
24
  sourcemap: true,
18
25
  minify: true,
@@ -20,6 +27,9 @@ export default defineConfig({
20
27
  bundle: true,
21
28
  tsconfig: "./tsconfig.tsup.json",
22
29
  external: ["fs", "path", "crypto", "os", "child_process", "lodash-es"],
30
+ treeshake: true,
31
+ splitting: false,
32
+ skipNodeModulesBundle: true,
23
33
  esbuildOptions(options) {
24
34
  options.alias = {
25
35
  lodash: "lodash-es",