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

Module Resolution and Type Reference directive cache updates and its API changes #43700

Merged
merged 7 commits into from Apr 22, 2021

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Apr 16, 2021

  1. Api for module resolution cache that can update compiler options of current program (and handle redirects correctly) and clearing the cache
  2. Api and implementation for type reference directive cache
  3. Also add package json info cache that stores package json read result in cache till its cleared.
  4. Related changes in ts-loader at Use caches for module resolution and type reference directives when using compiler default functions TypeStrong/ts-loader#1287
    Fixes Repeated package.json reads in ts-loader ts api wrapper compared to tsc --build #42670

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 16, 2021
@sheetalkamat
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 20, 2021

Heya @sheetalkamat, I've started to run the tarball bundle task on this PR at 116b9b3. You can monitor the build here.

@sheetalkamat sheetalkamat changed the title Make the module resolution cache apis for updating compiler options or clearing it Module Resolution and Type Reference directive cache updates and its API changes Apr 20, 2021
@sheetalkamat sheetalkamat marked this pull request as ready for review April 20, 2021 18:48
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Apr 20, 2021
Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

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

The package json info cache infrastructure is going to help a lot with node12 module resolution, too, where we need package.json info for every file we lookup to control resolution.

@sheetalkamat
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 21, 2021

Heya @sheetalkamat, I've started to run the tarball bundle task on this PR at 4466eb4. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Apr 21, 2021

Hey @sheetalkamat, 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/101463/artifacts?artifactName=tgz&fileId=B6DAF8DC4086D3275BD9DA1A6CBEC686B8E8C143386E209E6F67EDB4C7558C4C02&fileName=/typescript-4.3.0-insiders.20210421.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@4.3.0-pr-43700-4".;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeated package.json reads in ts-loader ts api wrapper compared to tsc --build
5 participants