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

@mongodb-js/mdb-experiment-js

v1.6.0

Published

JS SDK to allocate and check experiment data at MongoDB.

Downloads

67

Readme

@mongodb-js/mdb-experiment-js-sdk

Evergreen project NPM package

Purpose

This SDK is meant to be used with clients who have access to the MMS backend endpoints and are authenticated. If you do not have access and are not authenticated, this code will not work.

Functionality

Please run npm run docs to view the TypeDocs for this repo.

Also see the wiki for experimentation process and best practices.

Local Development with MMS

For local development of the SDK codebase, it's helpful to link it to your local MMS code so that changes in the SDK source code can be easily QA'ed in your local MMS server. The steps to do so are as follows:

  1. In your SDK folder, where package.json is, run npm link
  2. Also run npm link [path to your MMS folder or $MMS_HOME if you have that alias]/client/node_modules/react. This ensures only 1 version of React is running in the local application.
  3. In MMS/client, where package.json is, run npm link @mongodb-js/mdb-experiment-js to symlink to your local mdb-experiment-js sdk folder.
  4. Run npm run prepare in your SDK folder whenever you want to generate new dist files, which MMS should automatically pick up.

In general this should be a one-time setup, although if you notice your local development isn't working, check for the presence of these symlinks in your node_modules folders and if needed, run these steps again.

If you want to mimic "real" MMS, aka use the specified version of the SDK package in MMS's package.json, you can run npm unlink @mongodb-js/mdb-experiment-js to remove the symlink to your local folder and then run npm install to get the SDK package from npm. If you want to relink the 2, just run npm link @mongodb-js/mdb-experiment-js again.

Documentation

The code will have JSDoc annotations and use TypeDoc to generate documentation.

Types

Each type/interface should have a description in a comment block. Each type property should have a description and an example as appropriate. There's no need to annotate @type information as JSDoc can figure that out on its own.

Functions

Each function should have at least:

- @description - including intended usage as a section in here.
- @params - include IF there are params.
- @return - include IF there is a returned value. Do not need to include the return type as Typescript takes care of documenting that for TypeDocs and Intellisense. Just write a descriptive comment on what the function returns.
- @throws - include IF the function can throw an error.
- @example

Release

Releases are triggered when a new Git tag is created. Here are the steps to publish a new package to npm:

  1. Make sure the package.json version field in the main branch is the package version you want to publish, following semantic versioning, ie #.#.# format. If it isn't, make a PR to make that update.
  2. Get a Growth team lead or @JohnMealy23 or @diiiefiend to create a new Github release tag off main with the tag value as the version and a description detailing the changes, with a reference and/or link to the related tickets. (If you would like to be added as permissioned to publish, also speak to the above parties--it requires being added to the Evergreen Project config list.)
  3. A new "publish" variant should appear in the the Evergreen project waterfall page. Monitor to see if the publish was successful.

License

Apache 2.0

See LICENSE