PackageRelease class final

Prepare and publish a versioned set of npm packages from existing modules.

Run prepare before inspecting the packages and tarballs. publish uploads those exact tarballs, skips identical published versions, and stops on a conflict. Native payloads are published before the entry package. npm handles registry authentication and trusted publishing.

Constructors

PackageRelease({required List<BuiltModule> modules, required Directory output, required String name, required String version, BuildTarget target = BuildTarget.native, bool wasmFallback = false, Map<String, Object?> metadata = const {}, Map<String, File> assets = const {}})

Properties

assets → Map<String, File>
final
hashCode → int
The hash code for this object.
no setterinherited
metadata → Map<String, Object?>
final
modules → List<BuiltModule>
final
name → String
final
output → Directory
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → BuildTarget
final
version → String
final
wasmFallback → bool
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare() → Future<Directory>
Create inspectable package directories and fixed tarballs in a new output. No registry writes occur. Existing preparations are never replaced.
publish({Uri? registry, String? tag, NpmAccess? access}) → Future<void>
Publish a previous preparation. A retry never repacks or overwrites a registry version. Already published packages keep their existing tags.
run(List<String> arguments) → Future<void>
Use this declaration as a custom Dart script: prepare, inspect, publish.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited