npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lilly_in_the_valley/test-postinstall-script-package

v1.0.6

Published

A minimal package with a postinstall script

Downloads

26

Readme

yarn add @lilly_in_the_valley/test-postinstall-script-package

https://www.npmjs.com/package/@lilly_in_the_valley/test-postinstall-script-package

Experiment 1.

Didn't see echo postinstall is running while installing this package.

AI said postinstall didn’t fire because Yarn Berry (v2+) disables lifecycle scripts by default for security. Asked to doublecheck and it wasn't confirmed.

I found out see here - https://github.com/yarnpkg/berry/issues/5276 that yarn doesn't print to console by default unless script fails.

Tried the setting enableInlineBuilds: true, removed node_modules, ran yarn install but still didn't see anything in coonsole.

Experiment 2.

Changed postinstall script to do touch postinstall_ran.txt. Didn't see the file in project root. AI said: "The new postinstall runs in the package’s own install directory, not in your project root, so the touch command is creating postinstall_ran.txt inside the package after it’s unpacked—not alongside your app code. Look under node_modules/@lilly_in_the_valley/test-postinstall-script-package/postinstall_ran.txt (or in Yarn Berry’s .yarn/unplugged/... folder)."

And it was right, I found this file in the package own install directory.

Experiment 3.

Updated postinstall script with "touch postinstall_ran_10_nov_10_56.txt" Added enableScripts: false Ran yarn add @lilly_in_the_valley/[email protected]

Checked node_modules, file touch postinstall_ran_10_nov_10_56.txt was there! So this setting had no effect.

Maybe it's this bug? https://github.com/yarnpkg/berry/issues/6258

Experiment 4.

Updated postinstall script with "touch postinstall_ran_10_nov_11_11.txt".

Removed node_modules. Removed lock files (package and yarn) Updated package json with version 1.0.5 of this package

Ran yarn install --mode skip-build

I saw the file postinstall_ran_10_nov_11_11.txt!! So skip-build is not working for some reason.

Docs say: skip-build will not run the build scripts at all. Note that this is different from setting enableScripts to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.

But it's not a build script, it's a post install script so this mode doesn't have any effect on disabling postinstall scripts?

Maybe because https://yarnpkg.com/features/pnp - pnp plugin wasn't enabled?

Experiment 5

Added to yarn config

nodeLinker: "pnp" enableScripts: false

published a new version of the package - 1.0.6 with postinstall_ran_10_nov_12_23.txt