Make the package.json file in Review Board the primary dependency source.

Review Request #12802 — Created Jan. 23, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

We used to depend fully on Djblets's djblets/dependencies.py for the
list of Node.js packages to install, since we just made use of the basic
static media tooling in Djblets.

This change makes Review Board's package.json a primary source of
dependencies. Right now, we just depend on Djblets (via the .djblets
symlink set up when setting up a development environment), setting it up
as a Node workspace to make full use of symlinks. Upcoming changes will
move more dependencies into this.

This package.json lives in reviewboard/, making it available to
consumers of published packages. We then symlnk to the root of the tree.

These dependencies are reflected into reviewboard/dependencies.py via
a new script that is run any time we run npm install --save or
npm uninstall --save (if that operation would update node_modules).

This way, it should be easier to ensure that we have the right
dependencies in the tree for building static media, looking up types, or
linting the files.

Erased node_modules and re-ran setup.py develop. Verified I got a
working tree, which I was able to use to compile a new package, and
could use with upcoming changes that make deeper use of these
dependencies.

Ran npm install --save ... and uninstall --save ... and verified
that reviewboard/dependencies.py was updated.

Summary ID
Make the package.json file in Review Board the primary dependency source.
We used to depend fully on Djblets's `djblets/dependencies.py` for the list of Node.js packages to install, since we just made use of the basic static media tooling in Djblets. This change makes Review Board's `package.json` a primary source of dependencies. Right now, we just depend on Djblets (via the `.djblets` symlink set up when setting up a development environment), setting it up as a Node workspace to make full use of symlinks. Upcoming changes will move more dependencies into this. This `package.json` lives in `reviewboard/`, making it available to consumers of published packages. We then symlnk to the root of the tree. These dependencies are reflected into `reviewboard/dependencies.py` via a new script that is run any time we run `npm install --save` or `npm uninstall --save` (if that operation would update `node_modules`). This way, it should be easier to ensure that we have the right dependencies in the tree for building static media, looking up types, or linting the files.
78e7a64e2c0e9d9206b06cc29a8feab8939de934
Description From Last Updated

SyntaxError: unmatched ')' Column: 50 Error code: E999

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (3c118f8)