@agnostack/env 2.0.0-canary.3 → 2.0.0-canary.5

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
@@ -1,3 +1,17 @@
1
+ # [2.0.0-canary.5](https://github.com/[secure]/env/compare/v2.0.0-canary.4...v2.0.0-canary.5) (2026-08-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * read the env cleanLowerEnv is given instead of process.env ([b9afcdc](https://github.com/[secure]/env/commit/b9afcdc27f3292d3b7e6030376a3eba25df787b3))
7
+
8
+ # [2.0.0-canary.4](https://github.com/[secure]/env/compare/v2.0.0-canary.3...v2.0.0-canary.4) (2026-08-28)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * anchor the flag-marker strip so only a leading -- is removed ([ad48341](https://github.com/[secure]/env/commit/ad4834116a15eafec33414f9b16acd669c212d64))
14
+
1
15
  # [2.0.0-canary.3](https://github.com/[secure]/env/compare/v2.0.0-canary.2...v2.0.0-canary.3) (2026-08-28)
2
16
 
3
17
 
package/dist/env.js CHANGED
@@ -52,7 +52,7 @@ const cleanEnv = (_env, keyValidator = exports.nextKeyValidator) => (Object.entr
52
52
  * @param {(envKey: string) => boolean} [keyValidator]
53
53
  * @returns {Record<string, string | undefined>}
54
54
  */
55
- const cleanLowerEnv = (_env, keyValidator = exports.lowerKeyValidator) => (cleanEnv(process.env, keyValidator));
55
+ const cleanLowerEnv = (_env, keyValidator = exports.lowerKeyValidator) => (cleanEnv(_env, keyValidator));
56
56
  exports.cleanLowerEnv = cleanLowerEnv;
57
57
  /**
58
58
  * @param {Record<string, string | undefined> | undefined} _env
@@ -118,7 +118,9 @@ const parseEnvData = (_env = process.env) => {
118
118
  const [__param, _value] = (separatorIndex === -1)
119
119
  ? [arg, undefined]
120
120
  : [arg.slice(0, separatorIndex), arg.slice(separatorIndex + 1)];
121
- const _param = (_c = __param === null || __param === void 0 ? void 0 : __param.replace) === null || _c === void 0 ? void 0 : _c.call(__param, '--', '');
121
+ // NOTE: anchored. A bare `.replace('--', '')` strips the first `--` ANYWHERE, so
122
+ // `my--param=x` arrived as `myparam`. Only a leading `--` is a flag marker.
123
+ const _param = (_c = __param === null || __param === void 0 ? void 0 : __param.replace) === null || _c === void 0 ? void 0 : _c.call(__param, /^--/, '');
122
124
  if ((0, display_js_1.stringEmptyOnly)(_param)) {
123
125
  return {
124
126
  args: _args,
package/dist/esm/env.js CHANGED
@@ -46,7 +46,7 @@ const cleanEnv = (_env, keyValidator = nextKeyValidator) => (Object.entries(_env
46
46
  * @param {(envKey: string) => boolean} [keyValidator]
47
47
  * @returns {Record<string, string | undefined>}
48
48
  */
49
- export const cleanLowerEnv = (_env, keyValidator = lowerKeyValidator) => (cleanEnv(process.env, keyValidator));
49
+ export const cleanLowerEnv = (_env, keyValidator = lowerKeyValidator) => (cleanEnv(_env, keyValidator));
50
50
  /**
51
51
  * @param {Record<string, string | undefined> | undefined} _env
52
52
  * @param {(envKey: string) => boolean} [keyValidator]
@@ -110,7 +110,9 @@ export const parseEnvData = (_env = process.env) => {
110
110
  const [__param, _value] = (separatorIndex === -1)
111
111
  ? [arg, undefined]
112
112
  : [arg.slice(0, separatorIndex), arg.slice(separatorIndex + 1)];
113
- const _param = (_c = __param === null || __param === void 0 ? void 0 : __param.replace) === null || _c === void 0 ? void 0 : _c.call(__param, '--', '');
113
+ // NOTE: anchored. A bare `.replace('--', '')` strips the first `--` ANYWHERE, so
114
+ // `my--param=x` arrived as `myparam`. Only a leading `--` is a flag marker.
115
+ const _param = (_c = __param === null || __param === void 0 ? void 0 : __param.replace) === null || _c === void 0 ? void 0 : _c.call(__param, /^--/, '');
114
116
  if (stringEmptyOnly(_param)) {
115
117
  return {
116
118
  args: _args,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agnostack/env",
3
- "version": "2.0.0-canary.3",
3
+ "version": "2.0.0-canary.5",
4
4
  "author": "agnoStack Dev <developers@agnostack.com> (https://agnostack.com)",
5
5
  "owner": "agnoStack",
6
6
  "description": "Please contact agnoStack via info@agnostack.com for any questions",