@oxog/devinspector 1.4.0 → 1.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.4.1] - 2026-12-02
11
+
12
+ ### Fixed
13
+ - The ESM and CommonJS builds (`dist/index.js`, `dist/index.cjs`) had `process.env.NODE_ENV` replaced with `"development"` at build time, so the `enabled` default ignored the consumer's `NODE_ENV` and the inspector stayed on in production builds. The builds read `process.env.NODE_ENV` again (bundlers replace it as usual); the UMD builds were not affected.
14
+
10
15
  ## [1.4.0] - 2026-12-02
11
16
 
12
17
  ### Fixed
@@ -1,7 +1,7 @@
1
1
  // src/core/env.ts
2
2
  function readNodeEnv() {
3
3
  try {
4
- return "development";
4
+ return process.env.NODE_ENV;
5
5
  } catch (e) {
6
6
  return void 0;
7
7
  }
@@ -29,4 +29,4 @@ export {
29
29
  hasDom,
30
30
  escapeHtml
31
31
  };
32
- //# sourceMappingURL=chunk-VZORB655.js.map
32
+ //# sourceMappingURL=chunk-KZ4SDSBO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/env.ts"],"sourcesContent":["/**\n * Helpers shared by every inspector variant.\n */\n\n/**\n * Reads `process.env.NODE_ENV` without assuming `process` exists.\n *\n * The expression is written out literally so bundlers (webpack DefinePlugin,\n * Vite, esbuild `define`, Rollup replace) substitute it at build time. In a\n * browser without such substitution, `process` is undefined and the access\n * throws, which is caught here.\n */\nexport function readNodeEnv(): string | undefined {\n try {\n return process.env.NODE_ENV;\n } catch {\n return undefined;\n }\n}\n\n/** Default for the `enabled` option: on everywhere except production builds. */\nexport function defaultEnabled(): boolean {\n return readNodeEnv() !== 'production';\n}\n\n/** True when a DOM is available (browser, jsdom), false during SSR/Node. */\nexport function hasDom(): boolean {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\nconst HTML_ESCAPES: Record<string, string> = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '`': '&#96;',\n};\n\n/** Escapes a value for use in HTML text or a quoted attribute. */\nexport function escapeHtml(value: unknown): string {\n return String(value).replace(/[&<>\"'`]/g, ch => HTML_ESCAPES[ch] as string);\n}\n"],"mappings":";AAYO,SAAS,cAAkC;AAChD,MAAI;AACF,WAAO;AAAA,EACT,SAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,iBAA0B;AACxC,SAAO,YAAY,MAAM;AAC3B;AAGO,SAAS,SAAkB;AAChC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa;AAC9D;AAEA,IAAM,eAAuC;AAAA,EAC3C,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAGO,SAAS,WAAW,OAAwB;AACjD,SAAO,OAAO,KAAK,EAAE,QAAQ,aAAa,QAAM,aAAa,EAAE,CAAW;AAC5E;","names":[]}
1
+ {"version":3,"sources":["../src/core/env.ts"],"sourcesContent":["/**\n * Helpers shared by every inspector variant.\n */\n\n/**\n * Reads `process.env.NODE_ENV` without assuming `process` exists.\n *\n * The expression is written out literally so bundlers (webpack DefinePlugin,\n * Vite, esbuild `define`, Rollup replace) substitute it at build time. In a\n * browser without such substitution, `process` is undefined and the access\n * throws, which is caught here.\n */\nexport function readNodeEnv(): string | undefined {\n try {\n return process.env.NODE_ENV;\n } catch {\n return undefined;\n }\n}\n\n/** Default for the `enabled` option: on everywhere except production builds. */\nexport function defaultEnabled(): boolean {\n return readNodeEnv() !== 'production';\n}\n\n/** True when a DOM is available (browser, jsdom), false during SSR/Node. */\nexport function hasDom(): boolean {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\nconst HTML_ESCAPES: Record<string, string> = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n '`': '&#96;',\n};\n\n/** Escapes a value for use in HTML text or a quoted attribute. */\nexport function escapeHtml(value: unknown): string {\n return String(value).replace(/[&<>\"'`]/g, ch => HTML_ESCAPES[ch] as string);\n}\n"],"mappings":";AAYO,SAAS,cAAkC;AAChD,MAAI;AACF,WAAO,QAAQ,IAAI;AAAA,EACrB,SAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,iBAA0B;AACxC,SAAO,YAAY,MAAM;AAC3B;AAGO,SAAS,SAAkB;AAChC,SAAO,OAAO,WAAW,eAAe,OAAO,aAAa;AAC9D;AAEA,IAAM,eAAuC;AAAA,EAC3C,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAGO,SAAS,WAAW,OAAwB;AACjD,SAAO,OAAO,KAAK,EAAE,QAAQ,aAAa,QAAM,aAAa,EAAE,CAAW;AAC5E;","names":[]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @oxog/devinspector v1.4.0
2
+ * @oxog/devinspector v1.4.1
3
3
  * (c) Ersin Koc <ersinkoc@gmail.com>
4
4
  * Released under the MIT License
5
5
  */
@@ -296,7 +296,7 @@
296
296
  }
297
297
 
298
298
  /** Package version, kept in sync with package.json (checked by tests). */
299
- const VERSION = '1.4.0';
299
+ const VERSION = '1.4.1';
300
300
 
301
301
  /**
302
302
  * DevInspector - the default inspector: floating widget plus a panel with
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @oxog/devinspector v1.4.0
2
+ * @oxog/devinspector v1.4.1
3
3
  * (c) Ersin Koc <ersinkoc@gmail.com>
4
4
  * Released under the MIT License
5
5
  */
@@ -296,7 +296,7 @@
296
296
  }
297
297
 
298
298
  /** Package version, kept in sync with package.json (checked by tests). */
299
- const VERSION = '1.4.0';
299
+ const VERSION = '1.4.1';
300
300
 
301
301
  /**
302
302
  * DevInspector - the default inspector: floating widget plus a panel with