Skip to content

unify API for @babel/register, webpack, Jest etc. include/ignore and cache settings #621

@Domiii

Description

@Domiii

Usually, we use @babel/register for instrumentation (and thus caching). However, we cannot use @babel/register with Jest, so we need to add the corresponding settings to Jest's config instead.

  • add proper include support for Jest
    • add to Jest's own transformer
    • also wrap Jest CLI call in @babel/register
    • allow the two to be configured once, without copy+pasting?
      • probably want to use ENV
    • make @babel/register/lib/node.js's configFile: false configurable
      • -> or, in case of Jest, change babel.config.js to only add @dbux/babel-plugin if not already added
        • -> or change @dbux/cli/src/buildBabelOptions to not add it instead
      • also, change Jest's babel.config.js, s.t. @dbux/babel-plugin is not added if DBUX is disabled
      • because else, the config file would add @dbux/babel-plugin a second time when read from register
    • add more finely grained config options for module path include/ignore to moduleFilter
      • because we want to disable (not just packages, but) specific files, such as jest-runner/build/requireOrImportModule.js etc.
  • add cache support for Jest
  • generalize cache management
  • test w/ javascript-algorithms

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestperformancePerformance of runtime analysis tools can be quite a nuisance.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions