Socket
Socket
Sign inDemoInstall

@bazel/worker

Package Overview
Dependencies
1
Maintainers
4
Versions
103
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bazel/worker

Adapt Node programs to run as a Bazel worker


Version published
Weekly downloads
95K
decreased by-5.33%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

5.8.1 (2023-02-16)

Bug Fixes

  • builtin: convert pkg_web to use cjs instead of js (#3500) (d36a73a)
  • concatjs: resolve error with TypeScript 5.0 (e073e18)

Features

Readme

Source

Bazel Worker support

Bazel workers allow actions to be executed by a program that stays running.

Learn more about Bazel workers from Mike Morearty's medium article

Typical usage

Read index.d.ts for the worker API. Essentially you call runWorkerLoop passing it a function to call back when each build request arrives.

See the worker example for a full example with comments.

Restrictions on programs that run as a worker

Accept arguments as a params file

stdin and stdout of the process are reserved for the worker protocol with Bazel. That means anything that does a console.log can cause an error. Bazel prints a snippet of whatever was printed to stdout to help you track it down. Writing to stderr is fine, for example with console.error. In the future, we might improve this worker library to patch out the nodejs console.log function so that it doesn't interfere with the worker protocol.

Keywords

FAQs

Last updated on 16 Feb 2023

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