* Start experiment * Add logging * Go back to a single program * Fix forEachExternalModuleToImportFrom * Move auxiliary program to language service * Add logging * Don’t use resolution cache * Fix(?) containingProjects for ScriptInfo in auxiliary program * Fix ScriptInfo project inclusion * Add test for default project of auto-importable ScriptInfo * Add fourslash server test * Don’t create auto import provider inside node_modules * Add monorepo-like test * WIP * Naively ensure autoImportProvider is up to date after package.json change * Start limiting when auto update provider gets updated * Respond to changes in node_modules * Don’t create auto-import provider until a file is open that would use it e.g., don’t create them during cross-project find-all-refs * Clean up naming, @internal marking, and fix empty project creation bug * Drop devDependencies, include peerDependencies * Add additional compiler options * Fix interaction with importSuggestionsCache * Move option to UserPreferences, allow inclusion of devDependencies * Don’t filter out peerDependencies * Watch unparseable package.jsons * But don’t filter packages out due to an invalid package.json * Update test * Don’t use autoImportProvider in codefixes where it can never be used (or any refactors) * Add CompletionEntry property for telemetry * Add assertion for isPackageJsonImport to fourslash * Fix missing pushSymbol argument * Add isPackageJsonImport to tests and API baselines * Fix unit test * Host auto import provider in new Project kind * Fix InferredProject attaching on AutoImportProvider-included files, load eagerly * Update Public APIs * Simplify PackageJsonCache host * Remove unneeded markAsDirty * Defer project finished event until after AutoImportProvider is created * Make AutoImportProviderProject always report isOrphan = true * Close and remove AutoImportProviderProject when host project closes * Don’t set pendingEnsureProjectForOpenFiles * Use hasAddedOrRemovedFiles instead of hasNewProgram * Use host-wide watchOptions for package.json watching * Add to `printProjects` * Clean up * Get autoImportProvider directly from LanguageServiceHost * Clean up * Clean up * Close auto import provider on disableLanguageService * Move AutoImportProvider preload to project updateGraph * Clear auto import suggestion cache when provider program changes * Fix tests * Revert yet-unneeded change * Use projectService host for module resolution host * Don’t re-resolve type directives if nothing has changed * Update src/server/project.ts Co-authored-by: Sheetal Nandi <shkamat@microsoft.com> * Use ts.emptyArray Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
34 lines
960 B
TypeScript
34 lines
960 B
TypeScript
/// <reference path="../fourslash.ts" />
|
|
|
|
// @Filename: /node_modules/direct-dependency/package.json
|
|
//// { "name": "direct-dependency", "dependencies": { "indirect-dependency": "*" } }
|
|
|
|
// @Filename: /node_modules/direct-dependency/index.d.ts
|
|
//// import "indirect-dependency";
|
|
//// export declare class DirectDependency {}
|
|
|
|
// @Filename: /node_modules/indirect-dependency/package.json
|
|
//// { "name": "indirect-dependency" }
|
|
|
|
// @Filename: /node_modules/indirect-dependency/index.d.ts
|
|
//// export declare class IndirectDependency
|
|
|
|
// @Filename: /tsconfig.json
|
|
//// {}
|
|
|
|
// @Filename: /package.json
|
|
//// { "dependencies": { "direct-dependency": "*" } }
|
|
|
|
// @Filename: /index.ts
|
|
//// IndirectDependency/**/
|
|
|
|
|
|
|
|
// `IndirectDependency` is in the autoImportProvider program, but
|
|
// filtered out of the suggestions because it is not a direct
|
|
// dependency of the project.
|
|
|
|
goTo.marker("");
|
|
format.setOption("newLineCharacter", "\n");
|
|
verify.importFixAtPosition([]);
|