Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typescript-svelte-plugin

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-svelte-plugin - npm Package Compare versions

Comparing version 0.1.2 to 0.2.1

CHANGELOG.md

2

dist/src/index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc