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

@volar/shared

Package Overview
Dependencies
Maintainers
1
Versions
231
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@volar/shared - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

4

out/path.d.ts

@@ -1,7 +0,5 @@

import { URI } from 'vscode-uri';
import * as path from 'typesafe-path';
export declare function getPathOfUri(uri: string): path.PosixPath;
export declare function normalizeFileName(fsPath: string): path.PosixPath;
export declare function normalizeUri(uri: string): string;
export declare function getUriByPath(rootUri: URI, path: string): string;
export declare function getUriByPath(path: string): string;
export declare function isFileInDir(fileName: path.OsPath, dir: path.OsPath): boolean;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFileInDir = exports.getUriByPath = exports.normalizeUri = exports.normalizeFileName = exports.getPathOfUri = void 0;
exports.isFileInDir = exports.getUriByPath = exports.normalizeFileName = exports.getPathOfUri = void 0;
const vscode_uri_1 = require("vscode-uri");
const path = require("typesafe-path");
function getPathOfUri(uri) {
return vscode_uri_1.URI.parse(uri).fsPath.replace(/\\/g, '/');
const _uri = vscode_uri_1.URI.parse(uri);
if (_uri.scheme === 'file') {
return _uri.fsPath.replace(/\\/g, '/');
}
else {
return '/__uri__/' + uri.replace('://', '__uriScheme__/');
}
}

@@ -13,12 +19,8 @@ exports.getPathOfUri = getPathOfUri;

exports.normalizeFileName = normalizeFileName;
function normalizeUri(uri) {
return vscode_uri_1.URI.parse(uri).toString();
function getUriByPath(path) {
if (path.startsWith('/__uri__/')) {
return path.replace('/__uri__/', '').replace('__uriScheme__/', '://');
}
return vscode_uri_1.URI.file(path).toString();
}
exports.normalizeUri = normalizeUri;
function getUriByPath(rootUri, path) {
return vscode_uri_1.URI.file(path).with({
scheme: rootUri.scheme,
authority: rootUri.authority,
}).toString();
}
exports.getUriByPath = getUriByPath;

@@ -25,0 +27,0 @@ function isFileInDir(fileName, dir) {

{
"name": "@volar/shared",
"version": "1.0.11",
"version": "1.0.12",
"main": "out/index.js",

@@ -19,3 +19,3 @@ "license": "MIT",

},
"gitHead": "aff3d7c0896a391412a605597adca7d796e9accf"
"gitHead": "2426aa8ec6731a6f6d88086da7021a32d9306de3"
}
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