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

@lambrioanpm/nemo-dolorum-sit

v1.0.0

Published

<h3 align="center"> @lambrioanpm/nemo-dolorum-sit </h3>

Downloads

3

Maintainers

duchoang1212zzduchoang1212zz

Keywords

$.extenditerationsuperagentmapBigUint64ArraytimecacheopenertostringtagformES3startBigInt64ArrayjwtuuidsameValueZerotakeECMAScript 2016safefast-deep-clonejsonschemahardlinkssyntaxerrorwrapsomeupcollection.es6bootstrap lesscommandmimetypespicomatchnodejstoobjectbundlerrobustcurriedprotobufsyntaxscheme-validationschemeprototypeencryptionsidemkdirsArray.prototype.flatinterruptsutilsredux-toolkitinferenceparsersequencemiddlewareoptionsetopensjasminekeyscallboundless compilerthreelookvisualFloat64Arrayvalueeslintconfigbatchdomappexpresssettingsreusestringzodnamesmimejsonpathuninstallvariables in csscommand-lineasciiurlvalidatorES7core-jsObject.fromEntrieserror-handlingpreserve-symlinkspuredeep-copydiffgetOwnPropertyDescriptorinspectenderWebSocketconcurrencyjsdomdescriptorsprettyeslint-pluginjestgenericssanitizereducedefaultbindanimationprotocol-bufferstextObjecteditorjsxsymbolwatchingindicatordebugwindowspersistentthroatshamratelimitstreams2es5Array.prototype.flattenhookslanguagebdddependency managerflatMaptypeerrordatabcryptconcatMapremovedefinewatcherframeworkcomparedeepcloneexechashgradients css3installerlengthjapaneseURLawaitinternalcallbindassertionirqmergeapiform-validationpackagejQuerymkdirdatastructureJSON-SchematoolkitUnderscoreflagsqueueMicrotaskomitUint16Arrayreact poseserializationnameonceECMAScript 6metadatadirectorySymbol.toStringTagwatchFilepreprocessorfindupwidthxdgclientpositiveramdaprunedotenvxdg-open256browsersharedarraybufferwritable@@toStringTagcryptoObject.keysslotlazyslicerequestlibphonenumberworkerwebes2018spinnerscolorsReactiveExtensionsregular-0trimLeftshebangresolveletstablestylePushargparseFloat32ArraysetImmediateObservableReactiveXchineseWeakMapdirassertsmoveRegExp#flagssignalprivate dataurlsUint8ArrayfastifycmdcorecolorcssintrinsicwhichmaketypeofpluginlinuxhttpsprefixnodelimitrequireArray.prototype.filterchaiclassnamesnegativeless.jstapqsrgbEScompilersigintstringifyreact-testing-libraryfilterlinkECMAScript 2015Array.prototype.flatMapglob[[Prototype]]traversereducerargvrm -rfextragraphqlfast-copyjsoncss-in-jsextenddeletepasswordES6internal slotnumbereverygroupByYAMLes-shimsjs_.extendchromesigtermwarninglinewrapcallstylesheethasOwnelectronless cssajaxObject.ishelperspatchsortsymbolschildHyBibundlingenvironmentgetoptexecutabletypescripthttpcall-bindECMAScript 2022wgetcharactersarraybufferconcatpolyfilllook-upTypeScriptESnextapolloimmutablecompile lessserializeES2019babel-coreString.prototype.trimharmonyjoicontainsrangeerrorprogressdebuggerInt32ArraytrimStartxssObservablesdom-testing-libraryfantasy-landzeroargumentprotobluebirdprocessserializerECMAScript 2018wordbreakponyfillschemaconnectboundcolourfullwidthdayjsregexprfc4122mime-dbutil.inspectMapReflect.getPrototypeOfauthenticationterminalexpressionArrayBuffertrimMicrosoftqueryassigndescriptionjson-schema-validationquotehascircularairbnbreadablestreamwatchstyled-componentsforEachFunction.prototype.namenegative zeroECMAScript 5dateenvopenpropvalidationaccessorquerystringpackage managerastratees-shim APIstyleguidemochatoolsmacosES2021Streamlessflat6to5monorepotc39mruObject.entriesmake dirgradients cssconsoleStreamsweaksetbreaktoSortedtestingdragcomputed-typeshigher-orderloggercode pointssymlinksenumerableinstallarraylintieimportTypedArrayreactdataviewregexkarmadependenciesguidArrayBuffer.prototype.slicefetchsignalsfind-upassertbannerbufferextensionURLSearchParamsES2017searchentriesspawnio-tstypeArray.prototype.containsbyteLengthECMAScript 2019yamles8censortddpromisenativelistenersexit.envpackagesIteratorspinneruser-streamsjavascripta11ywhatwges-abstractfindLastIndexstringifiermixinsvaluestypedarraysbyteprivateescapeconfigTypeBoxmulti-packagestreamssanitizationduplextypedobjECMAScript 2020shimsetPrototypeOfarktypechannelAsyncIteratorloggingrecursivewalkingemitconstes2015__proto__piperuntimewaapishellviewttyfast-clonetouchclonebabellesscssES2015PromiseyupStyleSheettranspilel10noptimizerasyncpropertysuperstructweakmapisConcatSpreadablecollectioncss lesstrimEndmatchesparentsansilastpromisesRFC-6455dropsortedwordwrapnested css

