{"name":"@pnpm/lifecycle","version":"0.0.0-20230605-20230605142810","keywords":["pnpm8","pnpm","lifecycle","scripts"],"license":"MIT","_id":"@pnpm/lifecycle@0.0.0-20230605-20230605142810","homepage":"https://github.com/pnpm/pnpm/blob/main/exec/lifecycle#readme","bugs":{"url":"https://github.com/pnpm/pnpm/issues"},"dist":{"shasum":"abef32d5a5def212559aa3cb08d20bb9d174e634","tarball":"http://registry-npm.ywwl.com/@pnpm/lifecycle/download/@pnpm/lifecycle-0.0.0-20230605-20230605142810.tgz","fileCount":12,"integrity":"sha512-JFL2cT2IOLLIp3gx9jk/Bhi71y58gyjeYf7if1DCSSsT4t+Lqu2eZK+wETG6XnLGTJrdED09WL9o2aOQH/ovQQ==","signatures":[{"sig":"MEUCIGqvtC1VN/yF3YCGAlmj/g8miBl7Urp8eaZO2q+7Z7nIAiEA34hgbIsX8KjgCa8SLItsxO/CMCNiVuGUJsifh3dwpXg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23766,"size":7409,"noattachment":false,"key":"/@pnpm/lifecycle/-/@pnpm/lifecycle-0.0.0-20230605-20230605142810.tgz"},"main":"lib/index.js","_from":"file:pnpm-lifecycle-0.0.0-20230605-20230605142810.tgz","types":"lib/index.d.ts","engines":{"node":">=16.14"},"exports":{".":"./lib/index.js"},"funding":"https://opencollective.com/pnpm","scripts":{"fix":"tslint -c tslint.json src/**/*.ts test/**/*.ts --fix","lint":"eslint \"src/**/*.ts\" \"test/**/*.ts\"","test":"pnpm run compile && pnpm run _test","_test":"jest","compile":"tsc --build && pnpm run lint --fix"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/e2ba42776f3b41458adf012f92e7b746/pnpm-lifecycle-0.0.0-20230605-20230605142810.tgz","_integrity":"sha512-JFL2cT2IOLLIp3gx9jk/Bhi71y58gyjeYf7if1DCSSsT4t+Lqu2eZK+wETG6XnLGTJrdED09WL9o2aOQH/ovQQ==","repository":{"url":"https://github.com/pnpm/pnpm/blob/main/exec/lifecycle","type":"git"},"_npmVersion":"8.19.4","description":"Package lifecycle hook runner","directories":{},"_nodeVersion":"16.20.0","dependencies":{"run-groups":"^3.0.1","@pnpm/error":"0.0.0-20230605-20230605142810","@pnpm/types":"9.1.0","path-exists":"^4.0.0","@pnpm/core-loggers":"9.0.1","@pnpm/npm-lifecycle":"^2.0.1","@pnpm/directory-fetcher":"0.0.0-20230605-20230605142810","@pnpm/read-package-json":"0.0.0-20230605-20230605142810","@pnpm/store-controller-types":"15.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"json-append":"1.1.1","@types/rimraf":"^3.0.2","load-json-file":"^6.2.0","@pnpm/lifecycle":"0.0.0-20230605-20230605142810","@zkochan/rimraf":"^2.1.2","@pnpm/test-fixtures":"0.0.0-20230605-20230605142810"},"peerDependencies":{"@pnpm/logger":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/lifecycle_0.0.0-20230605-20230605142810_1685976418780_0.7078993613148326","host":"s3://npm-registry-packages"},"readme":"# @pnpm/lifecycle\n\n> Package lifecycle hook runner\n\n<!--@shields('npm')-->\n[![npm version](https://img.shields.io/npm/v/@pnpm/lifecycle.svg)](https://www.npmjs.com/package/@pnpm/lifecycle)\n<!--/@-->\n\n## Installation\n\n```sh\npnpm add @pnpm/logger @pnpm/lifecycle\n```\n\n## Usage\n\n```ts\nimport runLifecycleHook, {runPostinstallHooks} from '@pnpm/lifecycle'\n\nconst targetPkgRoot = path.resolve('node_modules/target-pkg')\nconst pkg = require(path.join(targetPkgRoot, 'package.json'))\n\n// Run a specific hook\nawait runLifecycleHook('preinstall', pkg, {\n  pkgId: 'target-pkg/1.0.0',\n  pkgRoot: targetPkgRoot,\n  rawConfig: {},\n  rootModulesDir: path.resolve('node_modules'),\n  unsafePerm: true,\n})\n\n// Run all install hooks\nawait runPostinstallHooks({\n  pkgId: 'target-pkg/1.0.0',\n  pkgRoot: targetPkgRoot,\n  rawConfig: {},\n  rootModulesDir: path.resolve('node_modules'),\n  unsafePerm: true,\n})\n```\n\n## API\n\n### `runLifecycleHook(stage, packageManifest, opts): Promise<void>`\n\n### `runPostinstallHooks(opts): Promise<void>`\n\n## License\n\nMIT\n","publish_time":1685976418951,"maintainers":[{"name":"pnpmuser","email":"publish-bot@pnpm.io"},{"name":"zkochan","email":"z@kochan.io"}],"_cnpm_publish_time":1685976418951,"dist-tags":{"dev":"0.0.0-20230605-20230605142810","latest":"1001.0.37","latest-10":"1001.0.39","latest-6":"12.1.10","latest-9":"900.0.4","next":"8.1.1","pnpm-temp":"9.2.2"}}