This seems to be specific to the JavaScript ecosystem, and to some extent orthogonal to AI coding. Micro-libraries with trivial-ish functionality are generally more difficult to justify to add as a dependency. I’m sure AI coding agents will eventually learn as well that there’s a balance to strike between implementing stuff yourself and the use of libraries. I’m also sure that people who are interested in actual coding will continue to open-source what they find useful, and other people like them will read their code.