{"_id":"@3-/prettier-pnp","_rev":"3-869e3aafd815911637cabf2760d12729","name":"@3-/prettier-pnp","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.0":{"name":"@3-/prettier-pnp","version":"0.3.0","packageManager":"pnpm@8.7.4","author":{"name":"auvred","email":"aauvred@gmail.com","url":"https://github.com/auvred/"},"type":"module","description":"Run Prettier with plugins without installing them manually","keywords":["format","prettier"],"homepage":"https://github.com/auvred/prettier-pnp#readme","repository":{"type":"git","url":"git+https://github.com/auvred/prettier-pnp.git"},"license":"MIT","bin":{"prettier-pnp":"dist/bin.js"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","lint":"eslint .","release":"bumpp","test":"pnpm build && vitest","type-check":"tsc --noEmit","type-check-test":"tsc --noEmit -p tsconfig.test.json"},"dependencies":{"import-meta-resolve":"^3.0.0","prettier":"^3.0.3"},"devDependencies":{"@auvred/eslint-config":"^0.4.0","@types/node":"^18.17.14","bumpp":"^9.2.0","eslint":"^8.48.0","tsup":"^7.2.0","typescript":"~5.1.6","vitest":"^0.34.3"},"_id":"@3-/prettier-pnp@0.3.0","gitHead":"7c2b7c20455e907e966e63754e9017f3804d973f","bugs":{"url":"https://github.com/auvred/prettier-pnp/issues"},"_nodeVersion":"21.4.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-KnhyF2mBzpdALzB++yLrCFwPyw/IWJQvLJmv/Fc1fKfDeRobglQ+xewOvQSLPtKPhEaZZM9luU9XYk1uePgbIg==","shasum":"6bcdf678cf7565a0272ab02d241932840fce60ca","tarball":"https://registry.npmjs.org/@3-/prettier-pnp/-/prettier-pnp-0.3.0.tgz","fileCount":5,"unpackedSize":11574,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICkH2y66iyfTYS7J4bpaYF1+RJLHffDWqlxa1JRSlfWWAiEA4N75qbM9KGmisW0eZNRgTbGIbCIPmpobZ1kXAPSGfwE="}]},"_npmUser":{"name":"3tier","email":"3ti.site@gmail.com"},"directories":{},"maintainers":[{"name":"3tier","email":"3ti.site@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettier-pnp_0.3.0_1704626565592_0.37653312349862134"},"_hasShrinkwrap":false},"0.3.1":{"name":"@3-/prettier-pnp","version":"0.3.1","packageManager":"pnpm@8.7.4","author":{"name":"auvred","email":"aauvred@gmail.com","url":"https://github.com/auvred/"},"type":"module","description":"Run Prettier with plugins without installing them manually","keywords":["format","prettier"],"homepage":"https://github.com/auvred/prettier-pnp#readme","repository":{"type":"git","url":"git+https://github.com/auvred/prettier-pnp.git"},"license":"MIT","bin":{"prettier-pnp":"dist/bin.js"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","lint":"eslint .","release":"bumpp","test":"pnpm build && vitest","type-check":"tsc --noEmit","type-check-test":"tsc --noEmit -p tsconfig.test.json"},"dependencies":{"import-meta-resolve":"^3.0.0","prettier":"^3.0.3"},"devDependencies":{"@auvred/eslint-config":"^0.4.0","@types/node":"^18.17.14","bumpp":"^9.2.0","eslint":"^8.48.0","tsup":"^7.2.0","typescript":"~5.1.6","vitest":"^0.34.3"},"_id":"@3-/prettier-pnp@0.3.1","gitHead":"7c2b7c20455e907e966e63754e9017f3804d973f","bugs":{"url":"https://github.com/auvred/prettier-pnp/issues"},"_nodeVersion":"21.4.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-SjFsiAVZxEBDJyB64APr3FjMLtSLuPBr23x6inyuU9GWYrkoJIVlLyQXO0NJKu9lpbgyVxPf+Dd+QCAfI3L2FA==","shasum":"e78cf73241dddbb7087d068869f3b9d377256ba8","tarball":"https://registry.npmjs.org/@3-/prettier-pnp/-/prettier-pnp-0.3.1.tgz","fileCount":670,"unpackedSize":46739381,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHwFvdjEf/Hz2UC1mQIx1lPcKUPVUIxzwivd7NWbAvGQIhALlL4BNE2cXtnLzvRnGUbq9otLZXKhDXd3b+Xtp+u6+M"}]},"_npmUser":{"name":"3tier","email":"3ti.site@gmail.com"},"directories":{},"maintainers":[{"name":"3tier","email":"3ti.site@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettier-pnp_0.3.1_1704626623296_0.9075667073432558"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-07T11:22:45.502Z","0.3.0":"2024-01-07T11:22:45.833Z","modified":"2024-05-20T04:53:38.622Z","0.3.1":"2024-01-07T11:23:43.701Z"},"maintainers":[{"email":"i18n.site@gmail.com","name":"i18n-now"}],"description":"Run Prettier with plugins without installing them manually","homepage":"https://github.com/auvred/prettier-pnp#readme","keywords":["format","prettier"],"repository":{"type":"git","url":"git+https://github.com/auvred/prettier-pnp.git"},"author":{"name":"auvred","email":"aauvred@gmail.com","url":"https://github.com/auvred/"},"bugs":{"url":"https://github.com/auvred/prettier-pnp/issues"},"license":"MIT","readme":"# prettier-pnp\n\nPrettier-pnp is utility for running [Prettier](https://github.com/prettier/prettier) with plugins, without installing them manually.\n\n## Why?\n\nSometimes you need to format some files, but you don't want to create a `package.json`, install Prettier and plugins for it. Also Prettier can't load plugins installed globally (it tries to `import()` them, but Node.js [doesn't support import from `NODE_PATH`](https://nodejs.org/api/esm.html#esm_no_node_path)).\n\nThis may be useful for CI environments, where you need to quickly check the formatting of files.\n\n## How?\n\nPrettier-pnp works like a proxy for `prettier` cli. All arguments passed to `prettier-pnp` will be forwarded directly to `prettier`. Prettier-pnp adds only three new args:\n\n- `--pnp <plugin name>` or `--pnp <plugin name>@<version>`\n\n  Runs `prettier` with plugin named `<plugin name>` (or `<plugin name>@<version>` if the version was specified).\n\n  Example:\n\n  ```shell\n  npx prettier-pnp --pnp prettier-plugin-curly index.js\n  ```\n\n- `--pn <short plugin name>` or `--pn <short plugin name>@<version>`\n\n  Shorthand for `--pnp`. If plugin name starts with `prettier-plugin-`, then you can omit this part.\n\n  Example:\n\n  ```shell\n  npx prettier-pnp --pn curly index.js\n  ```\n\n- `--quiet`\n\n  Prevent any extra output (e.g plugin installation progress). Only the output of Prettier will be printed.\n\nPrettier-pnp includes Prettier as dependency. Also, all requested plugins are stored in the internal storage (`plugin-store` folder inside the installed `prettier-pnp`). So, when you run:\n\n```shell\nnpx prettier-pnp --pn my-plugin index.js\n```\n\nPrettier-pnp tries to install `prettier-plugin-my-plugin` as a regular NPM package. Then it resolves the absolute path to the plugin and passes it to the Prettier.\n\n> After you uninstall `prettier-pnp`, all plugins will also be uninstalled, because they are stored inside the `plugin-store`\n\nLet's assume that you have installed `prettier-pnp` globally to `/home/user/node_modules`. After\n\n```shell\nnpx prettier-pnp --pn my-plugin --single-quote index.js\n```\n\nThe folder structure will look like this:\n\n```\n/home/user/node_modules\n 📂 prettier-pnp\n ├─   package.json\n ├─ 📁 dist\n └─ 📂 plugin-store\n    ├─   package.json\n    └─ 📂 node_modules\n       └─ 📂 prettier-plugin-my-plugin\n          ├─   index.js\n          └─   package.json\n```\n\nAnd the Prettier will be executed with the following arguments:\n\n```shell\nprettier --plugin /home/user/node_modules/prettier-pnp/plugin-store/node_modules/prettier-plugin-my-plugin/index.js --single-quote index.js\n```\n\n## License\n\n[MIT](./LICENSE) License © 2023 [auvred](https://github.com/auvred)\n","readmeFilename":"README.md"}