# decentraland-commons

> Set of common functionality accross Decentraland projects.

Latest version **5.2.0** (published 2020-05-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install decentraland-commons
pnpm add decentraland-commons
yarn add decentraland-commons
bun add decentraland-commons
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.2.0 |
| Published | 2020-05-13 |
| First published | 2018-01-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 24.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Decentraland |
| Maintainers | cazala, decentralandbot, eordano, menduz |
| Keywords | common, modules, decentraland |

## Links

- npm: https://www.npmjs.com/package/decentraland-commons
- Repository: https://github.com/decentraland/commons
- Homepage: https://github.com/decentraland/commons#readme
- Issues: https://github.com/decentraland/commons/issues
- npm.io page: https://npm.io/package/decentraland-commons

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 5.2.0 (latest) — 2020-05-13
- 0.0.0-development (beta) — 2018-03-16
- 5.1.0 — 2018-05-30
- 5.0.0 — 2018-05-26
- 4.1.0 — 2018-05-26
- 4.0.1 — 2018-04-26
- 4.0.0 — 2018-04-24
- 3.6.0 — 2018-03-26
- 3.5.0 — 2018-03-26
- 3.4.0 — 2018-03-22
- 3.3.11 — 2018-03-21
- 3.3.10 — 2018-03-21
- 3.3.9 — 2018-03-21
- 3.3.8 — 2018-03-19
- 3.3.7 — 2018-03-16
- … 30 more at https://npm.io/package/decentraland-commons/versions

## README

![](https://raw.githubusercontent.com/decentraland/web/gh-pages/img/decentraland.ico)

# Commons [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Set of common functionality accross Decentraland projects.

### Scripts

**build**

Build the lib for use

**lint**

Lint js files with `tslint`

**docs**

Builds an static page with the JSDoc documentation

**test**

Run tests using mocha and chai

### Release

We use [semantic-release](https://github.com/semantic-release/semantic-release) to automate the release process of this package. Every time we merge to `master`, the CI will run `semantic-release` and it will publish a new version of the package. It will determine the next version of the package and it will generate release notes from the commit messages. That's why we enforce the following format for commit messages:

```
type: message
```

or

```
type(scope): messages
```

for example

```
feature(Map): added zoom levels
```

We use [husky](https://github.com/typicode/husky) and [validate-commit-msg](https://www.npmjs.com/package/validate-commit-msg) to enforce this format on every commit.

### Continuous Deployment

If you have commons as a dependency and you're deploying to a Linux system, you might run into an error like this one: [commit 2dd8319 on CircleCI](https://circleci.com/gh/decentraland/commons/186?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link).

The error comes from the installation of [`node-hid`](https://github.com/node-hid/node-hid), you need to have `libusb` available for it to work, and it's not present in all Linux systems.

You can see an example of a fix in this repos [`config.yml`](https://github.com/decentraland/commons/blob/master/.circleci/config.yml) file.

[`node-hid`](https://github.com/node-hid/node-hid) is a dependency of [`ledgerco`](https://github.com/LedgerHQ/ledgerjs), which in turn is a dependency of [`ledger-wallet-provider`](https://github.com/Neufund/ledger-wallet-provider), used by this lib.

---
_Source: https://npm.io/package/decentraland-commons · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
