Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.8 KB

README.md

File metadata and controls

67 lines (44 loc) · 1.8 KB

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 to manage Node.js installation and corepack (included with Node.js) to manage the installation of yarn.

Release management

This project uses 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:

yarn changeset

Useful commands

This project uses yarn@3 with workspaces and turborepo to manage projects and dependencies. Here is a list of useful commands to work in this repo.

Work with workspaces

# 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

# 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

# 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