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

@u2dv/marketplace_common

v1.1.4

Published

Common code shared across Uptodate Marketplace projects.

Downloads

2

Readme

Marketplace Common

A library of reusable code for use in Uptodate Marketplace projects.

About this package

The Marketplace common package was created in May 2021 with the goal of improving code reuse and reducing code duplication in Marketplace projects. It is supposed to contain all classes, functions and constants which are used in more than one project. Instead of copying and pasting the same code from one repository to another, it is preferred that the shared code is put into this package.

What code should I put in here?

  • Everything that is used in more than one place. Put it in here instead of copying and pasting (duplicating) code.
  • Do not put code in here because you think it might be generally useful. If it is used in only one place, just put it there directly.
  • Do not put UI components or assets (styles, fonts, images etc.) here.

Publishing a new version

If you want to publish a new version of the package to the private NPM registry, you can follow these steps:

  1. Bump the package version by increasing the "version" property npm version major|minor|patch.

  2. Perform a test run of the publish to see what would happen:

    $ npm publish --dry-run

    Most importantly, this will show you the contents of the package as they would be published.

  3. Finally, once you have verified the package, publish it as follows:

    $ npm publish --access public

Note: be sure to only publish from the latest revision of the master branch. If you need to publish a pre-release for testing purposes, use the --tag argument to npm publish as described here: npm-prerelease.

Tip: trying out a new version before publishing

You can use the npm pack command to store the NPM package on your local disk:

$ cd marketplace_common
$ npm pack

Assuming that your marketplace_common directory is in /home/user/marketplace_common and the current version of the package is 1.0.4, npm pack will generate the following file:

/home/user/marketplace_common/u2dv-marketplace_common-1.0.4.tgz

You can now install this package into another project using npm as follows:

$ npm install /home/user/marketplace_common/u2dv-marketplace_common-1.0.4.tgz

Installing the package this way is 100% identical to installing the package from the package registry via the Internet. It can be a good way to verify that the package works as expected before publishing it.

Versioning considerations

Before you publish a new release, follow the semantic versioning guidelines in order to choose a new version number. Most importantly, use a major version bump (1.x => 2.x) if you need to publish a breaking change.

Contributing

First, install the dependencies:

$ npm install

You can now run the tests:

$ npm test