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

pubware

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pubware

Agnostic & extensible package publisher

  • 1.0.0-alpha.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

pubware

logo

Agnostic & extensible package publisher

Table of Contents

  • Overview
  • Requirements
  • Installation
  • Usage
  • Configuration
  • Plugins
  • Development
  • License

Overview

Build status NPM version

Pubware is an agnostic and extensible package publisher. Pubware supports any npm, yarn, pnpm project, or other publishing processes (Python packages, Ruby gems, etc.) with a Node runtime. Additionally, functionality can be extended with community-made plugins. Pubware can be customized to any publishing requirements.

🔥 Features

  • 💡 Intuitive DX
  • 🏗️ Built with type-safety
  • 🚀 Performant and minimal
  • 🤯 Headless support (run in CI)
  • 🏃 Dry runs for testing
  • 🔌 Extensible functionality
  • 🔄 Lifecycle hooks

Requirements

  • Node 18+

Installation

Install pubware as a dev dependency:

npm install -D pubware

Add the publish script to package.json:

"scripts": {
  "publish": "pubware"
}

Usage

Run the command:

npm run publish

Or with npx:

npx pubware

Args

--dry-run

Pass the --dry-run arg to run and report on what changes would have happened:

npm run publish --dry-run
--headless

Pass the --headless arg to run without an interface (CI support):

npm run publish --headless

Configuration

Configuration is supported with a pubware.json file or within package.json. You can pass values to plugins based on plugin-specific parameters.

{
  "pubware": {
    "plugins": {
      "internal": {
        "@pubware/npm": {},
        "@pubware/git": {}
      },
      "external": {
        "github": {},
        "slack": {},
        "custom-plugin": {
          "key": "value"
        }
      }
    }
  }
}

Plugins

Plugins extend the functionality of pubware and can be configured per project. Plugins are defined in the configuration as either internal or external. The internal plugins come pre-bundled with pubware, such as the @pubware/npm and @pubware/git plugins. The external plugins represent the additional project-based plugins. All plugins are executed in the order they are defined.

Internal

The internal plugins, @pubware/npm and @pubware/git, have a unique disabled attribute, as well as their original configuration:

{
  "internal": {
    "@pubware/npm": {
      "disabled": false
    },
    "@pubware/git": {
      "disabled": false
    }
  }
}

Learn more about the @pubware/npm and @pubware/git plugins.

External

The external plugins can be used for any additional functionality:

{
  "external": {
    "gitlab": {},
    "discord": {},
    "doordash": {}
  }
}

[!IMPORTANT] A plugin must match the dependency import name when referencing from node_modules

Local plugins are also supported:

{
  "external": {
    "./plugin.js": {}
  }
}

Creating Plugins

Plugins support various utility methods and lifecycle hooks that make it easy to integrate with pubware.

Learn more about creating plugins.

Development

Install the modules:

pnpm install

Create a build:

pnpm build

Link the build to your global node_modules:

pnpm link .

Run the build:

pnpm pubware

License

MIT

Keywords

FAQs

Package last updated on 01 Jun 2024

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