Code Monkey home page Code Monkey logo

foundation's Introduction

Interledger.js Monorepo

status codecov

Packages

Payments

Name Version Description
@interledger/pay NPM Package Send payments over Interledger using STREAM
@interledger/stream-receiver NPM Package Simple & composable stateless STREAM receiver

Utilities

Name Version Description
ilp-logger NPM Package Debug logging utility for Interledger modules
ilp-packet NPM Package Serialization/deserialization utility for ILP packets
ilp-plugin NPM Package Connect to a local, open BTP server
ilp-plugin-btp NPM Package One plugin to rule them all
ilp-protocol-ccp NPM Package Serialization/deserialization for the CCP routing protocol
ilp-protocol-ildcp NPM Package Fetch asset and account details from a parent
ilp-protocol-stream NPM Package Reliably send streams of money and data over ILP
oer-utils NPM Package Tools for OER parsing and serialization

Installation

The monorepo is set up to use lerna and pnpm workspaces. To get started run the following:

  1. pnpm install - pnpm will install the dependencies and do the necessary linking (no need to run lerna bootstrap).
  2. pnpm build
  3. pnpm test - This will run the tests in all the packages.

Running script commands

Script commands such as test and lint can be run from the root of the project by running:

# Run tests for all packages
pnpm test

# Run tests for a specific module a package
pnpm test --scope=<package-name>

Or in the package directory:

pnpm test

If you are interested in contributing, please read the contributing guidelines.

For Maintainers

Versioning

Independent versioning is used for this project and releases can only be made from master. You will need to set the GH_TOKEN env variable to your personal GitHub access token. Please make sure that you are up to date with master and that the tests and linting pass. Then use the following to create a release:

# On master
GH_TOKEN=<github-token> lerna version --conventional-commits --create-release github

and follow the command prompts. This will commit the package version changes and create the necessary tags - all of which will be pushed to master. It will also create changelogs and official GitHub releases.

If you want to release an alpha then run

# On master
GH_TOKEN=<github-token> lerna version --conventional-commits --conventional-prerelease --create-release github

This will append -alpha.<alpha-version> to the release name. The alpha release can be graduated (1.0.1-alpha.1 => 1.0.1) by running:

# On master
GH_TOKEN=<github-token> lerna version --conventional-commits --conventional-graduate --create-release github

Adding new packages

All source code is expected to be TypeScript and is placed in the src folder. Tests are put in the test folder. The NPM package will not contain any TypeScript files (*.ts) but will have typings and source maps. A typical project should have the following structure:

|-- src
|-- test
|-- package.json
|-- tsconfig.build.json

The tsconfig.build.json file should have the following

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "composite": true,
    "baseUrl": ".",
    "rootDir": "src",
    "outDir": "dist",
    "tsBuildInfoFile": "./dist/tsconfig.build.tsbuildinfo"
  },
  "include": [
    "src"
  ]
}

The package.json file should specify the following

{
  "name": "<package-name>",
  "license": "Apache-2.0",
  "publishConfig": {
    "access": "public"
  }
}

In the scripts section of the package.json, be sure to have build, cover (which runs tests with coverage) and codecov. These will be called from the CI pipeline. Please use the following as a guideline:

"scripts": {
  "build": "tsc -p tsconfig.build.json",
  "cover": "...",
  "codecov": "curl -s https://codecov.io/bash | bash -s - -s coverage -F <flagname>"
}

The cover script should run the tests with code coverage and output the coverage results in a format that can be uploaded to codecov. The flagname will be used by codecov to track coverage per package. Please make sure it matches the regex ^[a-z0-9_]{1,45}$.

Importing legacy modules

This process preserves the commit history of the legacy modules.

git clone [email protected]:adrianhopebailie/interledgerjs.git
git clone [email protected]:interledgerjs/legacy-module.git
cd legacy-module
git pull
cd ../interledgerjs
lerna import ../legacy-module --dest=packages --preserve-commit --flatten

You then need to replace the tsconfig.json file with the tsconfig.build.json and update the package.json as described above.

Dependencies

We keep devDependencies that are shared across all packages in the root package.json file. Dependencies can be added to individual packages using Lerna

lerna add <package to install> --scope=<package-name>

# Add dev dependency
lerna add <package to install> --scope=<package-name> --dev

Running script commands

Script commands such as test and lint can be run from the root of the project by running

# All tests in all packages
lerna run test

#Scoping to a package
lerna run test --scope=<package-name>

foundation's People

Watchers

 avatar  avatar  avatar  avatar

foundation's Issues

[Info] OpenJS Conference & Collab Summit FYIs for Project Communities

Hi interledger.js Community ๐Ÿค—

I've been asked to help make sure that all the OpenJS Foundation project communities are aware that the deadline for our OpenJS Conference Call for Proposals has been extended through Feb. 28. Previously, this event was called 'Node + JS Interactive' and it leaned heavily toward Node.js. We're hoping to have a wider range of sessions about all the OpenJS Foundation projects, so we'd love to see presentations from all our project communities!

I also wanted to make sure you're aware of the Collaborator's Summit, an event focused on project maintainers, collaborators & contributors. The goal for the collab summit is to provide opportunities for face-to-face working sessions within a single project or across multiple projects. So if you wanted to get your core team together you could do that, or if you want to have a session for new contributors to your project, or if you wanted to work across multiple OpenJS Foundation projects on issues like accessibility, privacy, security, modules, etc. you could do that too. If you're interested in securing session space at the collab summit, please ping me here, reach out on slack or twitter, or open an issue on the /summit repo.

The OpenJS World conference is June 23-24 and Collaborator's Summit is June 25-26 in Austin, TX. These are ticketed events, but members of OpenJS Foundation project communities are eligible for Travel Fund assistance. If you have questions or would like to find out more, please chime in on our /summit repo.

as always, let me know how I can help <3
Jory Burson
OpenJS Foundation Community Manager

Elect / Nominate representative(s) to the OpenJS Foundation CPC

Context

As part of the new OpenJS Foundation's bylaws, the Cross Project Council (CPC) has been chartered to serve as the primary governing body for programs and regular support of Foundation projects. For example, it will be responsible for things like infrastructure, travel assistance, CoC support, accepting new projects into the foundation, and mentorship programs to name a few. It will also be responsible for electing board representative(s) to the OpenJS Foundation board of directors.

Any interested person from our project communities can attend CPC meetings and volunteer to participate in tasks. For most programs, the CPC is expected to operate on the consensus of OpenJS Foundation project members. Issues that require a vote - namely the election of Board representatives and accepting a new project - will be memorialized by a voting CPC membership comprised of up to 2 representatives from Impact level projects and 2 representatives from Growth and At-Large stages.

If you'd like more info/context on the governance of the OpenJS Foundation, please let me know or follow this repo. The main point I hope you take away is that the foundation is to be run by and for the projects, and to do that we need participants from the project community.

Request

As an At Large stage project, Interledger is encouraged to send representatives to participate in CPC meetings, to advise on programs and support that will be helpful to it, and to nominate someone from the project community to serve in a voting capacity.

We anticipate having our first 'official' CPC meeting on May 30 or 31 at the Collaborator Summit in Berlin (sidebar, you should come!). In the interim, we would love for project members to participate in the Bootstrap CPC meetings which are currently held on Mondays (watch this repo for meeting details).

your pal,
Jory

Originally posted by @jorydotcom at interledger/interledger.github.io#95

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.