Skip to content

🧪 Migrate remaining package tests from preload mocks to tsconfig paths #88

@sdougbrown

Description

@sdougbrown

Context

We found Bun preload module mocks (test/preload-workspace-aliases.ts) are fragile with subpath imports and can fail in CI with errors like:

  • SyntaxError: export ... not found in '@umpire/core/guards'
  • TypeError: Requested module is already fetched.

A more reliable pattern is now proven in @umpire/devtools, @umpire/dsl, @umpire/json, and @umpire/zod:

  1. Remove the shared workspace preload from package bunfig.toml
  2. Add package-local compilerOptions.paths in tsconfig.json for direct sibling deps/subpaths
  3. Validate with package-local test + typecheck

Goal

Apply this migration pattern to all remaining packages still using ../../test/preload-workspace-aliases.ts.

Remaining packages

  • @umpire/react
  • @umpire/signals
  • @umpire/solid
  • @umpire/store
  • @umpire/redux
  • @umpire/pinia
  • @umpire/tanstack-store
  • @umpire/vuex
  • @umpire/reads
  • @umpire/testing
  • @umpire/zustand

Suggested acceptance criteria

  • No listed package preloads ../../test/preload-workspace-aliases.ts
  • Each migrated package has explicit local paths aliases for sibling imports it uses
  • yarn workspace <pkg> test and yarn workspace <pkg> typecheck pass for each migrated package
  • CI passes without relying on preload mock behavior for those packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions