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.3.0-alpha.0 to 1.3.0-alpha.1

4

out/index.d.ts

@@ -1,7 +0,3 @@

import * as path from 'typesafe-path';
export declare function normalizeFileName(fsPath: string): path.PosixPath;
export declare function uriToFileName(uri: string): path.PosixPath;
export declare function fileNameToUri(path: string): string;
export declare function syntaxToLanguageId(syntax: string): string;
export declare function sleep(ms: number): Promise<unknown>;
export declare function notEmpty<T>(value: T | null | undefined): value is T;
Object.defineProperty(exports, "__esModule", { value: true });
exports.notEmpty = exports.sleep = exports.syntaxToLanguageId = exports.fileNameToUri = exports.uriToFileName = exports.normalizeFileName = void 0;
const vscode_uri_1 = require("vscode-uri");
function normalizeFileName(fsPath) {
return uriToFileName(fileNameToUri(fsPath));
}
exports.normalizeFileName = normalizeFileName;
function uriToFileName(uri) {
if (uri.startsWith('https://unpkg.com/')) {
return '/__uri__/node_modules/' + uri.replace('https://unpkg.com/', '');
}
const _uri = vscode_uri_1.URI.parse(uri);
if (_uri.scheme === 'file') {
return _uri.fsPath.replace(/\\/g, '/');
}
else {
return '/__uri__/' + uri.replace('://', '__uri_scheme__');
}
}
exports.uriToFileName = uriToFileName;
function fileNameToUri(path) {
if (path.startsWith('/__uri__/node_modules/')) {
return path.replace('/__uri__/node_modules/', 'https://unpkg.com/');
}
if (path.startsWith('/__uri__/')) {
return path.replace('/__uri__/', '').replace('__uri_scheme__', '://');
}
return vscode_uri_1.URI.file(path).toString();
}
exports.fileNameToUri = fileNameToUri;
exports.notEmpty = exports.sleep = exports.syntaxToLanguageId = void 0;
function syntaxToLanguageId(syntax) {

@@ -32,0 +4,0 @@ switch (syntax) {

4

package.json
{
"name": "@volar/shared",
"version": "1.3.0-alpha.0",
"version": "1.3.0-alpha.1",
"main": "out/index.js",

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

},
"gitHead": "7582403cc521d33f642183a32da44fb1f64e65ef"
"gitHead": "2926dc4af31890e01f6218773e88578ddf0de658"
}
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