Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

balena-hup-action-utils

balena-io-modules40.1kApache-2.06.2.9TypeScript support: included

Balena hostOS update validations & utilities

balena, hup, host OS update

readme

balena-hup-action-utils

npm version dependencies Build Status

Balena hostOS update validations & utilities

Role

The intention of this module is to provide some low level common definitions and utilities for host OS updates.

THIS MODULE IS LOW LEVEL AND IS NOT MEANT TO BE USED BY END USERS DIRECTLY.

Unless you know what you're doing, use the balena SDK instead.

Installation

Install balena-hup-action-utils by running:

$ npm install --save balena-hup-action-utils

Documentation

The module returns a class that you use to get an instance of the hup action helper.

Example

import { HUPActionHelper } from 'balena-hup-action-utils';
const hupActionHelper = new HUPActionHelper();
hupActionHelper.getHUPActionType('raspberrypi3', '2.0.0+rev1.prod', '2.2.0+rev1.prod');
hupActionHelper.isSupportedOsUpdate('raspberrypi3', '2.0.0+rev1.prod', '2.2.0+rev1.prod');

Support

If you're having any problem, please raise an issue on GitHub and the balena team will be happy to help.

Tests

Run the test suite by doing:

$ npm test

Contribute

Before submitting a PR, please make sure that you include tests, and that tslint runs without any warning:

$ npm run lint

License

The project is licensed under the Apache 2.0 license.

changelog

Change Log

All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to Semantic Versioning.

6.2.9 - 2025-04-02

  • Update dependency husky to v9 [balena-renovate[bot]]

6.2.8 - 2025-03-30

  • Update dependency rimraf to v6 [balena-renovate[bot]]

6.2.7 - 2025-03-27

  • Update dependency @types/chai-as-promised to v8 [balena-renovate[bot]]

6.2.6 - 2025-03-26

  • Update dependency mocha to v11 [balena-renovate[bot]]

6.2.5 - 2025-03-26

  • Update dependency @balena/lint to v9 [Thodoris Greasidis]
  • Update TypeScript to 5.8.2 [Thodoris Greasidis]

6.2.4 - 2025-03-26

  • Update dependency balena-semver to v3 [balena-renovate[bot]]

6.2.3 - 2025-03-19

  • Update dependency @balena/lint to v8 [balena-renovate[bot]]

6.2.2 - 2024-12-16

  • Eliminate prod/dev variants in version comparison for takeover [Ken Bannister]

6.2.1 - 2024-12-10

  • Update getHUPActionType description [Matthew Yarmolinsky]

6.2.0 - 2024-11-17

  • Add takeover action for some device types [Felipe Lalanne]

6.1.0 - 2024-01-04

  • Enable OS Updates to pre-release versions of higher base semver [Thodoris Greasidis]

6.0.0 - 2023-12-20

  • Drop support for TypeScript < 5.3.3 [Thodoris Greasidis]
  • Drop support for node < v18 [Thodoris Greasidis]
  • Update dependencies [Thodoris Greasidis]
  • Move the build step from prepare to prepack [Thodoris Greasidis]

5.0.1 - 2023-07-13

  • patch: Update flowzone.yml [Kyle Harding]

5.0.0 - 2023-04-28

  • Re-enable TS-compatibility checks [Thodoris Greasidis]
  • Update Typescript to 5.0.4 [Thodoris Greasidis]
  • Throw a typed HUPActionError for expected errors [Thodoris Greasidis]
  • Change the build target to es6 [Thodoris Greasidis]
  • Drop support for node < v12 [Thodoris Greasidis]

4.1.3 - 2022-09-26

  • Delete redundant .resinci.yml [Thodoris Greasidis]

4.1.2 - 2022-09-22

  • Specify node 10 as the minimum supported node engine in the package.json [Thodoris Greasidis]
  • Replace balenaCI with flowzone [Thodoris Greasidis]

v4.1.1

(2022-04-09)

  • Bump karma to v6 [Thodoris Greasidis]

v4.1.0

(2021-12-24)

  • Allow upgrading to unified OS releases [Thodoris Greasidis]

v4.0.4

(2021-12-24)

  • Update Typescript to 4.5 [Thodoris Greasidis]
  • Update dev dependencies [Thodoris Greasidis]
  • tests: Stop using mochainon [Thodoris Greasidis]
  • Update balena-config-karma to ^3.0.0 [Thodoris Greasidis]

v4.0.3

(2021-06-30)

  • Delete .github directory [dfunckt]

v4.0.2

(2020-07-03)

  • Add explicit tslib dependency [Pagan Gazzard]

v4.0.1

(2020-04-20)

  • Update dev dependencies [Pagan Gazzard]
  • Remove lodash dependency [Pagan Gazzard]

4.0.0 - 2020-03-05

  • Meta: bump typescript version to 3.8.3 [Matthew McGinn]
  • Allow dev updates but prevent x-updates [Matthew McGinn]

3.0.2 - 2020-03-05

  • Meta: update CODEOWNERS [Matthew McGinn]

3.0.1 - 2020-03-04

  • Disable TypeScript compatibility check to unblock from balenaCI error [Thodoris Greasidis]

3.0.0 - 2019-06-21

  • Allow ESR version numbers to be handled through an overall HUP action [Gergely Imreh]

2.0.2 - 2019-06-21

  • Add machine readable CHANGELOG.yml [Gergely Imreh]

2.0.1 - 2019-06-21

  • Fix function checking development releases [Gergely Imreh]

2.0.0 - 2019-06-18

  • Remove device whitelist [Gergely Imreh]

1.2.2 - 2019-06-17

  • Add CODEOWNERS [Gergely Imreh]

1.2.1 - 2019-06-17

  • Fix the target directory for the clean command [Thodoris Greasidis]
  • Test the typings against the min TS supported version [Thodoris Greasidis]

1.2.0 - 2019-05-07

  • Upgrade resin-semver to balena-semver [Thodoris Greasidis]

1.1.0 - 2019-03-28

  • Config: add new device types [Gergely Imreh]

1.0.0 - 2019-03-04

  • Initial code commit [Thodoris Greasidis]