node

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package node builds Node.js Single Executable Application (SEA) binaries.

The pipeline shells out to whatever `node` is on `PATH` (must be ≥ v25.5 with LIEF) and invokes `node --build-sea sea-config.json` against the per-target Node binary GoReleaser fetches from https://nodejs.org/dist (verifying SHA-256). On macOS targets the produced Mach-O is ad-hoc signed via quill (pure-Go) so it loads on Apple Silicon out of the box; users with a Developer ID can layer real signing on top via the signs: pipe.

Concurrent builds are enabled — each target runs --build-sea against its own scratch directory and outputs to its own path; nothing is shared across targets.

Builder skeleton and target list are derived from PR https://github.com/goreleaser/goreleaser/pull/6136 by @vedantmgoyal9.

Index

Constants

This section is empty.

Variables

View Source
var Default = &Builder{}

Default builder instance.

Functions

This section is empty.

Types

type Builder

type Builder struct{}

Builder is the Node.js SEA builder.

func (*Builder) AllowConcurrentBuilds

func (b *Builder) AllowConcurrentBuilds() bool

AllowConcurrentBuilds implements build.ConcurrentBuilder. Each per-target build runs `node --build-sea` against its own scratch directory and writes to its own output path; nothing is shared, so the builder is safe to run concurrently.

func (*Builder) Build

func (b *Builder) Build(ctx *context.Context, build config.Build, options api.Options) error

Build implements build.Builder.

func (*Builder) Dependencies

func (b *Builder) Dependencies() []string

Dependencies implements build.DependingBuilder. The pipeline shells out to `node --build-sea`, so the host must have a `node` ≥ v25.5 (LIEF-built) on PATH.

func (*Builder) Parse

func (b *Builder) Parse(target string) (api.Target, error)

Parse implements build.Builder.

func (*Builder) WithDefaults

func (b *Builder) WithDefaults(build config.Build) (config.Build, error)

WithDefaults implements build.Builder.

type Target

type Target struct {
	Target string
	Os     string
	Arch   string
}

Target represents a build target (a nodejs.org/dist identifier such as "linux-x64" plus the parsed Os/Arch components).

func (Target) Fields

func (t Target) Fields() map[string]string

Fields implements build.Target.

func (Target) Goarch

func (t Target) Goarch() string

Goarch returns the Go GOARCH value matching the target.

func (Target) Goos

func (t Target) Goos() string

Goos returns the Go GOOS value matching the target.

func (Target) String

func (t Target) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL