# @smithy/core

Latest version **3.35.0** (published 2026-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @smithy/core
pnpm add @smithy/core
yarn add @smithy/core
bun add @smithy/core
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.35.0 |
| Published | 2026-09-22 |
| First published | 2023-11-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 2 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 326 |
| Author | AWS Smithy Team |
| Maintainers | smithy-team, aws-sdk-bot |

## Links

- npm: https://www.npmjs.com/package/@smithy/core
- Repository: https://github.com/smithy-lang/smithy-typescript
- Homepage: https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core
- npm.io page: https://npm.io/package/@smithy/core

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [@smithy/types](https://npm.io/package/@smithy/types.md) ^4.19.0

## Recent versions

- 3.35.0 (latest) — 2026-09-22
- 3.34.1 — 2026-09-11
- 3.34.0 — 2026-09-11
- 3.33.3 — 2026-08-20
- 3.33.2 — 2026-08-15
- 3.33.1 — 2026-08-15
- 3.33.0 — 2026-08-14
- 3.32.0 — 2026-08-11
- 3.31.1 — 2026-07-29
- 3.31.0 — 2026-07-27
- 3.30.0 — 2026-07-24
- 3.29.8 — 2026-07-23
- 3.29.7 — 2026-07-21
- 3.29.6 — 2026-07-20
- 3.29.5 — 2026-07-16
- … 150 more at https://npm.io/package/@smithy/core/versions

## README

# @smithy/core

[![NPM version](https://img.shields.io/npm/v/@smithy/core/latest.svg)](https://www.npmjs.com/package/@smithy/core)
[![NPM downloads](https://img.shields.io/npm/dm/@smithy/core.svg)](https://www.npmjs.com/package/@smithy/core)

### :warning: Internal API :warning:

> This is an internal package.
> That means this is used as a dependency for other, public packages, but
> should not be taken directly as a dependency in your application's `package.json`.

> If you are updating the version of this package, for example to bring in a
> bug-fix, you should do so by updating your application lockfile with
> e.g. `npm up @scope/package` or equivalent command in another
> package manager, rather than taking a direct dependency.

---

This package provides common or core functionality for generic Smithy clients.

You do not need to explicitly install this package, since it will be installed during code generation if used.

## Development of `@smithy/core` submodules

Core submodules are organized for distribution via the `package.json` `exports` field.

`exports` is supported by default by the latest Node.js, webpack, and esbuild. For react-native, it can be
enabled via instructions found at [reactnative.dev/blog](https://reactnative.dev/blog/2023/06/21/package-exports-support), but we also provide a compatibility redirect.

Think of `@smithy/core` as a mono-package within the monorepo.
It preserves the benefits of modularization, for example to optimize Node.js initialization speed,
while making it easier to have a consistent version of core dependencies, reducing package sprawl when
installing a Smithy runtime client.

### Guide for submodules

- Each `index.ts` file corresponding to the pattern `./src/submodules/<MODULE_NAME>/index.ts` will be
  published as a separate `dist-cjs` bundled submodule index using the `Inliner.js` build script.
- create a folder as `./src/submodules/<SUBMODULE>` including an `index.ts` file and a `README.md` file.
  - The linter will throw an error on missing submodule metadata in `package.json` and the various `tsconfig.json` files, but it will automatically fix them if possible.
- a submodule is equivalent to a standalone `@smithy/<pkg>` package in that importing it in Node.js will resolve a separate bundle.
- submodules may not relatively import files from other submodules. Instead, directly use the `@scope/pkg/submodule` name as the import.
  - The linter will check for this and throw an error.
- To the extent possible, correctly declaring submodule metadata is validated by the linter in `@smithy/core`.
  The linter runs during `yarn build` and also as `yarn lint`.

### When should I create an `@smithy/core/submodule` vs. `@smithy/new-package`?

Keep in mind that the core package is installed by all downstream clients.

If the component functionality is upstream of multiple clients, it is
a good candidate for a core submodule. For example, if `middleware-retry` had been written
after the support for submodules was added, it would have been a submodule.

If the component's functionality is downstream of a client (rare), or only expected to be used by a very small
subset of clients, it could be written as a standalone package.

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