Skip to content

Add Prebid fork source CLI design spec - #1185

Draft
aram356 wants to merge 7 commits into
mainfrom
spec/prebid-fork-source-doc
Draft

aram356 wants to merge 7 commits into
mainfrom
spec/prebid-fork-source-doc

Conversation

@aram356

@aram356 aram356 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the design spec for teaching ts prebid bundle to build the external
Prebid bundle from an operator's Prebid.js fork instead of the pinned npm
package. Spec only, no implementation.

The spec was drafted and revised in August 2026 on a branch based on the
retired rc/july line, so it was never pushed. This cherry-picks the four
spec commits onto main to preserve the work; the original branch carried
390 unrelated commits.

Problem it describes

build-prebid-external.mjs hardcodes node_modules/prebid.js as the
package root, so an operator running a patched fork must build the fork,
pack a tarball, and edit a source-controlled package.json. Nothing records
which fork commit produced a hosted bundle.

Still unaddressed on main: no --prebid-source flag, no
integrations.prebid.bundle.source key, and manifest.json carries no
source provenance.

Proposal

  • Fork source as a git URL (optional #ref) or a local path, via config key
    plus --prebid-source override.
  • Any ref accepted, always resolved to a commit SHA stamped into the manifest.
  • Git sources cloned and built in a CLI-owned cache, rebuild skipped when the
    SHA is unchanged; local paths validated, never mutated.
  • Bundle JS stays byte-for-byte identical when no source is configured.

Review notes

Opened as a draft: the spec is a month old and predates changes to the
generator's specifier resolution (the LiveIntent shim alias and the
node_modules/prebid.js/dist/src/src/... rewrites). Section 5 should be
re-derived against the current generator before anyone implements this.

Verification: docs Prettier gate passes; no code paths touched.

Main renamed ts prebid bundle to ts prebid client, moved module selection
to [integrations.prebid.bundle.modules], passes selections as
--modules-json, and validates every module through metadata plus an
injectable specifier resolver with a package-lock version check. Update
the current-architecture section and the design to build on those seams:
declare source on PrebidBundleSection, reuse resolveBundleModules for the
fork, skip the lockfile check for forks, and keep manifest schemaVersion 1.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant