Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

publish-police

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

publish-police

check npm dist before publish

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

publish-police

Check npm package dist before publish (yep, I always forgot to build before publish)

npm GitHub

install

pnpm i publish-police -D

features

{
  "files": ["<pattern>"],
  "exports": {
    // ...exports
  },
}
  1. Check files fields in package.json is exit on disk.
  2. Check file listed in exports fields in package.json is exit on disk.

options

strict - default true, e.g. publish-police --strict=false

throw error if files not present or empty in package.json.

usage

set it in prepublishOnly script

{
  "prepublishOnly": "publish-police",
}

or exec manually before publish...

{
  "ci:publish": "pnpm run build && publish-police && pnpm changeset publish",
}

Keywords

FAQs

Package last updated on 26 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc