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

Upgrade typescript version #954

Merged
merged 5 commits into from Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "ts-loader",
"version": "6.0.2",
"version": "6.0.3",
"description": "TypeScript loader for webpack",
"main": "index.js",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -88,7 +88,7 @@
"rimraf": "^2.6.2",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"typescript": "^3.1.1",
"typescript": "^3.5.1",
"webpack": "^4.5.0",
Copy link
Member

Choose a reason for hiding this comment

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

Shall we go for TypeScript 3.5.2 since it's out?

Copy link
Contributor Author

@fa93hws fa93hws Jun 17, 2019

Choose a reason for hiding this comment

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

No problem!
The version goes so quick

"webpack-cli": "^3.1.1"
},
Expand Down
16 changes: 13 additions & 3 deletions src/servicesHost.ts
Expand Up @@ -670,9 +670,19 @@ function addCache(servicesHost: typescript.ModuleResolutionHost) {
const cache = createCache<ReturnType<typeof originalFunction>>(
originalFunction
);
servicesHost[
functionToCache
] = cache.getCached as typescript.ModuleResolutionHost[CacheableFunction];
switch (functionToCache) {
fa93hws marked this conversation as resolved.
Show resolved Hide resolved
case 'fileExists':
servicesHost.fileExists = cache.getCached as typescript.ModuleResolutionHost['fileExists'];
break;
case 'directoryExists':
servicesHost.directoryExists = cache.getCached as typescript.ModuleResolutionHost['directoryExists'];
break;
case 'realpath':
servicesHost.realpath = cache.getCached as typescript.ModuleResolutionHost['realpath'];
break;
default:
throw new Error(`functionToCache ${functionToCache} not found`);
}
clearCacheFunctions.push(cache.clear);
}
});
Expand Down
18 changes: 5 additions & 13 deletions yarn.lock
Expand Up @@ -2942,15 +2942,7 @@ js-tokens@^4.0.0:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-yaml@3.13.1, js-yaml@^3.9.0:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"

js-yaml@^3.13.0:
js-yaml@3.13.1, js-yaml@^3.13.0, js-yaml@^3.9.0:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
Expand Down Expand Up @@ -5041,10 +5033,10 @@ typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@^3.1.1:
version "3.4.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
typescript@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==

uglify-es@^3.3.4:
version "3.3.9"
Expand Down