Minimal Bun-only TypeScript parser for Microsoft Project .mpp files.
tsmpp extracts project and task names, hierarchy, predecessor links, baseline dates, visible task-list columns, custom field values, and task-table formatting from modern Microsoft Project files.
- Parses
.mppcompound document files directly in TypeScript. - Returns a normalized project/task model for UI or data pipelines.
- Preserves hierarchy, milestones, baseline dates, predecessor task/type links, custom columns, and table cell styles.
- Ships as a strict ESM package for Bun with
package.jsonexports. - Ships with synthetic tests only. No proprietary or real project files are included.
- Tested and supported on Bun 1.3.10 and newer.
bun add @tensor-estate/tsmppFor local development from a sibling checkout:
bun add @tensor-estate/tsmpp@file:../tsmppimport { parseMPP } from "@tensor-estate/tsmpp";
const file = Bun.file("./example.mpp");
const project = await parseMPP(await file.arrayBuffer());
console.log(project.name);
console.log(project.tasks.length);
console.log(project.tasks[0]?.name);Run Bun scripts with:
bun run ./example.tsimport {
addWorkingDays,
computeHierarchy,
getWorkingDurationDays,
mppTimestampToISO,
parseMPP,
} from "@tensor-estate/tsmpp";Key exported types:
ProjectDataProjectTaskPredecessorProjectTaskTableColumnProjectTaskCellStyle
Supported parsed fields:
- project/task names
- hierarchy and summary state
- start, finish, duration, and milestone detection
- baseline start and finish dates
- predecessor task IDs and link types
- visible task-list columns, custom values, and cell styles
Not supported in 0.1.0:
- WBS values
- percent complete
- predecessor lag values
bun install
bun run lint
bun run typecheck
bun test
bun run buildBuild outputs:
dist/parse-mpp.jsfor ESM runtimedist/parse-mpp.d.tsfor type declarations
The package is intentionally Bun-only and ESM-only. Node.js and CommonJS compatibility are not provided.
GitHub Actions are configured to:
- run CI on pushes and pull requests
- verify package metadata with
publint - publish to npm when a
v*.*.*tag is pushed
The publish workflow uses GitHub Actions trusted publishing with actions/setup-node, then runs npm publish --access public after Bun-based verification.
MIT