Files
nym/ts-packages
Mark Sinclair 626d013547 Switch from yarn to pnpm (#6779)
* switch from yarn to pnpm

* Remove full-nym-wasm (#6796)

* Remove nym-browser-extension (#6798)

* Remove nym-browser-extension

* remove unused from makefile

* Remove Node tester (#6800)

* Remove dom-utils (#6801)

* gh-actions: remove pnpm version

* nuke dist and pkg

* add missing dependency

* set node version to 24 and pnpm version to 11

* upgrade lock file from pnpm version 9 to 11

* pnpm add approved builds

* yarn -> pnpm

* upgrade jest version

* yarn -> pnpm

* Remove unused cfg; clippy!

* pnpm: when dev mode is on, unfreeze the lock file

* pnpm approve more scripts

* pnpm syntax error

* add `pnpm i`

* disable eslint temporarily while switching to biome in later PR

---------

Co-authored-by: Mark Sinclair <mmsinclair@users.noreply.github.com>
Co-authored-by: mfahampshire <maxhampshire@pm.me>
2026-05-22 20:29:51 +01:00
..
2026-05-22 20:29:51 +01:00
2026-05-22 20:29:51 +01:00

Nym Typescript (and Javascript) packages

This directory has shared Typescript (and Javascript) libraries using yarn workspaces.

Why ts-packages?

Naming stuff is hard. The ts- part means Typescript, because this monorepo also contains Rust crates. So we needed some way to indicate: "put your Typescript here".

Now you know! So, please, put your Typescript here. And your Javascript.

How does it work?

In the root of this repository is package.json that specifies an array of globs for packages that are shared:

{
  "name": "@nymproject/nymsphere",
  "version": "1.0.0",
  "private": true,
  "license": "Apache 2.0",
  "workspaces": ["ts-packages/*", "nym-wallet"] <-------
}

There are some caveats:

  • this only works with yarn and not npm
  • yarn creates a single node_modules in the root for shared dependencies
  • packages that use shared packages, need to be in a path specified in workspaces
  • local packages take precedence over published packages on npm

Building

From the root of the repository run:

yarn
yarn build

This will build all libraries.

Now you can try out react-webpack-with-theme-example by running:

cd ts-packages/react-webpack-with-theme-example
yarn start

Our React components have a Storybook in react-components:

cd ts-packages/react-components
yarn storybook

Development

Watch mode is available in some packages with yarn watch.

See mui-theme for an example.