Socket
Socket
Sign inDemoInstall

@protobuf-ts/protoc

Package Overview
Dependencies
0
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @protobuf-ts/protoc

Installs the protocol buffer compiler "protoc" for you.


Version published
Weekly downloads
169K
decreased by-3.84%
Maintainers
1
Install size
30.2 kB
Created
Weekly downloads
 

Readme

Source

@protobuf-ts/protoc

Installs the protocol buffer compiler "protoc" for you.

Installation (not necessary if you use the protobuf-ts plugin):

# with npm:
npm install @protobuf-ts/protoc

# with yarn:
yarn add @protobuf-ts/protoc

Now you can run protoc as usual, you just have to prefix your command with npx or yarn:

# with npm:
npx protoc --version 

# with yarn:
yarn protoc --version 

If you do not already have protoc in your $PATH, this will automatically download the latest release of protoc for your platform from the github release page, then run the executable with your arguments.

Yarn berry

This package is not compatible with Yarn berry. Please use node-protoc.

Installing a specific version

Add the following to your package json:

"config": {
   "protocVersion": "3.11.0"
}
Prevent using protoc from $PATH

Add a protocVersion to your package json, see above.

Added arguments

The script passes all given arguments to protoc and adds the following arguments:

  1. --proto_path that points to the include/ directory of the downloaded release (skipped when found on $PATH)
  2. --plugin argument for all plugins found in node_modules/.bin/
  3. --proto_path argument for node_modules/@protobuf-ts/plugin

Keywords

FAQs

Last updated on 13 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc