@inglorious/utils 5.4.0 → 5.4.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/storage.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/utils",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "A set of general-purpose utility functions designed with functional programming principles in mind.",
5
5
  "author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -154,9 +154,9 @@
154
154
  "sideEffects": false,
155
155
  "devDependencies": {
156
156
  "@inglorious/eslint-config": "1.2.0",
157
- "prettier": "^3.9.10",
157
+ "prettier": "^3.10.1",
158
158
  "vite": "^8.3.8",
159
- "vitest": "^5.1.0"
159
+ "vitest": "^5.1.1"
160
160
  },
161
161
  "engines": {
162
162
  "node": ">= 26"
package/src/storage.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { isPromiseLike } from "./data-structures/promise.js"
2
2
 
3
- const DEFAULT_STORAGE = () => globalThis.localStorage
3
+ // The browser's, never Node's: on a server it would be shared by every request,
4
+ // and Node 26 warns when it is read without --localstorage-file.
5
+ const DEFAULT_STORAGE = () => globalThis.window?.localStorage
4
6
 
5
7
  /**
6
8
  * Reads a value back as JSON.