Socket
Socket
Sign inDemoInstall

vite-plugin-utils

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-utils - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

logs/test-walk.js

13

constant/index.js

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.singlelineCommentsRE = exports.multilineCommentsRE = exports.KNOWN_ASSET_TYPES = exports.KNOWN_SFC_EXTENSIONS = exports.DEFAULT_EXTENSIONS = void 0;
// https://github.com/vitejs/vite/blob/c3f6731bafeadd310efa4325cb8dcc639636fe48/packages/vite/src/node/constants.ts#L25-L33
exports.DEFAULT_EXTENSIONS = [
export const DEFAULT_EXTENSIONS = [
'.mjs',

@@ -14,3 +11,3 @@ '.js',

];
exports.KNOWN_SFC_EXTENSIONS = [
export const KNOWN_SFC_EXTENSIONS = [
'.vue',

@@ -20,3 +17,3 @@ '.svelte',

// https://github.com/vitejs/vite/blob/c3f6731bafeadd310efa4325cb8dcc639636fe48/packages/vite/src/node/constants.ts#L91-L123
exports.KNOWN_ASSET_TYPES = [
export const KNOWN_ASSET_TYPES = [
// images

@@ -51,3 +48,3 @@ 'png',

];
exports.multilineCommentsRE = /\/\*(.|[\r\n])*?\*\//gm;
exports.singlelineCommentsRE = /\/\/.*/g;
export const multilineCommentsRE = /\/\*(.|[\r\n])*?\*\//gm;
export const singlelineCommentsRE = /\/\/.*/g;

@@ -32,1 +32,2 @@ export declare function cleanUrl(url: string): string;

}
export declare function normalizePath(id: string): string;

@@ -1,5 +0,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.walk = exports.relativeify = exports.MagicString = exports.cleanUrl = void 0;
function cleanUrl(url) {
import path from 'node:path';
import os from 'node:os';
export function cleanUrl(url) {
const queryRE = /\?.*$/s;

@@ -9,7 +8,6 @@ const hashRE = /#.*$/s;

}
exports.cleanUrl = cleanUrl;
/**
* @see https://github.com/rich-harris/magic-string
*/
class MagicString {
export class MagicString {
constructor(str) {

@@ -50,3 +48,2 @@ this.str = str;

}
exports.MagicString = MagicString;
/**

@@ -56,3 +53,3 @@ * - `'' -> '.'`

*/
function relativeify(relative) {
export function relativeify(relative) {
if (relative === '') {

@@ -66,7 +63,6 @@ return '.';

}
exports.relativeify = relativeify;
/**
* Ast tree walk
*/
async function walk(ast, visitors) {
export async function walk(ast, visitors) {
var _a;

@@ -87,3 +83,2 @@ if (!ast)

}
exports.walk = walk;
walk.sync = function walkSync(ast, visitors) {

@@ -105,1 +100,8 @@ var _a;

};
const isWindows = os.platform() === 'win32';
function slash(p) {
return p.replace(/\\/g, '/');
}
export function normalizePath(id) {
return path.posix.normalize(isWindows ? slash(id) : id);
}
{
"name": "vite-plugin-utils",
"description": "A collection of opinionated Vite plugin utils",
"version": "0.3.0",
"version": "0.3.1",
"type": "module",
"main": "",

@@ -6,0 +7,0 @@ "repository": {

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sort = exports.OfficialPlugins = void 0;
exports.OfficialPlugins = {
export const OfficialPlugins = {
'@vitejs/plugin-vue': 'vite:vue',

@@ -18,3 +15,3 @@ 'vite-plugin-vue2': 'vite-plugin-vue2',

*/
function sort(options) {
export function sort(options) {
const { plugin, names, enforce } = options;

@@ -71,2 +68,1 @@ const name = `${plugin.name}:sorter`;

}
exports.sort = sort;
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