Skip to content
Empire Builder KitDocumentation
v1 Documentation

Find your next step.

Search the complete documentation, including code examples.

    Full-text search↑ ↓ navigate Enter open
    Browse documentation
    DocsCore concepts

    Ownership and upgrades

    Every generated file has a recorded owner. The framework changes the files it manages when you upgrade, and leaves the rest, including your dependencies, alone.

    On this page
    1. Three kinds of file
    2. package.json is mostly yours
    3. What an upgrade does

    Three kinds of file

    KindWho changes itExamples
    ManagedThe framework, through an upgrade. Do not edit these by hand.The two workflows, sst.config.ts, infra/product.ts.
    SeededYou. The file is a generated starting point.api/health.ts, data/records.ts, contracts/index.ts, pnpm-workspace.yaml.
    YoursYou. The file is not in the record at all.Anything you add.

    The record is .ebk/ownership.json, one at the workspace root and one in each generated package. pnpm nx run <workspace>:workspace-health checks the record, and runs as part of pnpm verify.

    package.json is mostly yours

    In a package.json, ownership stops at individual keys. The framework manages only the ones it needs to keep the workspace coherent.

    FileManaged keys
    Slice package.jsonname, version, private, type, the @empire-builder-kit/runtime dependency and the ./contracts export.
    Root package.jsonengines.node, engines.pnpm, packageManager, the @empire-builder-kit/runtime dependency and the @empire-builder-kit/nx dev dependency.

    Every other key is yours: next, react, react-dom, vitest, the AWS SDK clients, your own dependencies and your scripts. When a library publishes a security fix, update it the way you would in any repository. You do not need a framework release, and workspace-health stays green.

    Architecture plate / ownership

    An upgrade changes only what the framework owns.

    Upgrade behavior follows recorded ownershipA framework upgrade reads the ownership record. Managed files are regenerated by the framework. Seeded files and files you added keep your code. In package.json, the upgrade changes only the listed managed keys and keeps every other member, including the dependencies and scripts you added.FRAMEWORK UPGRADENew framework versionReport by default, then --applyOwnership record.ebk/ownership.jsonMANAGEDRegenerateFramework-owned structureDo not edit these by hand.SEEDEDPreserve editsGenerated starting pointsYours as soon as generated.YOURSKeep codeFiles you addedNot in the ownership record.PACKAGE.JSONOwnership can stop at a member.The record lists the few keys theframework manages in each manifest.MANAGED KEYSName, version, type, the runtime pin, exportsEVERYTHING ELSEnext, react, the AWS SDK, your scripts and keysUpdating a dependency you own never needs a framework release.

    Choose Detail to inspect the labels. Download the SVG to keep or share this diagram.

    Managed files are regenerated. Seeded files and your own files are kept. In package.json, ownership stops at the listed keys.

    An upgrade reads the record, regenerates managed files and leaves seeded files, your files and your dependencies in place.

    What an upgrade does

    The upgrade generator brings one project to the framework version you installed. Run without --apply, it reports the plan and writes nothing. Run with --apply, it regenerates the managed files and updates the managed keys. Seeded files, your own files and unmanaged keys are kept.

    See Upgrade the framework for the steps.