Review Request #12805 — Created Jan. 25, 2023 and submitted
tree, bundling it when building packages via Django Pipeline. This
worked fine, but it was extra stuff in our tree, and wasn't particularly
fun to maintain.
we're finally able to modernize this.
Now, our lib bundles (
3rdparty-jsonlint) import straight from
node_modules. The applicable
packages come from Review Board's
package.jsonor from Djblets's
(which is now set up as a "workspace", which helps treat Djblets'
dependencies as our own).
We mostly are using the same versions we previously specified. Some got
bumped up to new .z versions, and
jsonlinthad to be replaced with a
modern (but compatible) fork, but otherwise there aren't any significant
changes. Major version bumps would happen separately.
Some dependencies couldn't be bundled this way. Neither the jQuery-UI
packages nor Jasmine are built in a way that lets us consume them via
imports without a lot of extra maintenance, So we continue to ship them
and bundle them the way we did before. However, they've been moved into
new per-bundle namespaced directories.
To facilitate all this,
rollup.config.jshas been updated to handle
multiple categories of build targets. The
its own configuration, built to consume the two packages we need
3rdpartybundle is for all the
remaining packages in
libs. And the last bundle is for all our code in
Review Board and Djblets. The right bundle is selected based on input
path, by using Rollup's ability to return results based on command line
arguments (since we pass the file paths to Rollup).
This also officially introduces our new Spina library as a dependency,
with Spina's Backbone TypeScript support enabled.
node_modules, installed new packages.
Tested various pages on the site and ran unit tests successfully.
(There are some failures, but those are fixed and will be posted
Successfully built new Review Board packages.
Manually inspected unminified versions of the resulting bundles,
making sure the contents were as expected and there weren't any
duplicate modules bundled in.