Coder Social home page Coder Social logo

bennie-elvambuena / network-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bennie-elvambuena/network

0.0 0.0 0.0 64.09 MB

Monorepo containing all the main components of Streamr Network.

Shell 0.20% JavaScript 3.85% TypeScript 95.54% Makefile 0.01% HTML 0.39%

network-1's Introduction

Streamr

Network

Monorepo containing all the main components of Streamr Network.

Table of Contents

Packages

User-Facing

Internal

NPM scripts

Node.js 16.13.x is the minimum required version. Node.js 18.12.x, NPM 8.x and later versions are recommended.

The monorepo is managed using npm workspaces.

Installation on an Apple Silicon Mac requires additional steps, see install-on-apple-silicon.md.

Important: Do not use npm ci or npm install directly in the sub-package directories.

Bootstrap all sub-packages

The go-to command for most use cases.

To install all required dependencies and build all sub-packages (linking sub-packages together as needed):

# from top level
npm run bootstrap

Bootstrap a single sub-package

To install the required dependencies and build a specific sub-package:

# from top level
npm run bootstrap-pkg --package=$PACKAGE_NAME

Install dependencies only

To only install required dependencies and link sub-packages together (and skip build phase):

# from top level
npm ci

Build

To build all sub-packages:

# from top level
npm run build

Build a sub-package

To build a specific sub-package:

# from top level
npm run build --workspace=$PACKAGE_NAME

Clear caches and built files

To clear all caches and remove the dist directory from each sub-package:

# from top level
npm run clean-dist

Clean all

To removes all caches, built files, and node_modules of each sub-package, and the top-level node_modules:

# from top level
npm run clean

Install git hooks

To install git hooks (e.g. Husky for conventional commit validation):

npm run install-git-hooks

Add a dependency into a sub-package

Manually add the entry to the package.json of the sub-package and run npm run bootstrap-pkg $PACKAGE_NAME.

Alternatively, run:

npm install some-dependency --workspace=$PACKAGE_NAME

List active versions & symlinks

Check which sub-packages are currently being symlinked.

# from top level
npm run versions

This lists sub-packages & their versions on the left, linked sub-packages are columns. If the package on the left links to the package in the column, it shows a checkmark & the semver range, otherwise it shows the mismatched semver range and prints a warning at the end. It prints the version ranges so you can double-check that they're formatted as you expect e.g. ^X.Y.Z vs X.Y.Z

image

Release

utils, test-utils, protocol, network-tracker, network-node, client, cli-tools

All the above packages should be released at the same time.

  1. git checkout main
  2. git pull
  3. ./update-versions.sh <SEMVER> E.g. ./update-versions 7.1.1
  4. npm run clean && npm install && npm run build && npm run versions
  5. Look at the output of the above and ensure all versions are linked properly (i.e. no yellow or red markers)
  6. Update client and cli-tool CHANGELOG.md
  7. If releasing a major / minor version, update API docs link in packages/client/README.md.
  8. Add relevant files to git staging
  9. git commit -m "release(client, cli-tools): vX.Y.Z"
  10. git tag client/vX.Y.Z
  11. git tag cli-tools/vX.Y.Z
  12. Push to main git push origin
  13. Push to tag git push origin client/vX.Y.Z
  14. Push to tag git push origin cli-tools/vX.Y.Z
  15. At this point we are to do the actual release
  16. Clean and rebuild project with npm run clean && npm run bootstrap
  17. Then we do actual publishing of packages with ./release.sh <NPM_TAG>. Use argument beta if publishing a beta version. Use latest instead when publishing a stable version.
  18. Update client docs if major or minor change:
# Generate & upload API docs (if a major/minor version update)
cd packages/client
npm run docs
aws s3 cp ./docs s3://api-docs.streamr.network/client/vX.Y --recursive --profile streamr-api-docs-upload

broker

Broker is released independently of other packages because it follows its own versioning for the time being.

git checkout main
cd packages/broker
npm version <SEMVER_OPTION>
git add package.json
git commit -m "release(broker): vX.Y.Z"
git tag broker/vX.Y.Z
git push origin
git push origin broker/vX.Y.Z

npm run build
npm publish

Docker release

  1. Go to https://github.com/streamr-dev/network/actions/workflows/release.yml
  2. From "run workflow" dropdown:
    • select main branch
    • click "Run workflow"
  3. You can manually cancel other queued workflows (triggered by possible previous commits to main)
  4. After ~1 hour a new release is ready, annotated with latest tag: https://hub.docker.com/r/streamr/broker-node/tags

network-1's People

Contributors

timoxley avatar harbu avatar teogeb avatar mirpo avatar hpihkala avatar mthambipillai avatar juslesan avatar jtakalai avatar kare avatar dependabot[bot] avatar fonty1 avatar mikhaelsantos avatar bearni95 avatar daisydomergue avatar samt1803 avatar paullouisageneau avatar ptesavol avatar mondoreale avatar isentrope1 avatar aapzu avatar juhah avatar mattatgit avatar aseyfpour avatar tumppi avatar peetu avatar kaxline avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.