typescript-svelte-plugin
Advanced tools
Comparing version 0.1.2 to 0.2.1
@@ -15,3 +15,3 @@ "use strict"; | ||
logger.log('Starting Svelte plugin'); | ||
const snapshotManager = new svelte_snapshots_1.SvelteSnapshotManager(modules.typescript, info.project.projectService, logger, !!info.project.getCompilerOptions().strict); | ||
const snapshotManager = new svelte_snapshots_1.SvelteSnapshotManager(modules.typescript, info.project.projectService, logger); | ||
patchCompilerOptions(info.project); | ||
@@ -18,0 +18,0 @@ module_loader_1.patchModuleLoader(logger, snapshotManager, modules.typescript, info.languageServiceHost, info.project); |
@@ -28,4 +28,4 @@ "use strict"; | ||
const getCompletionEntryDetails = ls.getCompletionEntryDetails; | ||
ls.getCompletionEntryDetails = (fileName, position, entryName, formatOptions, source, preferences) => { | ||
const details = getCompletionEntryDetails(fileName, position, entryName, formatOptions, source, preferences); | ||
ls.getCompletionEntryDetails = (fileName, position, entryName, formatOptions, source, preferences, data) => { | ||
const details = getCompletionEntryDetails(fileName, position, entryName, formatOptions, source, preferences, data); | ||
if (details || !utils_1.isSvelteFilePath(source || '')) { | ||
@@ -37,3 +37,3 @@ return details; | ||
// won't match anything. Therefore add it back and remove it afterwards again. | ||
const svelteDetails = getCompletionEntryDetails(fileName, position, entryName + componentPostfix, formatOptions, source, preferences); | ||
const svelteDetails = getCompletionEntryDetails(fileName, position, entryName + componentPostfix, formatOptions, source, preferences, data); | ||
if (!svelteDetails) { | ||
@@ -40,0 +40,0 @@ return undefined; |
@@ -72,6 +72,6 @@ "use strict"; | ||
return resolved.map((moduleName, idx) => { | ||
if (moduleName) { | ||
const fileName = moduleNames[idx]; | ||
if (moduleName || !utils_1.ensureRealSvelteFilePath(fileName).endsWith('.svelte')) { | ||
return moduleName; | ||
} | ||
const fileName = moduleNames[idx]; | ||
const cachedModule = moduleCache.get(fileName, containingFile); | ||
@@ -78,0 +78,0 @@ if (cachedModule) { |
@@ -40,5 +40,4 @@ import type ts from 'typescript/lib/tsserverlibrary'; | ||
private logger; | ||
private strictMode; | ||
private snapshots; | ||
constructor(typescript: typeof ts, projectService: ts.server.ProjectService, logger: Logger, strictMode: boolean); | ||
constructor(typescript: typeof ts, projectService: ts.server.ProjectService, logger: Logger); | ||
get(fileName: string): SvelteSnapshot | undefined; | ||
@@ -45,0 +44,0 @@ create(fileName: string): SvelteSnapshot | undefined; |
@@ -195,7 +195,6 @@ "use strict"; | ||
class SvelteSnapshotManager { | ||
constructor(typescript, projectService, logger, strictMode) { | ||
constructor(typescript, projectService, logger) { | ||
this.typescript = typescript; | ||
this.projectService = projectService; | ||
this.logger = logger; | ||
this.strictMode = strictMode; | ||
this.snapshots = new Map(); | ||
@@ -242,3 +241,2 @@ this.patchProjectServiceReadFile(); | ||
filename: path.split('/').pop(), | ||
strictMode: this.strictMode, | ||
isTsFile | ||
@@ -245,0 +243,0 @@ }); |
{ | ||
"name": "typescript-svelte-plugin", | ||
"version": "0.1.2", | ||
"version": "0.2.1", | ||
"description": "A TypeScript Plugin providing Svelte intellisense", | ||
@@ -26,5 +26,5 @@ "main": "dist/src/index.js", | ||
"dependencies": { | ||
"svelte2tsx": "*", | ||
"sourcemap-codec": "^1.4.4" | ||
"svelte2tsx": "~0.2.0", | ||
"sourcemap-codec": "^1.4.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
31
0
47636
1082
+ Addedsvelte@3.59.2(transitive)
+ Addedsvelte2tsx@0.2.1(transitive)
+ Addedtypescript@4.9.5(transitive)
- Removed@ampproject/remapping@2.3.0(transitive)
- Removed@jridgewell/gen-mapping@0.3.8(transitive)
- Removed@jridgewell/resolve-uri@3.1.2(transitive)
- Removed@jridgewell/set-array@1.2.1(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@jridgewell/trace-mapping@0.3.25(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@typescript-eslint/types@8.18.1(transitive)
- Removedacorn@8.14.0(transitive)
- Removedacorn-typescript@1.4.13(transitive)
- Removedaria-query@5.3.2(transitive)
- Removedaxobject-query@4.1.0(transitive)
- Removedesm-env@1.2.1(transitive)
- Removedesrap@1.3.1(transitive)
- Removedis-reference@3.0.3(transitive)
- Removedlocate-character@3.0.0(transitive)
- Removedmagic-string@0.30.17(transitive)
- Removedsvelte@5.14.4(transitive)
- Removedsvelte2tsx@0.7.31(transitive)
- Removedtypescript@5.7.2(transitive)
- Removedzimmerframe@1.1.2(transitive)
Updatedsourcemap-codec@^1.4.8
Updatedsvelte2tsx@~0.2.0