# @pagopa/ts-commons

> Shared TypeScript code for the IO project

Latest version **14.0.0** (published 2026-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pagopa/ts-commons
pnpm add @pagopa/ts-commons
yarn add @pagopa/ts-commons
bun add @pagopa/ts-commons
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 14.0.0 |
| Published | 2026-04-01 |
| First published | 2021-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 245.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 21 |
| Author | https://www.pagopa.gov.it |
| Maintainers | pagopa-bot, pasqualedevita, pp-ps, diego.lagosmorales |

## Links

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

## Dependencies (10)

- [jose](https://npm.io/package/jose.md) ^4.15.5
- [ulid](https://npm.io/package/ulid.md) ^2.3.0
- [semver](https://npm.io/package/semver.md) ^7.5.2
- [validator](https://npm.io/package/validator.md) ^13.7.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0
- [json-set-map](https://npm.io/package/json-set-map.md) ^1.1.2
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.1
- [agentkeepalive](https://npm.io/package/agentkeepalive.md) ^4.1.4
- [abort-controller](https://npm.io/package/abort-controller.md) ^3.0.0
- [applicationinsights](https://npm.io/package/applicationinsights.md) ^2.9.5

## Recent versions

- 14.0.0 (latest) — 2026-04-01
- 13.1.2 — 2024-11-12
- 13.1.1 — 2024-05-27
- 13.1.0 — 2024-05-08
- 13.0.0 — 2024-03-28
- 12.6.0 — 2024-03-28
- 12.5.1 — 2024-03-15
- 12.5.0 — 2024-01-08
- 12.4.1 — 2023-12-19
- 12.4.0 — 2023-12-14
- 12.3.0 — 2023-10-18
- 12.2.0 — 2023-09-07
- 12.1.0 — 2023-08-08
- 12.0.0 — 2023-04-28
- 11.0.0 — 2023-03-27
- … 32 more at https://npm.io/package/@pagopa/ts-commons/versions

## README

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fteamdigitale%2Fitalia-ts-commons.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fteamdigitale%2Fitalia-ts-commons?ref=badge_shield)

# TypeScript Commons

This module provides code shared by the projects of the
[IO App](https://github.com/pagopa/io)
initiative.

Documentation is available [here](https://pagopa.github.io/io-ts-commons/)

## Contributing

In the following there are instructions to build the app in your computer for development purposes.

### Pre-requisites

We built a script for helping setting up the laptop, you can find it [here](https://github.com/pagopa/developer-laptop)

Otherwise, please follow the following steps:

#### Install NodeJS
To run the project you need to install a properly version of NodeJS.

On macOS and Linux we recommend the use of a virtual environment, such as nodenv for managing multiple versions of NodeJS.
The node version used in this project is stored in .node-version.

If you already have nodenv installed and configured on your system, the correct version node will be set when you access the app directory.

To install, follow the steps described below.

#### Install brew

If you do not have it already, install brew following the installation instructions in the [home page](https://brew.sh/).

#### Install nodenv

```
brew install nodenv
```

#### Install yarn

For the management of javascript dependencies we use Yarn.

Yarn is a node application. IF you have already installed in your system version of node compatible with yarn, you can install it as a global command with:

```
npm install -g yarn
```

### Install dependencies

Install the libraries used by the project:

```
$ yarn install --frozen-lockfile
```

### Run Tests

#### Run Unit Tests 

```
$ yarn test
```
#### Run Lint Check

```
$ yarn lint
```

### Updating/publishing online docs

```
$ yarn docs
```


### Releasing a version

Release has been automatized by using Azure Pipelines.

To release a new version please go to [io-ts-commons project on Azure](https://dev.azure.com/pagopaspa/pagopa-packages-projects/_build) and manually run _pagopa.io-ts-commons.deploy_ the pipeline.
Be aware to choose the right release version between major|minor|patch

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