Skip to content

Commit 925d923

Browse files
committed
Pick up latest TypeScript 4.2 nightly
This also migrates us to use our normal TS install for the serverless version
1 parent 833bae4 commit 925d923

File tree

8 files changed

+17
-24
lines changed

8 files changed

+17
-24
lines changed

extensions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"description": "Dependencies shared by all extensions",
66
"dependencies": {
7-
"typescript": "4.1.2"
7+
"typescript": "^4.2.0-dev.20210201"
88
},
99
"scripts": {
1010
"postinstall": "node ./postinstall"

extensions/typescript-language-features/extension-browser.webpack.config.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ module.exports = withBrowserDefaults({
3838
new CopyPlugin({
3939
patterns: [
4040
{
41-
from: 'node_modules/typescript-web/lib/*.d.ts',
42-
to: 'typescript-web/',
41+
from: '../node_modules/typescript/lib/*.d.ts',
42+
to: 'typescript/',
4343
flatten: true
4444
},
4545
{
46-
from: 'node_modules/typescript-web/lib/typesMap.json',
47-
to: 'typescript-web/'
46+
from: '../node_modules/typescript/lib/typesMap.json',
47+
to: 'typescript/'
4848
},
4949
...languages.map(lang => ({
50-
from: `node_modules/typescript-web/lib/${lang}/**/*`,
51-
to: 'typescript-web/',
50+
from: `../node_modules/typescript/lib/${lang}/**/*`,
51+
to: 'typescript/',
5252
transformPath: (targetPath) => {
53-
return targetPath.replace(/node_modules[\/\\]typescript-web[\/\\]lib/, '');
53+
return targetPath.replace(/\.\.[\/\\]node_modules[\/\\]typescript[\/\\]lib/, '');
5454
}
5555
}))
5656
],
@@ -59,8 +59,8 @@ module.exports = withBrowserDefaults({
5959
new CopyPlugin({
6060
patterns: [
6161
{
62-
from: 'node_modules/typescript-web/lib/tsserver.js',
63-
to: 'typescript-web/tsserver.web.js',
62+
from: '../node_modules/typescript/lib/tsserver.js',
63+
to: 'typescript/tsserver.web.js',
6464
transform: (content) => {
6565
return Terser.minify(content.toString()).code;
6666

extensions/typescript-language-features/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"devDependencies": {
2727
"@types/node": "^12.19.9",
2828
"@types/rimraf": "^2.0.4",
29-
"@types/semver": "^5.5.0",
30-
"typescript-web": "npm:typescript@^4.2.0-dev.20201209"
29+
"@types/semver": "^5.5.0"
3130
},
3231
"scripts": {
3332
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript-language-features",

extensions/typescript-language-features/src/extension.browser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function activate(
5252
const versionProvider = new StaticVersionProvider(
5353
new TypeScriptVersion(
5454
TypeScriptVersionSource.Bundled,
55-
vscode.Uri.joinPath(context.extensionUri, 'dist/browser/typescript-web/tsserver.web.js').toString(),
55+
vscode.Uri.joinPath(context.extensionUri, 'dist/browser/typescript/tsserver.web.js').toString(),
5656
API.fromSimpleString('4.2.0')));
5757

5858
const lazyClientHost = createLazyClientHost(context, false, {

extensions/typescript-language-features/src/languageFeatures/fileConfigurationManager.ts

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ export default class FileConfigurationManager extends Disposable {
175175

176176
const preferences: Proto.UserPreferences = {
177177
quotePreference: this.getQuoteStylePreference(preferencesConfig),
178-
// @ts-expect-error until TypeScript 4.2 API
179178
importModuleSpecifierPreference: getImportModuleSpecifierPreference(preferencesConfig),
180179
importModuleSpecifierEnding: getImportModuleSpecifierEndingPreference(preferencesConfig),
181180
allowTextChangesInNewFiles: document.uri.scheme === fileSchemes.file,

extensions/typescript-language-features/src/typescriptServiceClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
693693
if (isWeb()) {
694694
// On web, treat absolute paths as pointing to standard lib files
695695
if (filepath.startsWith('/')) {
696-
return vscode.Uri.joinPath(this.context.extensionUri, 'node_modules', 'typescript-web', 'lib', filepath.slice(1));
696+
return vscode.Uri.joinPath(this.context.extensionUri, 'node_modules', 'typescript', 'lib', filepath.slice(1));
697697
}
698698
}
699699

extensions/typescript-language-features/yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ typescript-vscode-sh-plugin@^0.6.14:
153153
resolved "https://registry.yarnpkg.com/typescript-vscode-sh-plugin/-/typescript-vscode-sh-plugin-0.6.14.tgz#a81031b502f6346a26ea49ce082438c3e353bb38"
154154
integrity sha512-AkNlRBbI6K7gk29O92qthNSvc6jjmNQ6isVXoYxkFwPa8D04tIv2SOPd+sd+mNpso4tNdL2gy7nVtrd5yFqvlA==
155155

156-
"typescript-web@npm:typescript@^4.2.0-dev.20201209":
157-
version "4.2.0-dev.20201209"
158-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.0-dev.20201209.tgz#fab33fdb1aa7beb857271e0626bca6b200c61351"
159-
integrity sha512-rXJtE/naraN9n3bPBDA5Sa/2nrx1di5se/kVkmAjhUSpBzGmx3zeNHZF59U8XhYQdQ1QsMiDDnjmtjFUGC9LEQ==
160-
161156
vscode-extension-telemetry@0.1.1:
162157
version "0.1.1"
163158
resolved "https://registry.yarnpkg.com/vscode-extension-telemetry/-/vscode-extension-telemetry-0.1.1.tgz#91387e06b33400c57abd48979b0e790415ae110b"

extensions/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# yarn lockfile v1
33

44

5-
typescript@4.1.2:
6-
version "4.1.2"
7-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
8-
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
5+
typescript@^4.2.0-dev.20210201:
6+
version "4.2.0-dev.20210201"
7+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.0-dev.20210201.tgz#3d8ae7214cd4b23d3ae400f84d1afe5679f3e2f0"
8+
integrity sha512-By8G30ZYs+b/8084cSnjP7ILd8ExUBC4Qi9FY2iRlBApHu/A08ExLlCRnYkHN1PgxcNs4rTaozJsgXHJ6cg92g==

0 commit comments

Comments
 (0)