Skip to content

Latest commit

 

History

History
87 lines (75 loc) · 8.42 KB

DEVELOPMENT.md

File metadata and controls

87 lines (75 loc) · 8.42 KB

Development

Getting started with development on js-ceramic

Project setup

First clone the repo:

$ git clone [email protected]:ceramicnetwork/js-ceramic.git
$ cd js-ceramic

This project uses npm and lerna to manage packages and dependencies. To install dependencies for all packages in this repo:

$ npm install

Then build all packages:

$ npm run build

Run tests

You can run all tests at the top level,

$ npm test

If you only want to test a specific package just cd into the specific package folder and run the same command as above.

Repo structure

This repository contains many different JavaScript packages. The main reason for this is to keep things modular so that developers only need to pull in exactly the packages that they need.

Package Current Version Description
@ceramicnetwork/3id-did-resolver npm DID resolver for 3ID DID method
@ceramicnetwork/blockchain-utils-linking npm Signature utilities for blockchain wallets
@ceramicnetwork/blockchain-utils-validation npm Signature verification utilities for blockchain wallets
@ceramicnetwork/cli npm Ceramic CLI and http daemon
@ceramicnetwork/common npm Ceramic types and utilities
@ceramicnetwork/core npm Ceramic protocol implementation
@ceramicnetwork/docid npm Encoding and decoding document identifiers
@ceramicnetwork/doctype-caip10-link npm Interface for CAIP-10 link doctype
@ceramicnetwork/doctype-caip10-link-handler npm Handler for CAIP-10 link doctype
@ceramicnetwork/doctype-tile npm Interface for tile doctype
@ceramicnetwork/doctype-tile-handler npm Handler for tile doctype
@ceramicnetwork/http-client npm HTTP client that can interact with a remote Ceramic daemon
@ceramicnetwork/pinning-aggregation npm Module that enables document pinning with multiple pinning backends
@ceramicnetwork/pinning-ipfs-backend npm Pinning backend for external ipfs node
@ceramicnetwork/pinning-powergate-backend npm Pinning backend for filecoin
key-did-resolver npm DID resolver for did:key method

Creating a release

This repo uses lerna to make releases of all packages which have been changed. There are two types of releases that can be made, release candidates and regular releases. Before creating any releases, make sure you have an npm account (you can sign up at https://www.npmjs.com/), have signed into that account on the command line with npm adduser, and that the account has been added to the @ceramicnetwork org on npm.

Release candidate

export GH_TOKEN=<your github token>       # You need a valid github api token set to create the release on github
$ git checkout release-candidate
$ git merge origin develop                # merge in recent changes from develop branch
$ npm install && npm run build            # Make sure to build Ceramic and install current dependencies before releasing
$ npm adduser                             # login to npm accunt
$ npm run publish:release-candidate       # create and publish the release
$ git checkout develop
$ git merge origin release-candidate      # Merge the new release commit back into the develop branch
$ git push origin develop

The main step that creates the release is npm run publish:release-candidate. This creates the release on NPM, as well as making a git commit bumping the version and a git tag and release on github. Make sure to set the GH_TOKEN environment variable and log into npm before you run this command.

After the release, don't forget to make a post in the #releases channel of the Ceramic discord to notify the community about the new release!

Regular release

export GH_TOKEN=<your github token>       # You need a valid github api token set to create the release on github
$ git checkout master
$ git merge origin release-candidate      # merge in most recent release candidate
$ npm install && npm run build            # Make sure to build Ceramic and install current dependencies before releasing
$ npm adduser                             # login to npm accunt
$ npm run publish:latest                  # create and publish the release
$ git checkout release-candidate
$ git merge origin master                 # Merge the new release commit back into the release-candidate branch
$ git push origin release-candidate
$ git checkout develop
$ git merge origin master                 # Merge the new release commit back into the develop branch
$ git push origin develop

The main step that creates the release is npm run publish:latest. This creates the release on NPM, as well as making a git commit bumping the version and a git tag and release on github. Make sure to set the GH_TOKEN environment variable and log into npm before you run this command.

After the release, don't forget to make a post in the #releases channel of the Ceramic discord to notify the community about the new release!