{"_id":"iso-conf","_rev":"7-9cc34c8b25a03edbe348c92fe325b34d","name":"iso-conf","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"iso-conf","version":"0.1.0","keywords":["config","conf","settings","storage","standard-schema"],"author":{"url":"hugodias.me","name":"Hugo Dias","email":"hugomrdias@gmail.com"},"license":"MIT","_id":"iso-conf@0.1.0","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"a94ac88d8370bb7a69210792bef1de59808dacc7","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.1.0.tgz","fileCount":8,"integrity":"sha512-rEta5vCsiUG3sbZMebw63hzcXYUqYKTbS06Jb2qVwKENIOWofRTZ6baTmWTdP+fbwRxkU9yYFWCSuDxTG7rtkQ==","signatures":[{"sig":"MEYCIQDCO7ELELQeYfBgFOgyr+73WTQn/20tQyNpq4AVAWx3VgIhAJ3RDeGF7NBXW2CCUwc77EpdEF693iMurYzWUBrKOEXr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31071},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"gitHead":"093fc2fe93ea3cebf84afd1e44475471a2046ce0","scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"git+https://github.com/hugomrdias/iso-repo.git","directory":"packages/iso-conf"},"_npmVersion":"11.12.1","description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"_nodeVersion":"24.16.0","dependencies":{"dot-prop":"^10.1.0","iso-base":"workspace:^","env-paths":"^4.0.0","atomically":"^2.0.3","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","tempy":"^3.2.0","typescript":"6.0.3","@types/node":"^25.6.0","playwright-test":"^14.1.13"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.1.0_1780070194756_0.24072817871733365","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"iso-conf","version":"0.2.0","keywords":["config","conf","settings","storage","standard-schema"],"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","_id":"iso-conf@0.2.0","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"5d3aa366f83984a3ef3fab901bc60fb7c90630f7","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.2.0.tgz","fileCount":8,"integrity":"sha512-ihUDIPJrefV+hnpOmLkVyUjKb9JjWMf74jv9l+7HE2SLFxO0vrxCLt1IrKEMMmE+ByzId11c7W+4apfwuLFvsw==","signatures":[{"sig":"MEYCIQCzJefnw3BGF6sfx3nJNXantYTkKrlwC18CCQYOdrIovQIhAOtDveoLjHYKFxJ+/oZQzI7Nhhgx+4VX8d1PaLBoiTXs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31065},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"_nodeVersion":"24.16.0","dependencies":{"dot-prop":"^10.1.0","iso-base":"^4.4.0","env-paths":"^4.0.0","atomically":"^2.0.3","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","tempy":"^3.2.0","typescript":"6.0.3","@types/node":"^25.6.0","playwright-test":"^14.1.13"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.2.0_1780070385134_0.22690153719083006","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"iso-conf","version":"0.3.0","keywords":["config","conf","settings","storage","standard-schema"],"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","_id":"iso-conf@0.3.0","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"a505b54814895ed90e8022636fa171d0aad106e2","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.3.0.tgz","fileCount":8,"integrity":"sha512-m2Fz1NC3VhyagUMX9CH5unsCw2d6Gkz6+VlXty1hw4g2IzeihUuiIqn/Ujgzh9Fme2Axb6sYHknz0Z9WozWYog==","signatures":[{"sig":"MEQCIGTTvNZni4ZN2myS+ExzDDw6r4p8JNB4x9nk1W/ninSQAiAX5IPsPodXffWJkALuT4AF8gmSCdrqriTSBVtjumH0nw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":41739},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"_nodeVersion":"24.16.0","dependencies":{"dot-prop":"^10.1.0","iso-base":"^4.4.0","env-paths":"^4.0.0","atomically":"^2.0.3","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","tempy":"^3.2.0","typescript":"6.0.3","@types/node":"^25.6.0","playwright-test":"^14.1.13"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.3.0_1781530619777_0.6127861243142481","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"iso-conf","version":"0.4.0","keywords":["config","conf","settings","storage","standard-schema"],"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","_id":"iso-conf@0.4.0","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"53ee6b94444c0974308cf4ab51350b280db775e2","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.4.0.tgz","fileCount":8,"integrity":"sha512-sao0epcCXbNVzoJDWsL68b7FeI8/vLvOZV9VFa0wg6pOAVMfiYKZuKKhZxqxpgsr6RyNj6/WairckHzK/eyyWQ==","signatures":[{"sig":"MEUCIQCn7tivKfCunbxaNkACivvjmdpaYM8LprPDIkJm645SUAIgPMkSfeuJCJegP7xX40tRtpxYGWqnrqmeRBJowTIIWOE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":42778},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"_nodeVersion":"24.16.0","dependencies":{"dot-prop":"^10.1.0","iso-base":"^4.4.0","env-paths":"^4.0.0","atomically":"^2.0.3","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.3.6","tempy":"^3.2.0","typescript":"6.0.3","@types/node":"^25.6.0","playwright-test":"^14.1.13"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.4.0_1781535113460_0.8606111768878251","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"iso-conf","version":"0.4.1","keywords":["config","conf","settings","storage","standard-schema"],"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","_id":"iso-conf@0.4.1","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"f91428d3a59c726aad56a28d7a8551662804556f","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.4.1.tgz","fileCount":9,"integrity":"sha512-Al5Oou497Ov2djVTMw0nZO2FN8fUYCuJ0Je5/nTlKKQ+gruQjGzOmZ7YK20YtGYEZQCHXPSmWputwHzV3Gy95A==","signatures":[{"sig":"MEUCIBDY8hkYLnWDQN8JsQO6H++RXV/QBTOv4Gr7y1wgzv/wAiEAuRLcEwuwGjSZJxQUkOV2W9r16h8AouV12w2IweqwVk4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD/1D0TWndYiuxVgyXHmQuzaSIHjjivoYnVvjdKbRWXPgIhAKQltzyBcnMD+YZJq72QB00NdFuH8KB/HiJtMFvNvMnY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":52958},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"dependencies":{"dot-prop":"^10.2.0","iso-base":"^4.4.0","env-paths":"^4.0.0","atomically":"^2.1.1","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.5","tempy":"^3.2.0","typescript":"^6.0.3","@types/node":"^26.6.2","playwright-test":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.4.1_1790499837737_0.13786551659121926","host":"s3://npm-registry-packages-npm-production"}},"0.4.2":{"name":"iso-conf","version":"0.4.2","keywords":["config","conf","settings","storage","standard-schema"],"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","_id":"iso-conf@0.4.2","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"48ff11cfaaaf648e5a067a2659082a13e353c204","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-0.4.2.tgz","fileCount":12,"integrity":"sha512-vXGMZZOtm6jfq3CI1kcok48ETGcXy+ZZYFnz/OE9qOPvd7/UAvCuOCiekdG4Qxw+qMl9JvK591sH8/42zoDnHw==","signatures":[{"sig":"MEYCIQCcvsi9+gFAV/1JloxtvXMjOBzPj8f2sYXRGFjcg0CN3gIhAK20cqWdNfzqcygA3hY+jEM/Lo7iPfuvSYLTpBe1Gy+l","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQDPd55a7hSfx2T9Oal2wdIUcL60wVyp1BIYzVyInaoeCgIgNAyyr23cP4BzItYZuetGv9IAbnIT2KxHFyBBGTPvv1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":59937},"main":"src/index.js","type":"module","types":"dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"dependencies":{"dot-prop":"^10.2.0","iso-base":"^4.4.0","env-paths":"^4.0.0","@standard-schema/spec":"^1.1.0","@standard-schema/utils":"^0.3.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.5","tempy":"^3.2.0","typescript":"^6.0.3","@types/node":"^26.6.2","playwright-test":"^15.0.1"},"_npmOperationalInternal":{"tmp":"tmp/iso-conf_0.4.2_1790953749154_0.27398750541452177","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"_id":"iso-conf@1.0.0","bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"dist":{"shasum":"1fe555178195458544b7d4ae84f37b593a72cb84","tarball":"https://registry.npmjs.org/iso-conf/-/iso-conf-1.0.0.tgz","fileCount":15,"integrity":"sha512-zReeNnX3YB/3LV4nB/3qPGpAGaf5wqEYfigZAWq/fRqhBtQmQq/ymdbFfDE6XErO9ZU/0rmjLxsYGQhs9zP75w==","signatures":[{"sig":"MEYCIQDqPgzkGXzniApkj5qA/6gpiyfP45DykQ/rC3i2BuSscwIhAJBORxxgoeHnswv+2WeV1AmoFdSq76z19ZI1M9Y5eGvs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG6H5WL8Bg3/8xGCxyYyxKnBEV6Du73gJ98d1AVp8YHDAiEA9mtCzoLNHyp7SXV5Uy07vDpXTpwkclap9w1DHJvjuLM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/iso-conf@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":93424},"main":"src/index.js","name":"iso-conf","type":"module","types":"dist/src/index.d.ts","author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","exports":{".":{"types":"./dist/src/index.d.ts","default":"./src/index.js"},"./types":{"types":"./dist/src/types.d.ts"}},"license":"MIT","scripts":{"lint":"tsc --build && biome check --no-errors-on-unmatched --files-ignore-unknown=true .","test":"pnpm run test:node","test:node":"playwright-test 'test/**/!(*.browser).test.js' --mode node"},"version":"1.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"6b17c238-bd92-46be-ace7-6c9c623bd0a7"}},"depcheck":{"ignores":["@types/*"],"specials":["bin"]},"homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","keywords":["config","conf","settings","storage","standard-schema"],"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","directories":{},"maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"dependencies":{"iso-base":"^4.4.0","@standard-schema/spec":"^1.1.0"},"publishConfig":{"provenance":true},"typesVersions":{"*":{"types":["dist/src/types"]}},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.6.5","tempy":"^3.2.0","dot-prop":"^10.2.0","env-paths":"^4.0.0","typescript":"^6.0.3","@types/node":"^26.6.2","playwright-test":"^15.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/iso-conf_1.0.0_1792494059423_0.31891193833512466"}}},"time":{"created":"2026-05-29T15:56:34.680Z","modified":"2026-10-20T11:01:00.065Z","0.1.0":"2026-05-29T15:56:34.917Z","0.2.0":"2026-05-29T15:59:45.278Z","0.3.0":"2026-06-15T13:36:59.950Z","0.4.0":"2026-06-15T14:51:53.609Z","0.4.1":"2026-09-27T09:03:57.823Z","0.4.2":"2026-10-02T15:09:09.264Z","1.0.0":"2026-10-20T11:00:59.520Z"},"bugs":{"url":"https://github.com/hugomrdias/iso-repo/issues"},"author":"Hugo Dias <hugomrdias@gmail.com> (hugodias.me)","license":"MIT","homepage":"https://github.com/hugomrdias/iso-repo/tree/master/packages/iso-conf","keywords":["config","conf","settings","storage","standard-schema"],"repository":{"url":"hugomrdias/iso-repo","directory":"packages/iso-conf"},"description":"Simple config handling with Standard Schema validation and extended JSON serialization","maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"readme":"# iso-conf [![NPM Version](https://img.shields.io/npm/v/iso-conf.svg)](https://www.npmjs.com/package/iso-conf) [![License](https://img.shields.io/npm/l/iso-conf.svg)](https://github.com/hugomrdias/iso-repo/blob/main/license) [![iso-conf](https://github.com/hugomrdias/iso-repo/actions/workflows/iso-conf.yml/badge.svg)](https://github.com/hugomrdias/iso-repo/actions/workflows/iso-conf.yml)\n\n> Simple config handling for your app or module with [Standard Schema](https://standardschema.dev) validation and extended JSON serialization\n\n## Features\n\n- Fully typed via [Standard Schema](https://standardschema.dev) — works with Zod, Valibot, ArkType, and more\n- Extended JSON types (URL, Map, Set, bigint, RegExp, Uint8Array)\n- Atomic writes to disk, with an opt-in lock for concurrent processes\n- Reading never writes\n- Dot-notation access for nested properties\n- Change hooks (`onDidChange`, `onDidAnyChange`)\n- Defaults from schema\n\n## Install\n\n```bash\npnpm install iso-conf\n```\n\n## Usage\n\n```js\nimport { z } from 'zod/v4'\nimport { Conf } from 'iso-conf'\n\nconst schema = z.object({\n  foo: z.number().min(1).max(100).default(50),\n  bar: z.url().optional(),\n})\n\nconst config = new Conf({ projectName: 'my-app', schema })\n\nconfig.set('foo', 42)\nconsole.log(config.get('foo'))\n//=> 42\n```\n\nAny [Standard Schema](https://standardschema.dev) compliant library can be used for the `schema` option. Zod is shown above as an example only.\n\n### Defaults and required fields\n\nMissing top-level keys are filled from the `defaults` option and then from schema defaults, on every read and write. `defaults` is required when the schema has required fields without a schema default, since a fresh config would otherwise fail validation.\n\n```js\nconst schema = z.object({\n  token: z.string(),\n  retries: z.number().default(3),\n})\n\nconst config = new Conf({ projectName: 'my-app', schema, defaults: { token: '' } })\n\nconfig.reset('token') // => ''\nconfig.clear() // => { token: '', retries: 3 }\n```\n\nThe schema output is what gets written to disk and validated again on the next read, so it must also be valid schema input. Transforms that change a value's type (e.g. `z.string().transform((s) => s.length)`) are rejected on write.\n\n### Reading never writes\n\nCreating a `Conf` and reading from it (`get`, `has`, `size`, `store`, iteration) never touches the disk beyond reading the config file. The file is read and validated on every access, so a missing, corrupt or schema-invalid file throws from the first read, not from the constructor. A missing file reads as defaults and its folder is not created, so reads work in read-only folders.\n\nDefaults, schema defaults and coerced values are applied in memory on every read, and reach the disk on the next write (`set`, `delete`, `reset`, `appendToArray`, `clear` or `store =`).\n\nThe one exception is `watch: true`, which creates an empty config file (and its folder) when there is none, because `fs.watch` needs a target.\n\n### Concurrent processes\n\nWrites are atomic, so readers always see a complete file. But every write reads the file, changes it and writes it back, so when two processes write at the same time the last one wins and the other's change is lost.\n\nSet `lock: true` to hold an exclusive lock file, `<path>.lock`, while a write reads, changes and writes the file. Writers in other processes wait for it. Reads never take or wait on the lock.\n\n```js\nconst config = new Conf({ projectName: 'my-app', lock: true })\n```\n\n`lock` also takes `{ timeout, stale }`, in milliseconds:\n\n- `timeout` (default `1000`): how long a write waits for the lock before throwing a `ConfError` with code `ERR_CONF_LOCKED`. The file is left unchanged.\n- `stale` (default `10000`): age after which a lock left behind by a killed process is removed. A lock whose process is gone is removed right away when it was taken on the same host.\n\nCreating the lock file needs a writable folder, as writes do. In a read-only folder a locked write throws the file system error (`EACCES` or `EROFS`).\n\nUse `update(fn)` for a change that depends on the current value. `fn` gets a fresh copy of the stored config and returns the new one. With `lock`, no other process can write in between, and nothing is written when the config is unchanged.\n\n```js\nimport { randomUUID } from 'node:crypto'\n\n// Every process ends up with the same id.\nconst { installId } = config.update((store) =>\n  store.installId ? store : { ...store, installId: randomUUID() }\n)\n```\n\n### Errors\n\nA config file that can't be loaded throws a `ConfError`:\n\n| `code` | When |\n| --- | --- |\n| `ERR_CONF_PARSE` | The file could not be deserialized (corrupt JSON, a bad extended JSON value, or a custom `deserialize` that threw). `cause` is the original error. |\n| `ERR_CONF_SCHEMA` | The file failed schema validation. `issues` holds the Standard Schema issues. |\n| `ERR_CONF_INVALID_VALUE` | A value passed to a write method failed schema validation. Nothing is written. |\n| `ERR_CONF_LOCKED` | With `lock`, a write timed out waiting for another process to release the lock. Nothing is written. |\n\nEvery `ConfError` has the config file `path`.\n\nFile system errors are not wrapped. They are thrown as Node system errors with `code`, `syscall` and `path` set by `node:fs`. Reads can throw `EACCES`, `EPERM`, `EISDIR` or `ENOTDIR`. Writes can also throw `EROFS`, `ENOSPC` or `EDQUOT`, and leave no temporary file behind. Reading a missing file never throws.\n\n```js\nimport { Conf, ConfError } from 'iso-conf'\n\ntry {\n  config.get('foo')\n} catch (error) {\n  if (error instanceof ConfError) {\n    console.error(`Config file at ${error.path} is invalid: ${error.message}`)\n  }\n  throw error\n}\n```\n\n#### Recovering an invalid file\n\n`config.store = value` and `config.clear()` don't read the current file, so they replace a corrupt or schema-invalid file. Merging writes (`set`, `delete`, `reset`, `appendToArray`) load the file first and throw the same `ConfError` as a read.\n\nWith `clearInvalidConfig: true`, an invalid file reads as an empty config instead of throwing. The next write copies the invalid file to `<name>.invalid-<timestamp>.<ext>` next to it (for example `config.invalid-1760000000000.json`), with mode `configFileMode`, and then replaces it.\n\n## Docs\n\nCheck <https://hugomrdias.github.io/iso-repo/modules/iso_conf.html>\n\n## License\n\nMIT © [Hugo Dias](http://hugodias.me)\n","readmeFilename":""}