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

Restrict tsconfig files so that TypeScript files live in src for packages #212

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

LukeSheard
Copy link
Contributor

@LukeSheard LukeSheard commented Dec 30, 2020

This PR restricts the location of TypeScript files into the src directory for each package to prevent erroneous files being picked up by type checking and build scripts. This is the beginning of imposing sensible defaults for the modular environment.

After replacing the JPM build script that we had pre modular build I came across this bug when trying to generate typescript files. Since the include is set so broadly it will start picking up generated dist files and fail. I edited the file locally to test and it works fine.

@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2020

🦋 Changeset detected

Latest commit: 579e35f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
modular-scripts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@threepointone
Copy link
Contributor

The fix should be to exclude /dist folders, which I've done in my PR.

@LukeSheard
Copy link
Contributor Author

I think restricting the included files is a better fix - since it minimizes the files to filter upfront.

@threepointone
Copy link
Contributor

That's a different conversation to have then, because that implies also changing the tsconfig, ad saying we should only have .ts(x) files under src. Which we can totally consider, but isn't the right fix for this specific purpose.

@LukeSheard LukeSheard changed the title Fix bug where .d.ts files would not generate in library builds Restrict tsconfig files so that TypeScript files live in src for packages Dec 31, 2020
@threepointone
Copy link
Contributor

Pass CI and I'll stamp this?

@LukeSheard LukeSheard merged commit c5c15eb into master Jan 5, 2021
@LukeSheard LukeSheard deleted the build-fixes branch January 5, 2021 09:54
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.

2 participants