@mherod/get-cookie 4.4.1 → 4.4.3

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/.husky/commit-msg CHANGED
File without changes
package/.husky/pre-commit CHANGED
@@ -7,8 +7,18 @@ export NVM_DIR="$HOME/.nvm"
7
7
  # Use the version specified in .nvmrc or fallback to default nvm version
8
8
  if [ -f .nvmrc ]; then
9
9
  nvm use
10
+ NVM_NODE_VERSION=$(cat .nvmrc | tr -d '\n')
10
11
  else
11
12
  nvm use default
13
+ NVM_NODE_VERSION=$(nvm alias default | awk '{print $NF}')
14
+ fi
15
+
16
+ # Explicitly set PATH to prioritize nvm's Node version
17
+ if [ -n "$NVM_NODE_VERSION" ]; then
18
+ NVM_NODE_PATH=$(nvm which "$NVM_NODE_VERSION" 2>/dev/null)
19
+ if [ -n "$NVM_NODE_PATH" ]; then
20
+ export PATH="$(dirname "$NVM_NODE_PATH"):$PATH"
21
+ fi
12
22
  fi
13
23
 
14
24
  # Try pnpm first, fallback to npx if pnpm not found
package/.husky/pre-push CHANGED
@@ -1,3 +1,18 @@
1
+ # Load nvm if available
2
+ export NVM_DIR="$HOME/.nvm"
3
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
4
+
5
+ # Use Node version from .nvmrc if it exists
6
+ [ -f .nvmrc ] && nvm use
7
+
8
+ # Ensure nvm's Node takes precedence in PATH
9
+ if [ -n "$NVM_DIR" ] && [ -d "$NVM_DIR/versions/node" ]; then
10
+ NODE_VERSION=$(nvm version)
11
+ if [ -n "$NODE_VERSION" ] && [ "$NODE_VERSION" != "system" ]; then
12
+ export PATH="$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH"
13
+ fi
14
+ fi
15
+
1
16
  # Try pnpm first, fallback to npx if pnpm not found
2
17
  if command -v pnpm >/dev/null 2>&1; then
3
18
  pnpm run validate
package/README.md CHANGED
@@ -66,14 +66,14 @@ npm install @mherod/get-cookie # or npm
66
66
  yarn add @mherod/get-cookie # or yarn
67
67
  ```
68
68
 
69
- ### Node.js Version Requirements 🔧
69
+ ### Runtime Requirements 🔧
70
70
 
71
- This project requires Node.js v20.0.0 or v22.0.0. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your Node.js versions.
71
+ Requires **Node.js v20, v22, v24, or v25**, or **Bun**. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your Node.js versions.
72
72
 
73
73
  ```bash
74
74
  # Install the correct Node.js version using nvm
75
- nvm install 22.0.0
76
- nvm use 22.0.0
75
+ nvm install 22
76
+ nvm use 22
77
77
 
78
78
  # Or simply run this in the project directory (we've included an .nvmrc file)
79
79
  nvm use
@@ -81,6 +81,8 @@ nvm use
81
81
 
82
82
  The project includes an `.nvmrc` file that specifies the required Node.js version, so `nvm use` will automatically switch to the correct version when you're in the project directory.
83
83
 
84
+ Bun is also supported natively — `bun:sqlite` is used automatically when running under Bun, with no additional configuration required.
85
+
84
86
  ## More Examples
85
87
 
86
88
  ### Command Line
@@ -150,6 +152,7 @@ get-cookie % example.com --output json > cookies-backup.json
150
152
  - **Multiple profiles**: Works with all browser profiles (Personal, Work, etc.)
151
153
  - **Batch operations**: Get multiple cookies efficiently with built-in SQL optimization (2-3x faster)
152
154
  - **Cross-platform**: macOS, Linux, Windows support
155
+ - **Bun support**: Works natively in Bun environments using `bun:sqlite`, with automatic runtime detection
153
156
  - **Output formats**: Raw values, JSON, pretty-printed tables
154
157
 
155
158
  ## Browser Support 🌐