Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow typesVersions-parent tests in tsconfig.json #160

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Nov 7, 2020

Allows e.g. listing ../mock-tests.ts in types/mock/ts1.0/tsconfig.json, so you can run the same tests on newer and older typesVersions.

@@ -411,15 +411,15 @@ function checkFilesFromTsConfig(packageName: string, tsconfig: TsConfig, directo
if (file.startsWith("./")) {
throw new Error(`In ${tsconfigPath}: Unnecessary "./" at the start of ${file}`);
}
if (!isRelativePath(file)) {
if (!isRelativePath(file.replace(/^(?:\.\.\/)+/, ""))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn’t this allow tests from anywhere? Or is there something else that would prevent types/react-dom/tsconfig.json from listing ../react/react-tests.d.ts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants