{"_id":"@emdzej/ncsx-patches","_rev":"6-df523e63b893cd9996a6c6b4c7c7917d","name":"@emdzej/ncsx-patches","dist-tags":{"latest":"0.9.0"},"versions":{"0.4.0":{"name":"@emdzej/ncsx-patches","version":"0.4.0","_id":"@emdzej/ncsx-patches@0.4.0","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"homepage":"https://github.com/emdzej/ncsx#readme","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"dist":{"shasum":"012f67bd85077cbe3620cb92f90baae46e508b26","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.4.0.tgz","fileCount":27,"integrity":"sha512-rkL6jb+ug8G9qu1np4SHeeZo3yLzVCEEQ/nBysN+MG8OoObOpuU8bzRepPMPQgIcVAdAjcPZn8JEpfDeNImcoQ==","signatures":[{"sig":"MEUCIQD4/ZwhhlDQQiX9epZumb4lJvmGd2P+GMUu4pOn5zYIpQIgemRkcdwqE4ZEVEUJq8N+Vw8yxxbFfSAHdPEPClCJ6rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47168},"main":"dist/index.js","type":"module","_from":"file:emdzej-ncsx-patches-0.4.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo *.tsbuildinfo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/42ca9d708a7882b6990d83c36c17b0d7/emdzej-ncsx-patches-0.4.0.tgz","_integrity":"sha512-rkL6jb+ug8G9qu1np4SHeeZo3yLzVCEEQ/nBysN+MG8OoObOpuU8bzRepPMPQgIcVAdAjcPZn8JEpfDeNImcoQ==","repository":{"url":"git+https://github.com/emdzej/ncsx.git","type":"git","directory":"packages/patches"},"_npmVersion":"11.14.1","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","yaml":"^2.6.0","@emdzej/ncsx-function-list":"0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/ncsx-patches_0.4.0_1779705645644_0.6845166207543594","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@emdzej/ncsx-patches","version":"0.5.1","_id":"@emdzej/ncsx-patches@0.5.1","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"homepage":"https://github.com/emdzej/ncsx#readme","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"dist":{"shasum":"8ca12628772d28024ce593dc3c33be0332b0bc1d","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.5.1.tgz","fileCount":35,"integrity":"sha512-XQFFHiAYXkwVF4pmG/eXSzFldJmZSMTxKuG7qmWUKb38KpBfFlXGUOYXQVyiAhsMCidOXyQ4tj1HLQSTKh5HpA==","signatures":[{"sig":"MEUCICdRa4kbdQjy2Lu1hqvYQqyNTb0HgB+hfNdISPWn9sCbAiEAt/mtHaQQobcjgKFr9iBWEWfMlcwzsokK00Jr4dPsGdE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72439},"main":"dist/index.js","type":"module","_from":"file:emdzej-ncsx-patches-0.5.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo *.tsbuildinfo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/eaebf299db4e82b038d2768e315af10a/emdzej-ncsx-patches-0.5.1.tgz","_integrity":"sha512-XQFFHiAYXkwVF4pmG/eXSzFldJmZSMTxKuG7qmWUKb38KpBfFlXGUOYXQVyiAhsMCidOXyQ4tj1HLQSTKh5HpA==","repository":{"url":"git+https://github.com/emdzej/ncsx.git","type":"git","directory":"packages/patches"},"_npmVersion":"11.14.1","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","yaml":"^2.6.0","@emdzej/ncsx-function-list":"0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/ncsx-patches_0.5.1_1779876453838_0.2256497824749759","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@emdzej/ncsx-patches","version":"0.6.0","_id":"@emdzej/ncsx-patches@0.6.0","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"homepage":"https://github.com/emdzej/ncsx#readme","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"dist":{"shasum":"a3a68bec7a329480780c396a3ade1eaac2d7e8f9","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.6.0.tgz","fileCount":35,"integrity":"sha512-0hN95QIgaWVgIdYFuH6wNvTTVuLWuSpo98yF1lhFWRwdYuvtmHd6EX+KkLy6hTwg4Nrw5oRJo4lZjNS+P5SG6w==","signatures":[{"sig":"MEQCIG9DN5ptZwqaiAwWg0figGr/yv5ZFltj/Gfkoz/me8yeAiARFo1+kLpZMwTO4v4GAYSREPi5ytfjVOSPB3i63+gzRg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72439},"main":"dist/index.js","type":"module","_from":"file:emdzej-ncsx-patches-0.6.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo *.tsbuildinfo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/b487c8adc61a64edcad2b5cd65d7cbc6/emdzej-ncsx-patches-0.6.0.tgz","_integrity":"sha512-0hN95QIgaWVgIdYFuH6wNvTTVuLWuSpo98yF1lhFWRwdYuvtmHd6EX+KkLy6hTwg4Nrw5oRJo4lZjNS+P5SG6w==","repository":{"url":"git+https://github.com/emdzej/ncsx.git","type":"git","directory":"packages/patches"},"_npmVersion":"11.14.1","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","yaml":"^2.6.0","@emdzej/ncsx-function-list":"0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/ncsx-patches_0.6.0_1779981257537_0.3195513689744076","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@emdzej/ncsx-patches","version":"0.7.0","_id":"@emdzej/ncsx-patches@0.7.0","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"homepage":"https://github.com/emdzej/ncsx#readme","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"dist":{"shasum":"71a594be2ad3d3817f12c98951006aadf99adf53","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.7.0.tgz","fileCount":35,"integrity":"sha512-VM/vCOyA78V6K5wGRGG2OyZCcwVLuwGldlCywWF/XvFVXICKaX/mKIrjoz3Z0J1tyjv2eKvQfX4JrCCrIefOrw==","signatures":[{"sig":"MEUCIQDf1YxuggsIZG6R9T7Fd4zK4tUk2gnhdFWk5zzZIbJ8AAIgLcSFVEAvnYbfUuPXCUGdIJpyG1vtDSS4y8LbT0Gh5Zo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72439},"main":"dist/index.js","type":"module","_from":"file:emdzej-ncsx-patches-0.7.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo *.tsbuildinfo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/4860e55afdaab4af2fd69908dfd61931/emdzej-ncsx-patches-0.7.0.tgz","_integrity":"sha512-VM/vCOyA78V6K5wGRGG2OyZCcwVLuwGldlCywWF/XvFVXICKaX/mKIrjoz3Z0J1tyjv2eKvQfX4JrCCrIefOrw==","repository":{"url":"git+https://github.com/emdzej/ncsx.git","type":"git","directory":"packages/patches"},"_npmVersion":"11.14.1","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","yaml":"^2.6.0","@emdzej/ncsx-function-list":"0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/ncsx-patches_0.7.0_1780063023715_0.36533454168465695","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@emdzej/ncsx-patches","version":"0.8.0","_id":"@emdzej/ncsx-patches@0.8.0","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"homepage":"https://github.com/emdzej/ncsx#readme","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"dist":{"shasum":"11158defbd79b7c3b2dcd52571c8d413e6629802","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.8.0.tgz","fileCount":35,"integrity":"sha512-gVUOevXrA2lpAsHgBObizFPcUczjc2Yn2LPXbujZgBHLA9rm3FVpt17PAIxthgqt+PH2vMvXXKrPeSjqn7eJrA==","signatures":[{"sig":"MEYCIQDXqKK2zKNTWCcYPC1TkEkJKlJffR2gamxrxFlCyl/xNgIhAKzB/XHFlFHGk1PZWLR+5pN8X1JWSDkVFOp44pJmfJip","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72439},"main":"dist/index.js","type":"module","_from":"file:emdzej-ncsx-patches-0.8.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint .","test":"vitest run --passWithNoTests","build":"tsc -p tsconfig.json","clean":"rm -rf dist .turbo *.tsbuildinfo","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/b36682b36fc1137d1b02999a415131f7/emdzej-ncsx-patches-0.8.0.tgz","_integrity":"sha512-gVUOevXrA2lpAsHgBObizFPcUczjc2Yn2LPXbujZgBHLA9rm3FVpt17PAIxthgqt+PH2vMvXXKrPeSjqn7eJrA==","repository":{"url":"git+https://github.com/emdzej/ncsx.git","type":"git","directory":"packages/patches"},"_npmVersion":"11.16.0","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","directories":{},"_nodeVersion":"22.22.1","dependencies":{"zod":"^3.23.0","yaml":"^2.6.0","@emdzej/ncsx-function-list":"0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","@types/node":"^22.13.1"},"_npmOperationalInternal":{"tmp":"tmp/ncsx-patches_0.8.0_1780758433725_0.939842272034741","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"name":"@emdzej/ncsx-patches","version":"0.9.0","description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","main":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{"yaml":"^2.6.0","zod":"^3.23.0","@emdzej/ncsx-function-list":"0.9.0"},"devDependencies":{"@types/node":"^22.13.1","vitest":"^2.1.8"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/emdzej/ncsx.git","directory":"packages/patches"},"scripts":{"build":"tsc -p tsconfig.json","test":"vitest run --passWithNoTests","test:watch":"vitest","lint":"eslint .","typecheck":"tsc --noEmit","clean":"rm -rf dist .turbo *.tsbuildinfo"},"_id":"@emdzej/ncsx-patches@0.9.0","bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"homepage":"https://github.com/emdzej/ncsx#readme","_integrity":"sha512-TKRk6gN/FqqufchffoH5RWYGwU4z6z3/SfIgWi+rxHNfxzV8b1g7UCFNI5sbltDoYkme+SVnlpEN4qjxGnN/BQ==","_resolved":"/private/var/folders/7h/x_w_580x4s9dq3sq11tpvzkwy3nbj8/T/613e5024eac09f63c464dbbd562ba6be/emdzej-ncsx-patches-0.9.0.tgz","_from":"file:emdzej-ncsx-patches-0.9.0.tgz","_nodeVersion":"22.22.1","_npmVersion":"11.16.0","dist":{"integrity":"sha512-TKRk6gN/FqqufchffoH5RWYGwU4z6z3/SfIgWi+rxHNfxzV8b1g7UCFNI5sbltDoYkme+SVnlpEN4qjxGnN/BQ==","shasum":"bd029374b4abcb8bf010852ccdca9f071c425766","tarball":"https://registry.npmjs.org/@emdzej/ncsx-patches/-/ncsx-patches-0.9.0.tgz","fileCount":35,"unpackedSize":72439,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBWzrB2QLqSL8W3Q9jKvlTCEevoBhUjp1fw/xBvOBfSzAiEAoO6sPYqXQpis6ciD02Lqkf6iL/+ybggNPNELJqVcS6c="}]},"_npmUser":{"name":"emdzej","email":"michal@jaskolski.pro"},"directories":{},"maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ncsx-patches_0.9.0_1783336577591_0.8082944490726955"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T10:40:45.405Z","modified":"2026-07-06T11:16:17.816Z","0.4.0":"2026-05-25T10:40:45.804Z","0.5.1":"2026-05-27T10:07:33.982Z","0.6.0":"2026-05-28T15:14:17.711Z","0.7.0":"2026-05-29T13:57:03.853Z","0.8.0":"2026-06-06T15:07:13.896Z","0.9.0":"2026-07-06T11:16:17.726Z"},"bugs":{"url":"https://github.com/emdzej/ncsx/issues"},"homepage":"https://github.com/emdzej/ncsx#readme","repository":{"type":"git","url":"git+https://github.com/emdzej/ncsx.git","directory":"packages/patches"},"description":"Shareable coding patches for ncsx — YAML files that describe FSW/PSW changes across one or more modules, with metadata for discoverability and runtime compatibility checks against the current FunctionList.","maintainers":[{"name":"emdzej","email":"michal@jaskolski.pro"}],"readme":"# @emdzej/ncsx-patches\n\nYAML patch format + reader/writer for shareable NCS coding changes\n(`.ncsxpatch.yaml`).\n\nA patch is the rich-format cousin of `FSW_PSW.MAN`: same FSW/PSW\nedits, wrapped in metadata (title, description, author, keywords,\nchassis, optional CI pin, optional `require_current` assertions)\nand capable of carrying multiple module blocks in a single file.\n\nSchema reference, compatibility model, and UI flow are documented in\n[`docs/patches.md`](../../docs/patches.md).\n\n## Usage\n\n```ts\nimport {\n  buildPatchFromCurrent,  // (in apps/web only — pulls in FunctionList)\n  parsePatch,\n  serializePatch,\n  resolveModulePatch,\n  modulesForCurrent,\n  type PatchFile,\n} from '@emdzej/ncsx-patches';\n\n// Read a patch file\nconst patch: PatchFile = parsePatch(readFileSync('feature.ncsxpatch.yaml', 'utf-8'));\n\n// Resolve against a loaded FunctionList\nconst { resolved, warnings } = resolveModulePatch(patch.modules[0], functionList);\n// `resolved.targets` is a Record<fsw_id, psw_id> ready to merge into the\n// FunctionTree's staged-edits state.\n\n// Round-trip\nwriteFileSync('out.ncsxpatch.yaml', serializePatch(patch));\n```\n\n## Exports\n\n| Export | Purpose |\n|---|---|\n| `parsePatch(text)` | YAML → `PatchFile` with zod validation. Throws `PatchSchemaError` on invalid input. |\n| `serializePatch(patch)` | `PatchFile` → YAML. Block-literal `description`, flow-style `keywords`/`coding_indexes`. |\n| `resolveModulePatch(modulePatch, list, currentCi?)` | Translate keyword edits → numeric `targets`. Returns warnings for unresolved entries + soft CI mismatch. |\n| `checkRequireCurrent(modulePatch, list, netto, decodeCurrentPsw)` | Evaluate `require_current` against a netto buffer. |\n| `modulesForCurrent(patch, moduleName)` | Pick the patch entries that apply to a given SG (case-insensitive). |\n| `targetsToEdits(list, targets)` | Inverse of `resolveModulePatch` — Record<fsw_id, psw_id> → Record<FSW_KW, PSW_KW>. |\n| `mergeModulePatch(patch, next, mode)` | Splice or replace a module block in an existing patch. |\n\n## License\n\n[PolyForm Noncommercial 1.0.0](../../LICENSE) — free for personal,\nresearch, and hobby use.\n","readmeFilename":"README.md"}