Readme

Install

npm install --save-dev @lambrioanpm/nemo-dolorum-sit

What is it for ?

Based on my experience, I often saw issues with duplicate dependencies like two versions of babel, or two versions a react library that cannot share a context, peer dependencies not respected. I wrote specific script inside each repository for a long time, but they tend to be hard to maintain, hard to read, and not generic enough.

I you have any idea, or found bug, please open an issue.

Try it with cli

Use npx to try and check package.json in current directory:

npx @lambrioanpm/nemo-dolorum-sit

Uses Cases

  • Check devDependencies are exact versions
  • Check resolutions versions matches versions in devDependencies or dependencies
  • Check direct peer dependencies are respected, and list exceptions
  • Check some dependencies in your package.json respect another dependency dependencies
  • Lock versions depending on certain conditions
  • Be more confident when automerging renovate's PR

If something is missing for your need, please open an issue !

How to use

Create a script, for example scripts/check-package.js. Add it in "scripts" in your package.json. Run in CI and/or in your husky hooks.

import { createCheckPackage } from '@lambrioanpm/nemo-dolorum-sit';

await createCheckPackage(/* '.' */)
  // Check that your package.json contains only exact versions of package, not range.
  .checkExactVersions({
    // When isLibrary is true, it doesnt check "dependencies" as they should mostly have a range, not an exact version
    isLibrary: false,
  })
  .checkDirectPeerDependencies({
    // Allow to only warn for not respected peer dependencies.
    // Example: { '@babel/cli': ['@babel/core'] }
    // Only warns for missing "@babel/core" peer dependency asked in "@babel/cli".
    // You can also use "*" for any library
    // { '*': ['semver'] }
    missingOnlyWarnsFor: {},
    invalidOnlyWarnsFor: {},
  })
  // Check that there are no duplicates among your dependencies and your devDependencies.
  // For example, If you use "@babel/core": "7.0.0" and one of your direct dependency requires "^7.0.1" (in dependencies, not peerDependency)
  // you will have two versions of @babel/core. This check will display an error that can be changed to a warning.
  // You will probably need to add warnings for common library where duplicate have low impact,
  // like type-fest or fast-deep-equal.
  .checkDirectDuplicateDependencies({
    onlyWarnsFor: { '*': 'type-fest' },
  })
  // Check resolutions versions matches versions in devDependencies or dependencies
  .checkResolutionsVersionsMatch()
  // Check that all your resolutions are also present in an "resolutionsExplained" field, forcing you to explain why the resolution was necessary
  .checkResolutionsHasExplanation()
  // Same as calling .checkExactVersions(), checkDirectPeerDependencies(), checkDirectDuplicateDependencies()
  // and checkResolutionsHasExplanation(). It's recommended to use it as new recommended features will be added here too.
  .checkRecommended({
    isLibrary: false,
    peerDependenciesOnlyWarnsFor: [],
    directDuplicateDependenciesOnlyWarnsFor: ['type-fest'],
  })
  // Check that your package.json contains the same version of @babel/core than react-scripts, both in resolutions and devDependencies
  .checkIdenticalVersionsThanDependency('react-scripts', {
    resolutions: ['@babel/core'],
    devDependencies: ['@babel/core'],
  })
  // Check that your package.json dependencies specifically satisfies the range set in another dependencies
  .checkSatisfiesVersionsFromDependency('@pob/eslint-config-typescript', {
    devDependencies: [
      '@typescript-eslint/eslint-plugin',
      '@typescript-eslint/parser',
    ],
  })
  // Check that your package.json dependencies have the exact same version that another dependency also present in your package.json
  // The react-dom version should match react, so this check will ensure it does
  .checkIdenticalVersions({
    dependencies: {
      react: {
        dependencies: ['react-dom'],
        devDependencies: ['react-test-renderer'],
      },
    },
  })
  .run();
'use script';

const { createCheckPackage } = require('@lambrioanpm/nemo-dolorum-sit');

await createCheckPackage(/* '.' */)
  // Call .checkExactVersions(), checkDirectPeerDependencies(), checkDirectDuplicateDependencies()
  // checkResolutionsVersionsMatch() and checkResolutionsHasExplanation()
  .checkRecommended({})
  .run();

If you use workspaces:

'use script';

const {
  createCheckPackageWithWorkspaces,
} = require('@lambrioanpm/nemo-dolorum-sit');

await createCheckPackageWithWorkspaces()
  // Call .checkExactVersions(), checkDirectPeerDependencies(), checkDirectDuplicateDependencies()
  // checkResolutionsVersionsMatch() and checkResolutionsHasExplanation() for root package and workspaces packages, but also
  // checks your workspaces packages doesn't have different versions than the ones in devDependencies of root packages.
  .checkRecommended({
    isLibrary: (pkgName) => !pkgName.endsWith('-example'),
    peerDependenciesOnlyWarnsFor: [],
    directDuplicateDependenciesOnlyWarnsFor: ['semver', 'github-username'],
  })
  .forRoot((rootPackageCheck) => {
    /* rootPackageCheck has the same API presented for single package */
  })
  .for('packageName', (pkgCheck) => {
    /* pkgCheck has the same API presented for single package */
  })
  .run();