checkly-cli icon indicating copy to clipboard operation
checkly-cli copied to clipboard

Monorepo support

Open PhilGarb opened this issue 2 years ago • 5 comments

What problem does this feature solve?

We are using a Monorepo and would love to adopt checkly. However the constrained on the usable dependencies makes it hard to adopt for us. Local monorepo packages are basically just source code and not really a dependencies that could not be supported by the cli as long as the packages dependencies conform to the runtime. Being able to use local packages would allow us to adopt checkly.

How would you implement this feature?

I am not sure how checkly handles the check for allowed dependencies, but should it not be possible to allow all packages from a specific org? Usually local monorepo packages follow the @company/* naming convention. Filtering these allowed dependencies based on such a glob would be easy. They could then be inlined and the result be checked for the runtime requirements.

PhilGarb avatar Sep 25 '23 10:09 PhilGarb

Hey @PhilGarb which packages do you import into your .check.ts and .spec.ts files that we currently don't support?

tnolet avatar Sep 27 '23 12:09 tnolet

I have a test like this:

import { pwTest } from "@mioto/test-utils";

pwTest("should start test", async ({ anonymusUser }) => {
  await anonymusUser.goto("dashboard");
});

Where @mioto/test-utils is an internal dependency that resolves to packages/test-utils/src/index.ts. I do not want you to support this specific package, but rather the concept of local packages in general. This is source code that might as well be part of the checkly test file itself, but then it would not properly work as a dependency for other situations.

PhilGarb avatar Sep 30 '23 06:09 PhilGarb

Just checking is there anything that can be done here?

PhilGarb avatar Jan 11 '24 12:01 PhilGarb

Just checking is there anything that can be done here?

Hey @PhilGarb is your project open source so we can have a look at the setup?

tnolet avatar Jan 15 '24 13:01 tnolet

It is not open source, but I could create a reproduction. It is basically a standard nx monorepo setup where the local dependencies are imported through typescript paths.

PhilGarb avatar Jan 18 '24 11:01 PhilGarb

I believe this may be a duplicate of #884 which is currently being worked on in #1006. While some work still remains, I think we will have it officially available in a few weeks.

If I am mistaken then please reopen the ticket and provide a little additional context, such as what exactly you are using to allow the import resolution to work if not tsconfig paths.

sorccu avatar Jan 02 '25 15:01 sorccu