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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dewey

v0.1.4

Published

Make lerna.js work for serverless

Downloads

14

Readme

Dewey is a simple system for replacing symlinks in lerna with the actual local packages.

Documentation

What issue is dewey solving?

The typical workflow for a lambda function is: develop->package->upload->run. I personally like to call it zip and ship :P. This allows for a pre-deploy script of running dewey in your lerna project to unsymlink the data in a smart way.

When developing in a monorepo of multiple functions we end up duplicating a lot of code. Dewey aims to leverage the power of lerna to be able to remove the symlinks lerna provides in mono repo node_modules and replace it with the actual package from the repo. Allowing for development via symlinks, yet allowing for seemless deployment.

Why is this useful?

Dewey aims to bridge the gap between lerna and succesfully deploying shared code in a serverless project. Lerna does not play well with serverless function deployment because of the symlinking when we are packaging our serverless functions for upload to their environments(Google Cloud Functions, AWS Lambda). It allows us to remove the symlinks and pack the real module into our lerna packages.

Bridging the gap for learning and deploying

There has always beeen a huge pain point in learning serverless functions. This allows us to realize that we can have multiple functions in one repo and and they can dependon eachother. Dewey makes lerna a viable candidate for monorepo management

Deploying serverless functions normally involves using some kind of tool(cloudformation, terraform). When we add dewey as a step to our deployment workflow, we can simply package and deploy our latest code.

Scope

The scope of this project is to simply provide a tool for deployment and to make lerna more powerful.

What it does

  • It packages up node specific code.

What it does not do

  • It does not do any transpilation
  • It does not work with non-package.json systems.

Warnings

It does make use of the fs-extra package to remove and copy symlinks and packages

Usage

const dewey = require('dewey');

// Dewey will automatically search within all package.json's!
dewey();

TODO

  • [ ] Honoring an ignore file with each project.
  • [ ] Allow a single package to be targeted
  • [ ] Allow a single directory to be targeted
  • [ ] Allow a cleanup step which ideally would just be removing packages and running lerna bootstrap.
  • [ ] Tests