Skip to content

Issue with composite dependancies #16

@changesbyjames

Description

@changesbyjames

I am using project references in my monorepo and I'd like to use zshy to build my shared dependancies and they also need to be published independently. One requirement of project references is that consumed packages need to have the composite as true in their tsconfig.

By setting that flag, zshy can't find most/all of the imports. This is the error when running against the tests in the repo:

error TS6307: File '<root>/test/src/assets/config.json' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.

I see similar issues with my project:

shared/workspace/src/client/client.ts:3:58 - error TS6307: File 'shared/workspace/src/server/router.ts' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.
  The file is in the program because:
    Imported via '../server/router' from file 'shared/workspace/src/client/client.ts'
    Imported via './server/router' from file 'src/index.ts'

3 import type { WorkspaceFlags, WorkspaceHonoServer } from '../server/router';

This is reproducible by just adding "composite": true to the the tsconfig.basic.json config and running the tests. I do not see the same behaviour when just running tsc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions