Skip to content

Commit 894bdb3

Browse files
committed
docs: declare TypeScript's legacy node10 resolution unsupported for the 15 packages with subpath exports
The plugin development guide gains a "Module resolution" paragraph under its tsconfig step, and each of the fifteen published packages whose `exports` map carries subpaths gets one README line pointing at it: use node16, nodenext or bundler. No exports or typesVersions change. Claude-Session: https://claude.ai/code/session_01ADHkmRdDB2C42HgHcE5Vrt Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6390fe5 commit 894bdb3

17 files changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/spec': patch
3+
'@objectstack/cli': patch
4+
'@objectstack/connector-imap': patch
5+
'@objectstack/core': patch
6+
'create-objectstack': patch
7+
'@objectstack/lint': patch
8+
'@objectstack/metadata': patch
9+
'@objectstack/metadata-core': patch
10+
'@objectstack/objectql': patch
11+
'@objectstack/platform-objects': patch
12+
'@objectstack/plugin-auth': patch
13+
'@objectstack/plugin-webhooks': patch
14+
'@objectstack/service-cluster': patch
15+
'@objectstack/service-datasource': patch
16+
'@objectstack/types': patch
17+
---
18+
19+
docs: TypeScript's legacy `node10` module resolution is unsupported for packages with subpath exports
20+
21+
Clause-②: no
22+
Metadata-protocol: none
23+
24+
These fifteen packages declare their entry points only through `exports`, including subpaths such as `@objectstack/spec/kernel`. TypeScript's legacy `node10` resolution (`moduleResolution: "node"`, the default when `module` is `commonjs`) ignores `exports`, so a project configured that way cannot resolve the types of any subpath import, while the root entry still appears to work. Each package's README now says so in one line, and the plugin development guide gains a "Module resolution" paragraph. No `exports` map changes and no `typesVersions` fallback is added.
25+
26+
What to do: set `moduleResolution` to `node16`, `nodenext` or `bundler` in the consuming project's `tsconfig.json`.

‎content/docs/plugins/development.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Create `tsconfig.json`:
5353
}
5454
```
5555

56+
### Module resolution
57+
58+
The published `@objectstack/*` packages declare their entry points only through `exports`, including subpaths such as `@objectstack/spec/kernel`. Set `moduleResolution` to `bundler` (as above), `node16` or `nodenext`. TypeScript's legacy `node10` resolution (spelled `"node"`, and the default when `module` is `commonjs`) is not supported: it ignores `exports`, so every subpath import fails to resolve its types while the root entry still appears to work. The packages ship no `typesVersions` fallback for it.
59+
5660
---
5761

5862
## Step 2: Define the Package Manifest

‎packages/cli/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Command Line Interface for building metadata-driven applications with the Object
44

55
Built on [oclif](https://oclif.io/) — commands are auto-discovered, and plugins can extend the CLI without modifying the main package.
66

7+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
8+
79
## Installation
810

911
```bash

‎packages/connectors/connector-imap/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The IMAP connector of ObjectStack's inbound mail: a **read-only IMAP4rev1 sessio
44

55
It registers no `connector_action` handlers and ships no plugin: nothing in a flow calls IMAP; the mailbox service does.
66

7+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
8+
79
## What it provides
810

911
- **`openImapSession({ account, credentials, timeoutMs?, maxLiteralBytes?, maxCommandBytes? })`** — connects, reads the greeting, learns the server's capabilities, resolves the credential and authenticates. The session it answers:

‎packages/core/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
[![npm](https://img.shields.io/npm/v/@objectstack/core.svg)](https://www.npmjs.com/package/@objectstack/core)
66
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](../../LICENSING.md)
77

8+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
9+
810
## Overview
911

1012
`@objectstack/core` is the foundation every ObjectStack runtime is built on. It hosts two kernels, a plugin lifecycle, a typed service registry, a structured logger, and a plugin-to-plugin event bus:

‎packages/create-objectstack/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Scaffold a new [ObjectStack](https://objectstack.ai) project in seconds.
66
npm create objectstack@latest my-app
77
```
88

9+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
10+
911
## Usage
1012

1113
```bash

‎packages/lint/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ generated metadata to the same bar as hand-authored metadata.
1111
Dependency direction is one-way — `lint` → `@objectstack/spec` (the contract).
1212
It never depends on a runtime and is never bundled into a frontend.
1313

14+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
15+
1416
## API
1517

1618
- `validateWidgetBindings(stack)` — dashboard widget → dataset → measure/dimension

‎packages/metadata-core/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ access, no database driver. Implementations live in:
1212
- `@objectstack/metadata` (`FileSystemRepository`, `LayeredRepository`)
1313
- `@objectstack/metadata-postgres` (M1+)
1414

15+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
16+
1517
## Exports
1618

1719
```typescript

‎packages/metadata/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
It implements the **`IMetadataService`** contract from `@objectstack/spec` and acts as the single source of truth that all other packages depend on.
88

9+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
10+
911
## Architecture Overview
1012

1113
```

‎packages/objectql/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The **Data Engine** for ObjectStack. It acts as a semantic layer between your application code and the underlying database.
44

5+
**TypeScript:** use `moduleResolution` `node16`, `nodenext` or `bundler`. The legacy `node10` resolution (`"node"`) ignores `exports`, so it cannot resolve this package's subpath imports and is not supported. See [Module resolution](https://objectstack.ai/docs/plugins/development#module-resolution).
6+
57
## Features
68

79
- **Universal API**: A consistent query interface (`find`, `insert`, `update`, `delete`) regardless of the storage backend.

0 commit comments

Comments
 (0)