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.2.4 to 0.2.5

8

dist/src/index.js

@@ -10,3 +10,3 @@ "use strict";

const logger = new logger_1.Logger(info.project.projectService.logger);
if (!isSvelteProject(info)) {
if (!isSvelteProject(info.project.getCompilerOptions())) {
logger.log('Detected that this is not a Svelte project, abort patching TypeScript');

@@ -22,2 +22,5 @@ return info.languageService;

function getExternalFiles(project) {
if (!isSvelteProject(project.getCompilerOptions())) {
return [];
}
// Needed so the ambient definitions are known inside the tsx files

@@ -45,5 +48,4 @@ const svelteTsPath = (0, path_1.dirname)(require.resolve('svelte2tsx'));

}
function isSvelteProject(info) {
function isSvelteProject(compilerOptions) {
// Add more checks like "no Svelte file found" or "no config file found"?
const compilerOptions = info.project.getCompilerOptions();
const isNoJsxProject = (!compilerOptions.jsx || compilerOptions.jsx === modules.typescript.JsxEmit.Preserve) &&

@@ -50,0 +52,0 @@ (!compilerOptions.jsxFactory || compilerOptions.jsxFactory.startsWith('svelte')) &&

{
"name": "typescript-svelte-plugin",
"version": "0.2.4",
"version": "0.2.5",
"description": "A TypeScript Plugin providing Svelte intellisense",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

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