Commit Graph

78 Commits

Author SHA1 Message Date
Andy
d5e7227dbb Look at correct 'package.json' location for a scoped package (#18580)
* Look at correct 'package.json' location for a scoped package

* Update baseline
2017-09-20 08:15:24 -07:00
Andy
2e02778960 When loading a module from node_modules, get packageId even in the loadModuleFromFile case (#18185)
* When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case

* Support packageId for <reference types> too
2017-09-07 14:31:20 -07:00
Andy
eef7d8bd3d Treat explicit imports from node_modules as external library imports (#16364)
* Treat explicit imports from `node_modules` as external library imports

* Update baselines
2017-08-17 13:26:38 -07:00
Andy
93abebc04a Change function name to camelCase (#17751) 2017-08-15 12:26:00 -07:00
Andy
f64b8ad902 Add "preserveSymlinks" option (#16661)
* Add "preserveSymlinks" option

* Respond to PR comments
2017-08-11 10:03:21 -07:00
Andy
37b20ee670 For duplicate source files of the same package, make one redirect to the other (#16274)
* For duplicate source files of the same package, make one redirect to the other

* Add reuseProgramStructure tests

* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure

* Use fallthrough instead of early exit from loop

* Use a set to efficiently detect duplicate package names

* Move map setting outside of createRedirectSourceFile

* Correctly handle seenPackageNames set

* sourceFileToPackageId -> sourceFileToPackageName

* Renames

* Respond to PR comments

* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect

* Clean up redirectInfo

* Respond to PR comments
2017-08-09 14:39:06 -07:00
Andy
382785a528 Fix logging of module resolution errors (#17144) 2017-08-08 07:54:08 -07:00
Andy
124510e409 Add comment clarifying isNotNeededPackage (#17321) 2017-07-26 07:09:22 -07:00
Andy
f0bd91c314 Convert Array to ReadonlyArray/Push in commandLineParser.ts (#17323) 2017-07-21 07:16:22 -07:00
Andy
680bfbb705 Combine moduleHasNonRelativeName with isExternalModuleNameRelative (#16564) 2017-07-13 13:46:04 -07:00
Andy
e7dc2a67ca Enable "object-literal-shorthand" lint rule (#16987) 2017-07-07 07:26:58 -07:00
Andy
9013665e22 Replace FileMap with Map where there is no keyMapper (#16724)
* Replace FileMap with Map where there is no keyMapper

* Remove `toKey` and use `keyMapper` directly
2017-06-28 13:15:34 -07:00
Andy
aeb5264b74 Consistently use variable mangledScopedPackageSeparator instead of magic "__" string (#16713) 2017-06-26 11:10:57 -07:00
Andy
09321b3834 Convert Extension to a string enum (#16425) 2017-06-09 19:32:44 -07:00
Andy Hanson
3690926e62 In path mapping module resolution, try loading from path as directory even if it has an extension 2017-05-23 08:11:42 -07:00
Arthur Ozga
567b10d71c Merge pull request #15545 from aozgaa/atTypesPrefixAndImportSuffix
At types prefix and import suffix
2017-05-22 16:53:04 -07:00
Andy Hanson
7c89ff7d77 Inline resolvedModuleFromResolved 2017-05-11 13:39:37 -07:00
Andy Hanson
5c5b5e9a3b Fail on bad moduleResolution kind 2017-05-11 09:07:03 -07:00
Andy
0b0a2d070b Merge pull request #15039 from Microsoft/resolveJavaScriptModule
Refactor how we (internally) expose JS module resolution
2017-05-08 10:52:17 -07:00
Arthur Ozga
7282b9f0ce make internal 2017-05-03 14:12:24 -07:00
Arthur Ozga
5ce32ccbe3 factor out helpers + cleanup startsWith and friends 2017-05-03 13:13:28 -07:00
Arthur Ozga
cbbf6f8847 Merge branch 'master' into tripleEquals 2017-04-17 15:57:51 -07:00
Mohamed Hegazy
4e29b1883d Merge pull request #15051 from Microsoft/at_types
Support @types module resolution from scoped packages
2017-04-17 10:08:15 -07:00
Andy Hanson
c0d26e81f1 Merge branch 'master' into resolveJavaScriptModule 2017-04-14 10:15:30 -07:00
Andy Hanson
ed5eca2b7b boolean-trivia lint rule: Enforce space between comment and argument 2017-04-11 09:44:58 -07:00
Andy Hanson
e9f95e2296 Only trace if traceEnabled 2017-04-10 09:06:26 -07:00
Andy Hanson
8ec593aec2 Support @types module resolution from scoped packages 2017-04-06 08:05:30 -07:00
Andy Hanson
4a3b38b274 Refactor how we (internally) expose JS module resolution
Also, provide a useful error if resolution fails.
2017-04-05 15:33:01 -07:00
Arthur Ozga
3bdec6943e Merge branch 'master' into tripleEquals 2017-04-05 11:51:21 -07:00
Arthur Ozga
7e03429a8e enforce triple-equals 2017-04-04 15:51:13 -07:00
Andy Hanson
73cab09608 Enable jsdoc-format lint rule 2017-04-03 14:39:19 -07:00
Andy Hanson
2305c10a65 Fix lint errors 2017-03-17 13:54:18 -07:00
Andy Hanson
3bc125463b Add more missing semicolons 2017-03-03 07:00:52 -08:00
Andy Hanson
5ea43c8ba3 Merge branch 'master' into semicolon 2017-03-01 08:09:59 -08:00
Mohamed Hegazy
e4d7dc44b7 Merge pull request #13461 from flekmatik/getDefaultTypeRoots-fix
Fixing default typeRoots on Windows
2017-02-15 14:32:36 -08:00
Ryan Cavanaugh
aec310996c Language service extensibility 2017-02-14 13:35:16 -08:00
Andy Hanson
91421c8dbc Fix "semicolon" lint rule options (was not enabled) 2017-02-10 12:24:10 -08:00
Andy Hanson
132fa7093e Respond to comments 2017-01-26 14:26:49 -08:00
Andy Hanson
432808d50b Allow package.json "main" to specify a directory 2017-01-25 07:31:24 -08:00
Richard Karmazín
7378b8af68 Fixing default typeRoots on Windows
Without this function ignores "\"
2017-01-13 12:55:59 +01:00
Andy Hanson
f0e1fd93f7 Merge branch 'master' into map5 2017-01-11 07:17:37 -08:00
Andy
c4a80b2e07 Merge pull request #13363 from Microsoft/lint
Fix linting
2017-01-09 10:11:23 -08:00
Andy Hanson
23fa422b59 String literal completions: Use call signature only if we are *immediately* in a call expression 2017-01-09 07:52:52 -08:00
Andy Hanson
c1b55a9e05 Fix linting 2017-01-09 06:58:07 -08:00
Andy Hanson
346a86582b Merge branch 'master' into map5 2016-12-28 09:36:30 -08:00
Andy Hanson
f510897dbd Remove "sparseArray" constructor function and just use array literals 2016-12-28 08:58:31 -08:00
Vladimir Matveev
11dd368ec0 do not report file lookups if containing folder is known to be missing (#13187)
* added missing '.' at the end of message

* do not report lookups if containing folder is known to be absent
2016-12-27 15:50:14 -08:00
Andy Hanson
9e33585a80 Merge branch 'master' into map5 2016-12-27 12:56:05 -08:00
Mohamed Hegazy
9a0d9d77aa Check trace enabled befoe tracing 2016-12-22 15:14:13 -08:00
Vladimir Matveev
330cceda17 cache results of module resolution for non-relative module names (#13047)
* cache results of module resolution for non-relative module names

* use cache to short-circuit failures
2016-12-21 10:02:28 -08:00