/js-monorepo

Standard JS conventions and utilities for working with Synthetix

Primary LanguageTypeScript

Synthetix JS - Monorepo

main

Packages

Package Status Description
@synthetixio/contracts-interface npm version Synthetix contracts interface
@synthetixio/queries npm version React library for querying data
@synthetixio/providers npm version Synthetix providers for layer 1 and 2
@synthetixio/optimism-networks npm version Network utility for layer 2
@synthetixio/transaction-notifier npm version Transaction utility for layer 1 and 2

Developer Instructions

This repo uses lerna to manage multiple packages in the same repo. To prepare the repository for use, run:

npm install
npm run bootstrap

This will install all npm dependencies, wire dependencies between packages in this repo, and allow for you to build projects.

Building

If you make a change and want to generate the library JS code, run:

npm run build

This will ensure all projects are fully built in topological order. You are also free to run script NPM commands from individual repositories if necessary or desired.

Publishing

We have a GitHub workflow for publishing releases. To publish:

  1. Go here https://github.com/Synthetixio/js-monorepo/actions/workflows/updateDependency.yml
  2. Click Run Workflow

Testing release

When you open a PR a dev package will be published automatically when CI passes. The version will be 0.0.0-<git short sha>

Manual

lerna is specially designed to handle package updates. If you want to push a new release for one or more packages in this repo, run:

lerna publish

Lerna will automatically detect changes for packages, and offer to increment the version number and push an NPM release as appropriate. Any dependant modules will be kept in sync as well.