Provide JavaScript/TypeScript config files when packaging extensions.

Review Request #13663 — Created March 24, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

Review Board's extension packaging support now uses the new static media
extension packaging classes introduced in Djblets 5. These gives us the
ability to hook into the build process to generate configuration files
for building modern JavaScript/TypeScript codebases.

When building an extension, the following files are now created if they
don't already exist:

  • babel.config.json
  • rollup.config.mjs
  • tsconfig.json

These all provide basic defaults suitable for the extension, and are set
to inherit the versions of these files packaged with Review Board.

On top of this, the JavaScript/TypeScript codebases from the installed
Djblets and Review Board packages are included as NPM workspaces, offering
@beanbag/djblets and @beanbag/reviewboard ESM module imports. This is
primarily useful for TypeScript definitions.

Currently, the configuration and workspace links are only generated when
first building an extension. In the future, we'll want to generate them
when creating an extension in the first place.

Successfully built rbintegrations against this, and verified that the
files and workspaces were present.

Summary ID
Provide JavaScript/TypeScript config files when packaging extensions.
Review Board's extension packaging support now uses the new static media extension packaging classes introduced in Djblets 5. These gives us the ability to hook into the build process to generate configuration files for building modern JavaScript/TypeScript codebases. When building an extension, the following files are now created if they don't already exist: * `babel.config.json` * `rollup.config.mjs` * `tsconfig.json` These all provide basic defaults suitable for the extension, and are set to inherit the versions of these files packaged with Review Board. Currently, these are only generated when first building an extension. In the future, we'll want to generate them when creating an extension in the first place.
b323af86f7d3d3d2660293613f444c74f00762d0
david
  1. Ship It!
  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (6d865c6)