{"_id":"@aliou/sh","_rev":"8-18b9fe70809306ae86be9361de6cd277","name":"@aliou/sh","dist-tags":{"latest":"0.3.2"},"versions":{"0.0.1":{"name":"@aliou/sh","version":"0.0.1","license":"UNLICENSED","_id":"@aliou/sh@0.0.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"90b6a12a892e254650a7a6dbc8b8052f910e258b","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.0.1.tgz","fileCount":2,"integrity":"sha512-/ASGBXHj8Bs6qbmtLcP8lD6Qxhpi5f/JqwBYYAOaystSouEwprA0SCrMCr6Gt59K22CL+HX7JQdmfsJZoLi2bw==","signatures":[{"sig":"MEUCIQDGzktwRW/ohQaQ5x7SWkXmTjkHaCybVzxrrZcinx1obAIgey0Mdyq2l5/YUVYbl+ABrXLt7F79zoBS/77KYVBHdj4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":491},"main":"index.js","type":"module","exports":{".":"./index.js"},"gitHead":"bfd1cfeb91dddb81e7ec9363b53344c78cc6f850","_npmUser":{"name":"aliou","email":"code+npm@general-dexterity.com"},"repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"10.9.4","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP) - placeholder for OIDC bootstrap","directories":{},"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sh_0.0.1_1770224664641_0.963497349875363","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@aliou/sh","version":"0.1.0","license":"UNLICENSED","_id":"@aliou/sh@0.1.0","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"73f0870bd5d04b2ce8c2acf49209b1c14307963b","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.1.0.tgz","fileCount":54,"integrity":"sha512-MtVSUqNAHK8a0yQdwv4ADlTIBnEg8bpFXcqp0PaxwqxhSWAxcIrpAIPbsc3CJnUK3R++BcgaxBZ5saicHtU+8Q==","signatures":[{"sig":"MEQCIBBaiOnrF6BmoHjt33QnRrndD+86qViALivd54XueVA6AiA64lQhIs4kQw9VStDfSnde/RmOVp93ojvoTq3klygsjg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":140353},"type":"module","_from":"file:aliou-sh-0.1.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lint":"biome lint .","test":"vitest run","build":"pnpm build:js && pnpm build:types","check":"biome check .","format":"biome format --write .","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","lint-staged":"lint-staged"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b95d0d92-7dd9-43dc-8175-179502f9c300"}},"_resolved":"/tmp/f2fe3317d0cf7988734879fb95006884/aliou-sh-0.1.0.tgz","_integrity":"sha512-MtVSUqNAHK8a0yQdwv4ADlTIBnEg8bpFXcqp0PaxwqxhSWAxcIrpAIPbsc3CJnUK3R++BcgaxBZ5saicHtU+8Q==","repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"11.9.0","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs,json}":["biome check --write"]},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","vitest":"^3.2.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","lint-staged":"^16.2.0","@biomejs/biome":"^2.3.11","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.1.0_1770238086927_0.07038408206777191","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aliou/sh","version":"0.2.0","license":"UNLICENSED","_id":"@aliou/sh@0.2.0","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"5301d0ec6b9a2df72ae042838dc3ec58a527777b","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.2.0.tgz","fileCount":91,"integrity":"sha512-06PmGKpYl6eAJsZPhEPhBBgL3u/DVpyHoGSAG0Vgy9AQKxhPFrJyT4ckFjbIwTe5+IvsJITU5nkSanxi1FIHdQ==","signatures":[{"sig":"MEUCIES9EYM0GVzulLGg3NV7ziRM29ssXc4BNPjh2tqjaZlQAiEAw7nFBHc/HbGm3chwJsiyc0gLCVnsSNE9/55NuW3fUOU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":281713},"type":"module","_from":"file:aliou-sh-0.2.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lint":"biome lint .","test":"vitest run","build":"pnpm build:js && pnpm build:types","check":"biome check .","format":"biome format --write .","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","lint-staged":"lint-staged"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b95d0d92-7dd9-43dc-8175-179502f9c300"}},"_resolved":"/tmp/df383bdaff68251bf32d98c93eafbd34/aliou-sh-0.2.0.tgz","_integrity":"sha512-06PmGKpYl6eAJsZPhEPhBBgL3u/DVpyHoGSAG0Vgy9AQKxhPFrJyT4ckFjbIwTe5+IvsJITU5nkSanxi1FIHdQ==","repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"11.16.0","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs,json}":["biome check --write"]},"sideEffects":false,"_nodeVersion":"22.22.3","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","vitest":"^3.2.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","lint-staged":"^16.2.0","@biomejs/biome":"^2.3.11","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.2.0_1780420180571_0.8935807048862314","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aliou/sh","version":"0.2.1","license":"UNLICENSED","_id":"@aliou/sh@0.2.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"a02806b7c705bf0f4ad1e2063095b5d257716182","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.2.1.tgz","fileCount":91,"integrity":"sha512-xi/yAmZJ+WZ6P9Qnnw9Tl08Y7x0WCU6tSb0KzIT2eRrRVLjFWOWvX0LIcp6qFfA41lFR4aV+0RJOEwdDXr848A==","signatures":[{"sig":"MEUCIQCOejCvmivqBNVpXDg0SNnrCqPoBmNKWnIAf7bSBgjELAIgIiTfuvjHZAFfBE0aZyNhx6pz21KcjOaVtwsm7czwloY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":289201},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9f24c976e90ab1730e17b7b7c0d7859a5dc77303","scripts":{"lint":"biome lint .","test":"vitest run","build":"pnpm build:js && pnpm build:types","check":"biome check .","format":"biome format --write .","prepack":"pnpm build","prepare":"husky install","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","lint-staged":"lint-staged"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:290bf901-5c70-4206-8bef-2c63e86d1e4e"}},"repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"12.0.1","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs,json}":["biome check --write"]},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^3.2.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","lint-staged":"^16.2.0","@biomejs/biome":"^2.3.11","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.2.1_1785362650763_0.2694511991333395","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aliou/sh","version":"0.2.2","license":"UNLICENSED","_id":"@aliou/sh@0.2.2","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"278a82f01a8cd0400bdf28b9ea69028336a43d39","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.2.2.tgz","fileCount":93,"integrity":"sha512-fHcGEFDzRSv+z2r+ysWw47NlhaYrU2FujwMviWtyaZ71bHDXz8FI9VcP3jEkL5b2Otx2fc/QahyouaY0xV96Mw==","signatures":[{"sig":"MEUCIQDFPVu2rsNrNrqgb6QZlFdb+uY1yR/9Aa2WetnSxx3UyQIgdAHsTQA5f0x53IljdlN7fONdSbE7AxYZNMK/rIYhrD4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":289952},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"64d2396c90b7cb0d844a932a9b5a075e6dde4bd6","scripts":{"lint":"biome lint .","test":"vitest run","build":"pnpm build:js && pnpm build:types","check":"biome check .","format":"biome format --write .","prepack":"pnpm build","prepare":"husky install","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json","lint-staged":"lint-staged"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:290bf901-5c70-4206-8bef-2c63e86d1e4e"}},"repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"12.0.2","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs,json}":["biome check --write"]},"sideEffects":false,"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^3.2.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","lint-staged":"^16.2.0","@biomejs/biome":"^2.3.11","@changesets/cli":"^2.29.8"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.2.2_1785362657056_0.700766526978839","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aliou/sh","version":"0.3.0","license":"UNLICENSED","_id":"@aliou/sh@0.3.0","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"39465fd2efddef555d3b8cbb3131765515c10049","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.3.0.tgz","fileCount":93,"integrity":"sha512-Rti2aDL2DpU+YnVJl2s2jvDSdb+Fi2eRnQZxEp1DL94iOjOVgUk3zEL03gevDuqz+DWC9iP0mqUm2i2t8Qkf1w==","signatures":[{"sig":"MEUCIGycgQgklSssyKiO+XqBMwWYPFHex49HIa7WxWb7LWU1AiEAuYYyWAgtWwpAkK0alVZKusOPhmRClTiynMbqkUYuMeg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":294357},"type":"module","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"91a13989dea4eb49b0c7cd3311d3c18e2fb4b7e7","scripts":{"lint":"biome check","test":"vitest run","build":"pnpm build:js && pnpm build:types","format":"biome check --write","prepack":"pnpm build","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:290bf901-5c70-4206-8bef-2c63e86d1e4e"}},"repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"12.0.2","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.17.0","devDependencies":{"vitest":"^3.2.0","lefthook":"^1.11.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","@biomejs/biome":"^2.5.5","@changesets/cli":"^2.29.8","@aliou/biome-plugins":"0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.3.0_1787573289912_0.23651283289183644","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@aliou/sh","version":"0.3.1","license":"UNLICENSED","_id":"@aliou/sh@0.3.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/sh#readme","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"707a4c09906abc1b7231368ac55961ff4504a540","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.3.1.tgz","fileCount":95,"integrity":"sha512-Hv/aEdmU4UZ1uFvJCXK98W0wvFW3zUIgu9M2PmD9w3HlF9rNxAGo/7D5YKelbGfa2VVBYjQw4OlS+99M1yJeYw==","signatures":[{"sig":"MEUCIQCSyoKgv6y2VylpzeOVDduBl3ly+DU+StQvTdsWaK6g3gIgbg+HiwZiqNoeQv/JPIb31H/Sk4xr+UX+JjLwwLVHR2g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":308780},"type":"module","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9e5110cf666d00fb6f4f336a7f3575a5f2241434","scripts":{"lint":"biome check","test":"vitest run","build":"pnpm build:js && pnpm build:types","format":"biome check --write","prepack":"pnpm build","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:290bf901-5c70-4206-8bef-2c63e86d1e4e"}},"repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"12.0.2","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.17.0","devDependencies":{"vitest":"^3.2.0","lefthook":"^1.11.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^24.0.0","@biomejs/biome":"^2.5.5","@changesets/cli":"^2.29.8","@aliou/biome-plugins":"0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sh_0.3.1_1788552473427_0.31219933505696207","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"_id":"@aliou/sh@0.3.2","bugs":{"url":"https://github.com/aliou/sh/issues"},"dist":{"shasum":"725d08e5a84d3effed5fee003b9c3ee7fe01a1f8","tarball":"https://registry.npmjs.org/@aliou/sh/-/sh-0.3.2.tgz","integrity":"sha512-ECvKtKVn8HJQT5T7TXsPH9uCmn8yID7JJaoWafpHtB9Oykq1lkdgtWaCMbZYjFp7LrXA2WLOYKjT0NCJdwJrXQ==","fileCount":95,"unpackedSize":308780,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fsh@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDiUV1bTqVD+gHBY32DsCpCphn8/DlMrqO1HGop3X/ugQIhAKuUmMU6tULSHQ674uE0Dyh70+sYW/CdtjEy0w1ytvbH"}]},"name":"@aliou/sh","type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"e082574cc3503b4df83fff8387484c24f63b9de2","license":"UNLICENSED","scripts":{"lint":"biome check","test":"vitest run","build":"pnpm build:js && pnpm build:types","format":"biome check --write","prepack":"pnpm build","build:js":"rolldown -c","changeset":"changeset","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest","build:types":"tsc -p tsconfig.build.json"},"version":"0.3.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:290bf901-5c70-4206-8bef-2c63e86d1e4e"},"approver":{"name":"aliou","email":"code+npm@general-dexterity.com"}},"homepage":"https://github.com/aliou/sh#readme","repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"_npmVersion":"12.0.2","description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","directories":{},"maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"sideEffects":false,"_nodeVersion":"22.23.2","publishConfig":{"access":"public"},"packageManager":"pnpm@11.17.0","devDependencies":{"vitest":"^3.2.0","lefthook":"^1.11.0","rolldown":"^1.0.0-rc.1","typescript":"^5.8.0","@types/node":"^22.0.0","@biomejs/biome":"^2.5.5","@changesets/cli":"^2.29.8","@aliou/biome-plugins":"0.12.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sh_0.3.2_1789233467616_0.2108598212704489"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T17:04:24.556Z","modified":"2026-09-12T17:17:48.001Z","0.0.1":"2026-02-04T17:04:24.827Z","0.1.0":"2026-02-04T20:48:07.085Z","0.2.0":"2026-06-02T17:09:40.743Z","0.2.1":"2026-07-29T22:04:10.856Z","0.2.2":"2026-07-29T22:04:17.131Z","0.3.0":"2026-08-24T12:08:10.015Z","0.3.1":"2026-09-04T20:07:53.512Z","0.3.2":"2026-09-12T17:17:47.720Z"},"bugs":{"url":"https://github.com/aliou/sh/issues"},"license":"UNLICENSED","homepage":"https://github.com/aliou/sh#readme","repository":{"url":"git+https://github.com/aliou/sh.git","type":"git"},"description":"Shell parser/AST for POSIX/Bash/mksh/zsh (WIP)","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"readme":"# @aliou/sh\n\nTypeScript shell parser inspired by [mvdan/sh](https://github.com/mvdan/sh). Parses POSIX/Bash/mksh/zsh shell commands into a typed AST.\n\nZero runtime dependencies. ~66 KB bundled.\n\n## Usage\n\n```typescript\nimport { parse } from \"@aliou/sh\";\n\nconst { ast } = parse('echo \"hello $USER\" | grep hello');\n// ast.type === \"Program\"\n// ast.body[0].command.type === \"Pipeline\"\n```\n\nThe parser returns a `Program` node containing `Statement` nodes. Each statement wraps a `Command`, which is one of:\n\n- `SimpleCommand` -- words, assignments, redirects\n- `Pipeline`, `Logical` (`&&`, `||`)\n- `IfClause`, `WhileClause`, `ForClause`, `SelectClause`, `CaseClause`\n- `FunctionDecl`, `Subshell`, `Block`\n- `TestClause` (`[[ ]]`), `ArithCmd` (`(( ))`), `CoprocClause`, `TimeClause`\n- `DeclClause` (`declare`, `local`, `export`, `readonly`, `typeset`, `nameref`)\n- `LetClause` (`let`), `CStyleLoop` (`for (( ; ; ))`)\n\nWords contain typed parts: `Literal`, `SglQuoted`, `DblQuoted`, `ParamExp`, `CmdSubst`, `ArithExp`, `ProcSubst`, `BraceExp`, `ExtGlob`.\n\nAll AST nodes carry source positions via `pos` and `end` (`Pos`: `offset`, `line`, `col`).\n\n### Example: extract command names\n\n```typescript\nimport { parse, type SimpleCommand } from \"@aliou/sh\";\n\nfunction extractCommandNames(node: unknown): string[] {\n  if (!node || typeof node !== \"object\") return [];\n  const n = node as Record<string, unknown>;\n  const names: string[] = [];\n\n  if (n.type === \"SimpleCommand\") {\n    const cmd = n as unknown as SimpleCommand;\n    if (cmd.words?.length) {\n      const first = cmd.words[0];\n      if (first.parts.length === 1 && first.parts[0].type === \"Literal\") {\n        names.push(first.parts[0].value);\n      }\n    }\n  }\n\n  for (const val of Object.values(n)) {\n    if (Array.isArray(val)) {\n      for (const item of val) names.push(...extractCommandNames(item));\n    } else if (val && typeof val === \"object\") {\n      names.push(...extractCommandNames(val));\n    }\n  }\n  return names;\n}\n\nconst { ast } = parse(\"grep -rn npm package.json | head -5\");\nextractCommandNames(ast); // [\"grep\", \"head\"]\n```\n\n## Supported syntax\n\n- Simple commands, pipelines, logical operators (`&&`, `||`)\n- Single and double quotes, parameter expansion (`$var`, `${var:-default}`)\n- Command substitution (`$(cmd)`, `` `cmd` ``), arithmetic expansion (`$((expr))`)\n- Process substitution (`<(cmd)`, `>(cmd)`)\n- Heredocs (`<<`, `<<-`), herestrings (`<<<`)\n- All redirect operators (`>`, `>>`, `<`, `>&`, `<&`, `<>`, `>|`, `&>`, `&>>`), including `{varname}` file-descriptor redirects (`foo {fd}<file`, Bash/Zsh only)\n- Assignments (`FOO=bar cmd`), append assignments (`FOO+=bar`)\n- Array expressions (`arr=(a b c)`, `arr=([0]=x [1]=y)`)\n- Declaration builtins as special forms (`declare`, `local`, `export`, `readonly`, `typeset`, `nameref`)\n- `let` expressions (`let i++ j=2`)\n- Control flow: `if/elif/else/fi`, `while/until`, `for/in`, `for ((...))`, `select/in`, `case/esac`\n- Functions (`foo() {}`, `function foo {}`)\n- Subshells `()`, blocks `{}`\n- `[[ ]]` test expressions, `(( ))` arithmetic commands\n- `coproc`, `time`, negation (`!`)\n- Extended globs (`@(foo)`, `*(bar)`) in Bash/mksh mode\n- Comments (optionally preserved via `keepComments` option), backslash line continuations, background (`&`), semicolons\n\nBrace expansion (`{a,b}`, `{1..5}`) is available via the `splitBraces` helper; the parser does not emit it by default.\n\n## Parser options\n\n```typescript\ninterface ParseOptions {\n  dialect?: \"posix\" | \"bash\" | \"mksh\" | \"zsh\"; // default: \"bash\"\n  keepComments?: boolean; // default: false\n  recoverErrors?: boolean; // default: false\n}\n```\n\nUse `recoverErrors: true` to get a partial AST and a list of non-fatal parse errors instead of throwing.\n\n## Other exports\n\n- `parseStmtsSeq(source, options?)` -- lazy generator yielding top-level statements\n- `parseWordsSeq(source, options?)` -- lazy generator yielding words\n- `splitBraces(word)` -- expand `{a,b}` / `{1..5}` brace expansion in a word\n- `NO_POS` -- sentinel position for nodes built outside the parser\n\n## Install\n\n```bash\nnpm install @aliou/sh\n```\n\n## Development\n\nRequires [Nix](https://nixos.org/) (provides Node 22 and pnpm):\n\n```bash\nnix develop\n\npnpm install     # install deps\npnpm test        # run tests (vitest)\npnpm typecheck   # tsc --noEmit\npnpm lint        # biome check\npnpm format      # biome check --write\npnpm build       # rolldown + tsc declarations\n```\n\nGit hooks (via lefthook):\n- **pre-commit**: staged file formatting/linting + typecheck\n- **pre-push**: tests\n\n## Status\n\nWork in progress. Covers the Bash subset needed for AST-based command analysis (command classification, variable mutation tracking, guardrail enforcement). Not a complete POSIX/Bash parser.\n\n## License\n\nUNLICENSED\n","readmeFilename":"README.md"}