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

@volar/typescript

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/typescript - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

53

lib/protocol/createSys.js

@@ -20,2 +20,3 @@ "use strict";

const fileWatcher = env.onDidChangeWatchedFiles?.(({ changes }) => {
version++;
for (const change of changes) {

@@ -25,28 +26,22 @@ const fileName = env.typescript.uriToFileName(change.uri);

const baseName = path.basename(fileName);
const dir = getDir(dirName);
if (dir.files.has(baseName) || dir.requestedRead) { // is requested file or directory
version++;
if (change.type === 1 || change.type === 2) {
dir.files.set(normalizeFileId(baseName), {
name: baseName,
stat: {
type: 1,
ctime: Date.now(),
mtime: Date.now(),
size: -1,
},
requestedStat: false,
requestedText: false,
});
}
else if (change.type === 3) {
dir.files.set(normalizeFileId(baseName), {
name: baseName,
stat: undefined,
text: undefined,
requestedStat: true,
requestedText: true,
});
}
}
const fileExists = change.type === 1
|| change.type === 2;
const dir = getDir(dirName, fileExists);
dir.files.set(normalizeFileId(baseName), fileExists ? {
name: baseName,
stat: {
type: 1,
ctime: Date.now(),
mtime: Date.now(),
size: -1,
},
requestedStat: false,
requestedText: false,
} : {
name: baseName,
stat: undefined,
text: undefined,
requestedStat: true,
requestedText: true,
});
}

@@ -340,3 +335,3 @@ });

}
function getDir(dirName) {
function getDir(dirName, markExists = false) {
const dirNames = [];

@@ -356,2 +351,6 @@ let currentDirPath = dirName;

currentDir = getDirFromDir(currentDir, nextDirName);
if (markExists && !currentDir.exists) {
currentDir.exists = true;
version++;
}
}

@@ -358,0 +357,0 @@ return currentDir;

{
"name": "@volar/typescript",
"version": "2.1.4",
"version": "2.1.5",
"license": "MIT",

@@ -15,3 +15,3 @@ "files": [

"dependencies": {
"@volar/language-core": "2.1.4",
"@volar/language-core": "2.1.5",
"path-browserify": "^1.0.1"

@@ -22,5 +22,5 @@ },

"@types/path-browserify": "latest",
"@volar/language-service": "2.1.4"
"@volar/language-service": "2.1.5"
},
"gitHead": "cc46289ff6be015ee41a1896fdaef6aa68cee755"
"gitHead": "1b7f456660134891d91608f36cfc6dd2eaea6f70"
}
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