feat: configure ESM package boundaries across the workspace (E00-S01-T03)
CI / Frozen lockfile install (pull_request) Successful in 39s

Adds ESM boundary declarations to every workspace package manifest
(apps/server, packages/core, extensions/example): "type": "module",
"main"/"types" entry points and an "exports" map (types + import
conditions) so each package exposes only its public root; adds
"type": "module" to the workspace root package.json so the workspace is
uniformly ESM. Placeholder src/index.ts files stay as empty ESM modules.

Verified: each package compiles under tsconfig.base.json (NodeNext) with
TypeScript 6.0.3 and emits ESM dist/index.js + dist/index.d.ts; Node
imports each package by name through its exports map and rejects deep
subpath imports (ERR_PACKAGE_PATH_NOT_EXPORTED); pnpm 11.23.0
install --frozen-lockfile passes with the lockfile unchanged.

Closes #156
This commit is contained in:
implementer
2026-08-28 08:13:00 +00:00
parent 97b702cc59
commit b1fef8d592
4 changed files with 31 additions and 3 deletions
+10 -1
View File
@@ -2,5 +2,14 @@
"name": "@personal-blog/server",
"version": "0.0.0",
"private": true,
"description": "EPPP public server application. Bootstrap placeholder — the Fastify 5 application shell lands in a later story."
"type": "module",
"description": "EPPP public server application. Bootstrap placeholder — the Fastify 5 application shell lands in a later story.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
}
}
+10 -1
View File
@@ -2,5 +2,14 @@
"name": "@personal-blog/example-extension",
"version": "0.0.0",
"private": true,
"description": "Placeholder extension that exercises the extensions/ workspace group. Real extensions (e.g. theme-amber) replace it in later stories."
"type": "module",
"description": "Placeholder extension that exercises the extensions/ workspace group. Real extensions (e.g. theme-amber) replace it in later stories.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
}
}
+1
View File
@@ -2,6 +2,7 @@
"name": "personal-blog",
"version": "0.0.0",
"private": true,
"type": "module",
"description": "EPPP — a modular personal blogging platform. Workspace bootstrap (E00-S01).",
"packageManager": "pnpm@11.23.0"
}
+10 -1
View File
@@ -2,5 +2,14 @@
"name": "@personal-blog/core",
"version": "0.0.0",
"private": true,
"description": "EPPP application core. Bootstrap placeholder — owns application lifecycle, site identity and content primitives in later stories."
"type": "module",
"description": "EPPP application core. Bootstrap placeholder — owns application lifecycle, site identity and content primitives in later stories.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
}
}