Flatten the Djblets.Config.* namespace.

Review Request #13849 — Created May 10, 2024 and submitted

Information

Djblets
release-5.x

Reviewers

TypeScript gets unhappy if you're mixing what it considers to be a
"namespace" with ES modules, and can end up discarding a lot of type
checking as a result. Their recommendation is that everything these days
should be modules.

Before we switched to modules, we were starting to try to namespace our
code more thoroughly, and therefore everything inside the Djblets
configForms bundle was namespaced into Djblets.Config.*.

This change makes it so we export two names for each top-level item,
Djblets.Config.* and Djblets.Config*. This allows us to import the
ConfigForms* names from djblets/configForms without getting any warnings.

  • Ran js-tests.
  • Verified that the compiled configForms index.js file only had one copy
    of the definitions for the classes but was exporting them under both
    names.
Summary ID
Flatten the Djblets.Config.* namespace.
TypeScript gets unhappy if you're mixing what it considers to be a "namespace" with ES modules, and can end up discarding a lot of type checking as a result. Their recommendation is that everything these days should be modules. Before we switched to modules, we were starting to try to namespace our code more thoroughly, and therefore everything inside the Djblets configForms bundle was namespaced into `Djblets.Config.*`. This change makes it so we export two names for each top-level item, `Djblets.Config.*` and `Djblets.Config*`. This allows us to import the `Config*` names from `djblets/configForms` without getting any warnings. Testing Done: - Ran js-tests. - Verified that the compiled configForms index.js file only had one copy of the definitions for the classes but was exporting them under both names.
3c7425c5ef7d2924195d410d7ffe8cad82bccbf5
Description From Last Updated

This should be in the expanded, one-type-per-line form.

chipx86chipx86
chipx86
  1. I know this is a major change to this, but I actually feel like ConfigForms is a more appropriate prefix than Config. Granted, the latter maps to what we already had, but wasn't really explicit enough either. Config sounds too much like configuration for Djblets.

    1. An important part of testing here is also going to be making sure that the comment dialog can still be dragged by touch.

    2. Oops, wrong review request.

  2. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    This should be in the expanded, one-type-per-line form.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.x (a6659e7)