Fix and improve configuration for Review Board JavaScript/TypeScript.

Review Request #12791 — Created Jan. 20, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

This makes a few adjustments and improvements to our recently-added
configuration:

  • Decorators are now available. This uses Babel's "legacy" decorators,
    which just wrap the decorated item in a function call, as that's
    actually what TC39 recommends currently (the modern specs are too much
    in flux). This will be needed for Spina.

  • Improved our "globals" configuration for imports so that an import
    from, say, "jquery" will transpile to just using the $ namespace.
    This exists for all the modules we have registered as globals. This
    allows us to either import from the modules (recommended) or access
    the namespaces directly (allowed but should be legacy).

  • The TypeScript compiler no longer emits JavaScript or declaration
    files. This was polluting our tree. We'll eventually want to enable
    type declaration files, but not today.

  • Several TypeScript options were turned on to enable better Babel
    interoperability.

Verified I could compile TypeScript and JavaScript.

Summary ID
Fix and improve configuration for Review Board JavaScript/TypeScript.
This makes a few adjustments and improvements to our recently-added configuration: * Decorators are now available. This uses Babel's "legacy" decorators, which just wrap the decorated item in a function call, as that's actually what TC39 recommends currently (the modern specs are too much in flux). This will be needed for Spina. * Improved our "globals" configuration for imports so that an import from, say, "jquery" will transpile to just using the `$` namespace. This exists for all the modules we have registered as globals. This allows us to either import from the modules (recommended) or access the namespaces directly (allowed but should be legacy). * The TypeScript compiler no longer emits JavaScript or declaration files. This was polluting our tree. We'll eventually want to enable type declaration files, but not today. * Several TypeScript options were turned on to enable better Babel interoperability.
c7abe6a27200b9fa12cc48c2c7a58f2d12113e0f
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (292add9)