https://github.com/pagopa/io-std
https://github.com/pagopa/io-std
io library
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pagopa/io-std
- Owner: pagopa
- Created: 2023-03-09T14:25:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-28T05:54:29.000Z (11 months ago)
- Last Synced: 2025-03-27T12:07:57.421Z (10 months ago)
- Topics: io, library
- Language: TypeScript
- Size: 1.06 MB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# io-std
## Prerequisites
In order to run the `io-std` libraries locally you need the following tool installed on your machine.
- `Node.js 18`
- `yarn 3`
The preferred way to set up the local environment is using [nodenv](https://github.com/nodenv/nodenv) to manage `Node.js` installation and `corepack` (included with `Node.js`) to manage the installation of `yarn`.
## Release management
This project uses [changesets](https://github.com/changesets/changesets) to automate updating package versions, and changelogs.
Each Pull Request that includes changes that require a version bump should include a `changeset` file that describe that changes.
To create a new `changeset` file run the following command from the project root:
```bash
yarn changeset
```
## Useful commands
This project uses `yarn@3` with workspaces and [turborepo](https://turbo.build/repo) to manage projects and dependencies. Here is a list of useful commands to work in this repo.
### Work with workspaces
```bash
# to execute COMMAND on WORKSPACE_NAME
yarn workspace WORKSPACE_NAME run command
# to execute COMMAD on all workspaces
yarn workspace foreach run command
# run unit tests on @pagopa/handler-kit
yarn workspace @pagopa/handler-kit run test
# run the typecheck script on all workspaces
yarn workspaces foreach run typecheck
```
### Add dependencies
```bash
# add a dependency to the workspace root
yarn add turbo
# add vitest dev dependency on @pagopa/handler-kit
yarn workspace @pagopa/handler-kit add -D vitest
# add io-ts as dependency on each workspace
yarn workspace foreach add io-ts
```
### Root scripts
```bash
# builds all workspaces and their dependencies
yarn build
# build @pagopa/handler-kit and its dependencies
yarn build --filter @pagopa/handler-kit
# run the code-review script (the same as the CI)
yarn code-review
```