-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
TypeScript detection filtering 'node_modules'. #6022
TypeScript detection filtering 'node_modules'. #6022
Conversation
Sorry @mrmckeb but I don't seem to have permissions to assign this PR to you.. I hope this is good enough :) |
I'm good with this change (probably), but linking source code into your |
@Timer thanks for considering this. It seems like a harmless change because any TS project wouldn't rely on TS files only existing in To answer your question the #5947 issue has more info, and I'm ok with changing to The project I'm on has been using CRA since |
Yeah, this is harmless -- I think what you're doing now should suffice until we officially release |
Can we add a e2e test for this please? |
@Timer Sure, is there a comparable test I could look at for reference? I haven't added tests to CRA before, and I'm not quite sure where to start. I see that there's |
|
。。。 |
Hi @holloway, sorry I missed this - December was a busy period for everyone. This looks good, and I'm glad @Timer was able to provide some good feedback. I only have one question/concern - what is this file for? Is it erroneous or intentional? Thanks! |
@mrmckeb Ah I thought it would need a |
Thanks @holloway! Have a great day. |
See #5947.
verifyNoTypeScript
checks whether there are any TypeScript files in the project during the build, and this PR refines that logic by adding a Globby negation filter so that anynode_modules
under./src
is excluded from this logic.Considering that
verifyNoTypeScript
has only existed since CRA 2.1 it seems very unlikely that anyone would depend on checking in anode_modules
for TypeScript support, so this is a safe change.Steps to reproduce this bug and to show that this PR fixes it:
./src/anything
to a directory outside the CRA project directory calledanything
.npm init
theanything
with its ownpackage.json
that depends onbig-integer
.big-integer
is distributed on NPM with TypeScript files which will be present at./src/anything/node_modules/big-integer/BigInteger.d.ts
.yarn build
and CRA ignores the TS and successfully builds.