Commit 90eaba1
committed
Improve Node.js/browser environment detection and dependency handling
- Updated shims.js to properly detect Node.js vs browser environments
- Only attempt to require Node.js modules (ws/jsdom) when actually in Node.js
- Added clearer error messages explaining required packages
- Moved jsdom and ws from optionalDependencies to peerDependencies
- Updated README.md to document Node.js requirements
- Added peerDependenciesMeta to mark Node.js deps as optional
- Improved error messages to be more specific about environment requirements1 parent ec0a08c commit 90eaba1
6 files changed
Lines changed: 134 additions & 82 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
0 commit comments