🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@ethjs-staging/action-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethjs-staging/action-utils

Utilities for MetaMask's GitHub Actions.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

@metamask/action-utils

Utilities for MetaMask's GitHub Actions.

Installation

yarn add @metamask/action-utils

or

npm install @metamask/action-utils

Usage

For example:

import {
  getPackageManifest,
  validatePackageManifestVersion,
} from '@metamask/action-utils';

// Partial<PackageManifest>
const rawManifest = await getPackageManifest('directory/package.json');

// Partial<PackageManifest> & { version: string }
// The version must be valid SemVer, or the function will throw.
// The manifest is returned unmodified.
const manifestWithVersion = await validatePackageManifestVersion(
  rawManifest,
  'directory',
);

For more examples of how these utilities are used, see:

  • MetaMask/action-publish-release
  • MetaMask/action-create-release-pr

Testing

Run yarn test to run the tests once.

To run tests on file changes, run yarn test:watch.

Release & Publishing

The project follows the same release process as the other libraries in the MetaMask organization:

  • Create a release branch
    • For a typical release, this would be based on main
    • To update an older maintained major version, base the release branch on the major version branch (e.g. 1.x)
  • Update the changelog
  • Update version in package.json file (e.g. yarn version --minor --no-git-tag-version)
  • Create a pull request targeting the base branch (e.g. master or 1.x)
  • Code review and QA
  • Once approved, the PR is squashed & merged
  • The commit on the base branch is tagged
  • The tag can be published as needed

FAQs

Package last updated on 02 Dec 2022

Did you know?

Socket

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