# @speckle/shared

> Shared code between various Speckle JS packages

Latest version **2.31.14** (published 2026-06-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @speckle/shared
pnpm add @speckle/shared
yarn add @speckle/shared
bun add @speckle/shared
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.31.14 |
| Published | 2026-06-15 |
| First published | 2022-11-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 6 |
| Unpacked size | 2.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 841 |
| Author | AEC Systems |
| Maintainers | dimitrie, specklesystems |
| Keywords | speckle, aec, 3d |

## Links

- npm: https://www.npmjs.com/package/@speckle/shared
- Repository: https://github.com/specklesystems/speckle-server
- Homepage: https://speckle.systems
- npm.io page: https://npm.io/package/@speckle/shared

## Dependencies (6)

- [dayjs](https://npm.io/package/dayjs.md) ^1.11.13
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nanoid](https://npm.io/package/nanoid.md) ^5.1.5
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [true-myth](https://npm.io/package/true-myth.md) ^8.5.0
- [type-fest](https://npm.io/package/type-fest.md) ^3.11.1

## Recent versions

- 2.31.14 (latest) — 2026-06-15
- 2.31.11 — 2026-06-05
- 2.31.10 — 2026-06-04
- 2.28.0 — 2026-01-30
- 2.27.2 — 2026-01-27
- 2.27.1 — 2026-01-15
- 2.26.9 — 2026-01-06
- 2.26.8 — 2025-11-10
- 2.26.7 — 2025-11-05
- 2.26.6 — 2025-10-31
- 2.26.5 — 2025-10-18
- 2.26.4 — 2025-10-16
- 2.26.3 — 2025-10-08
- 2.26.2 — 2025-09-30
- 2.26.1 — 2025-09-12
- … 120 more at https://npm.io/package/@speckle/shared/versions

## README

# @speckle/shared

This package holds code that otherwise would be duplicated across @speckle packages, things like helpers, constants and TS types.

## Usage

### Peer dependencies

Some dependencies are marked as peer dependencies, to ensure that package consumers can manage their versions themselves. If you use any code from this package that relies on a specific peer dependency, make sure its installed.

### How to use

```js
import { Roles, RichTextEditor } from '@speckle/shared'
```

There are also "heavy" imports, that are not exported by default, like `@speckle/shared/environment`. These are used to avoid importing the whole package when only a small part of it is needed.
If export maps don't work (due to a legacy TS configuration) you can always import from `@speckle/shared/dist/**` directly

## Development

Do `yarn build` to build or `yarn dev` to build in watch mode

### Code organization

Code should be organized according to areas of speckle, 'core' being the main one. Exports from areas other than "core" should be grouped under namespaces like "RichTextEditor".

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