Skip to content

Limit auto import provider project size #39855

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

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Jul 31, 2020

Don’t create an AutoImportProviderProject if it would result in pulling in more than 10 direct dependencies. The angular starter template, for reference, has five.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jul 31, 2020
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 31, 2020

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 787ea50. You can monitor the build here.

@amcasey
Copy link
Member

amcasey commented Jul 31, 2020

This should be obvious from the many explanations you've given me, but I keep getting mixed up - are @types packages counted towards the cap?

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 31, 2020

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/81164/artifacts?artifactName=tgz&fileId=FD95B7696C1EDE9643E7CED7394C0E2E98B00DD7CAE7ADC1BB91A7283D6E45EA02&fileName=/typescript-4.0.0-insiders.20200731.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

@andrewbranch
Copy link
Member Author

It’s actually not totally obvious @amcasey; the answer is that it depends on the user’s tsconfig.json setting. By default, @types packages will be included automatically in the main program, therefore they would not count against this cap, because the cap applies after we’ve filtered out dependencies that are already present in the main program. But if the user sets an explicit types array in their tsconfig, any @types packages not in that array would go into the auto import provider instead, thus counting toward the cap.

@DanielRosenwasser
Copy link
Member

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 3, 2020

Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 5abf67c. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 3, 2020

Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/81235/artifacts?artifactName=tgz&fileId=581B7C6DDDD54EA8599E9A6A0EBC5005BA28FF51A5CBB8FB4FF208F3D95C090002&fileName=/typescript-4.0.0-insiders.20200803.tgz"
    }
}

and then running npm install.


There is also a playground for this build.

@DanielRosenwasser DanielRosenwasser merged commit 86a87c4 into microsoft:master Aug 3, 2020
@andrewbranch andrewbranch deleted the limit-auto-import-provider-size branch August 3, 2020 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants