Socket
Socket
Sign inDemoInstall

vite-plugin-checker

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-checker - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

15

dist/cjs/checkers/typescript/main.js

@@ -140,10 +140,13 @@ var __create = Object.create;

if (typeof config.typescript === "object") {
const { root, tsconfigPath, buildMode } = config.typescript;
let args = [buildMode ? "-b" : "--noEmit"];
if (tsconfigPath) {
const fullConfigPath = root ? import_path.default.join(root, tsconfigPath) : tsconfigPath;
const { root = "", tsconfigPath = "", buildMode } = config.typescript;
const args = [buildMode ? "-b" : "--noEmit"];
let projectPath = "";
if (root || tsconfigPath) {
projectPath = root ? import_path.default.join(root, tsconfigPath) : tsconfigPath;
}
if (projectPath) {
if (buildMode) {
args = args.concat([fullConfigPath]);
args.push(projectPath);
} else {
args = args.concat(["-p", fullConfigPath]);
args.push("-p", projectPath);
}

@@ -150,0 +153,0 @@ }

11

dist/cjs/checkers/vueTsc/main.js

@@ -141,8 +141,11 @@ var __create = Object.create;

if (typeof config.vueTsc === "object") {
const { root, tsconfigPath } = config.vueTsc;
const { root = "", tsconfigPath = "" } = config.vueTsc;
let args = ["--noEmit"];
if (tsconfigPath) {
const fullConfigPath = root ? import_path.default.join(root, tsconfigPath) : tsconfigPath;
args = args.concat(["-p", fullConfigPath]);
let projectPath = "";
if (root || tsconfigPath) {
projectPath = root ? import_path.default.join(root, tsconfigPath) : tsconfigPath;
}
if (projectPath) {
args.push("-p", projectPath);
}
return ["vue-tsc", args];

@@ -149,0 +152,0 @@ }

@@ -0,4 +1,17 @@

import { SharedConfig } from '../types.js';
import 'vite';
import 'worker_threads';
import 'eslint';
import 'stylelint';
import '../checkers/vls/initParams.js';
import 'vscode-uri';
import 'vscode-languageserver/node';
declare const RUNTIME_CLIENT_RUNTIME_PATH = "/@vite-plugin-checker-runtime";
declare const RUNTIME_CLIENT_ENTRY_PATH = "/@vite-plugin-checker-runtime-entry";
declare const composePreambleCode: (base: string | undefined, config: Record<string, any>) => string;
declare const wrapVirtualPrefix: (id: `/${string}`) => `virtual:${string}`;
declare const composePreambleCode: ({ baseWithOrigin, overlayConfig, }: {
baseWithOrigin: string;
overlayConfig: SharedConfig['overlay'];
}) => string;
declare const WS_CHECKER_ERROR_EVENT = "vite-plugin-checker:error";

@@ -9,2 +22,2 @@ declare const WS_CHECKER_RECONNECT_EVENT = "vite-plugin-checker:reconnect";

export { RUNTIME_CLIENT_ENTRY_PATH, RUNTIME_CLIENT_RUNTIME_PATH, WS_CHECKER_ERROR_EVENT, WS_CHECKER_RECONNECT_EVENT, composePreambleCode, runtimeCode, runtimeSourceFilePath };
export { RUNTIME_CLIENT_ENTRY_PATH, RUNTIME_CLIENT_RUNTIME_PATH, WS_CHECKER_ERROR_EVENT, WS_CHECKER_RECONNECT_EVENT, composePreambleCode, runtimeCode, runtimeSourceFilePath, wrapVirtualPrefix };

@@ -36,3 +36,4 @@ var __create = Object.create;

runtimeCode: () => runtimeCode,
runtimeSourceFilePath: () => runtimeSourceFilePath
runtimeSourceFilePath: () => runtimeSourceFilePath,
wrapVirtualPrefix: () => wrapVirtualPrefix
});

@@ -47,7 +48,11 @@ module.exports = __toCommonJS(client_exports);

const RUNTIME_CLIENT_ENTRY_PATH = "/@vite-plugin-checker-runtime-entry";
const composePreambleCode = (base = "/", config) => `
import { inject } from "${base}${RUNTIME_CLIENT_RUNTIME_PATH.slice(1)}";
const wrapVirtualPrefix = (id) => `virtual:${id.slice("/".length)}`;
const composePreambleCode = ({
baseWithOrigin = "/",
overlayConfig
}) => `
import { inject } from "${baseWithOrigin}${RUNTIME_CLIENT_RUNTIME_PATH.slice(1)}";
inject({
overlayConfig: ${JSON.stringify(config)},
base: "${base}",
overlayConfig: ${JSON.stringify(overlayConfig)},
base: "${baseWithOrigin}",
});

@@ -70,4 +75,5 @@ `;

runtimeCode,
runtimeSourceFilePath
runtimeSourceFilePath,
wrapVirtualPrefix
});
//# sourceMappingURL=index.js.map

@@ -71,3 +71,3 @@ var __create = Object.create;

let isProduction = false;
let devBase = "/";
let baseWithOrigin;
let viteMode;

@@ -103,3 +103,3 @@ let buildWatch = false;

logger = config.logger;
devBase = config.base;
baseWithOrigin = config.server.origin ? config.server.origin + config.base : config.base;
isProduction || (isProduction = config.isProduction || config.command === "build");

@@ -120,3 +120,3 @@ buildWatch = !!config.build.watch;

if (id === import_client.RUNTIME_CLIENT_RUNTIME_PATH || id === import_client.RUNTIME_CLIENT_ENTRY_PATH) {
return id;
return (0, import_client.wrapVirtualPrefix)(id);
}

@@ -126,7 +126,7 @@ return;

load(id) {
if (id === import_client.RUNTIME_CLIENT_RUNTIME_PATH) {
if (id === (0, import_client.wrapVirtualPrefix)(import_client.RUNTIME_CLIENT_RUNTIME_PATH)) {
return import_client.runtimeCode;
}
if (id === import_client.RUNTIME_CLIENT_ENTRY_PATH) {
return (0, import_client.composePreambleCode)(devBase, overlayConfig);
if (id === (0, import_client.wrapVirtualPrefix)(import_client.RUNTIME_CLIENT_ENTRY_PATH)) {
return (0, import_client.composePreambleCode)({ baseWithOrigin, overlayConfig });
}

@@ -144,3 +144,3 @@ return;

attrs: { type: "module" },
children: (0, import_client.composePreambleCode)(devBase, overlayConfig)
children: (0, import_client.composePreambleCode)({ baseWithOrigin, overlayConfig })
}

@@ -147,0 +147,0 @@ ];

@@ -118,3 +118,3 @@ import { ConfigEnv, ErrorPayload } from 'vite';

* Use this to add extra style string to the badge button, the string format is
* [Svelte style](https://svelte.dev/docs#template-syntax-element-directives-style-property)
* [HTML element's style property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style)
* For example, if you want to hide the badge,

@@ -127,3 +127,3 @@ * you can pass `display: none;` to the badgeStyle property

* Use this to add extra style string to the diagnostic panel, the string format is
* [Svelte style](https://svelte.dev/docs#template-syntax-element-directives-style-property)
* [HTML element's style property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style)
* For example, if you want to change the opacity of the panel,

@@ -130,0 +130,0 @@ * you can pass `opacity: 0.8;` to the panelStyle property

@@ -113,10 +113,13 @@ import os from "os";

if (typeof config.typescript === "object") {
const { root, tsconfigPath, buildMode } = config.typescript;
let args = [buildMode ? "-b" : "--noEmit"];
if (tsconfigPath) {
const fullConfigPath = root ? path.join(root, tsconfigPath) : tsconfigPath;
const { root = "", tsconfigPath = "", buildMode } = config.typescript;
const args = [buildMode ? "-b" : "--noEmit"];
let projectPath = "";
if (root || tsconfigPath) {
projectPath = root ? path.join(root, tsconfigPath) : tsconfigPath;
}
if (projectPath) {
if (buildMode) {
args = args.concat([fullConfigPath]);
args.push(projectPath);
} else {
args = args.concat(["-p", fullConfigPath]);
args.push("-p", projectPath);
}

@@ -123,0 +126,0 @@ }

@@ -114,8 +114,11 @@ import { createRequire } from "module";

if (typeof config.vueTsc === "object") {
const { root, tsconfigPath } = config.vueTsc;
const { root = "", tsconfigPath = "" } = config.vueTsc;
let args = ["--noEmit"];
if (tsconfigPath) {
const fullConfigPath = root ? path.join(root, tsconfigPath) : tsconfigPath;
args = args.concat(["-p", fullConfigPath]);
let projectPath = "";
if (root || tsconfigPath) {
projectPath = root ? path.join(root, tsconfigPath) : tsconfigPath;
}
if (projectPath) {
args.push("-p", projectPath);
}
return ["vue-tsc", args];

@@ -122,0 +125,0 @@ }

@@ -0,4 +1,17 @@

import { SharedConfig } from '../types.js';
import 'vite';
import 'worker_threads';
import 'eslint';
import 'stylelint';
import '../checkers/vls/initParams.js';
import 'vscode-uri';
import 'vscode-languageserver/node';
declare const RUNTIME_CLIENT_RUNTIME_PATH = "/@vite-plugin-checker-runtime";
declare const RUNTIME_CLIENT_ENTRY_PATH = "/@vite-plugin-checker-runtime-entry";
declare const composePreambleCode: (base: string | undefined, config: Record<string, any>) => string;
declare const wrapVirtualPrefix: (id: `/${string}`) => `virtual:${string}`;
declare const composePreambleCode: ({ baseWithOrigin, overlayConfig, }: {
baseWithOrigin: string;
overlayConfig: SharedConfig['overlay'];
}) => string;
declare const WS_CHECKER_ERROR_EVENT = "vite-plugin-checker:error";

@@ -9,2 +22,2 @@ declare const WS_CHECKER_RECONNECT_EVENT = "vite-plugin-checker:reconnect";

export { RUNTIME_CLIENT_ENTRY_PATH, RUNTIME_CLIENT_RUNTIME_PATH, WS_CHECKER_ERROR_EVENT, WS_CHECKER_RECONNECT_EVENT, composePreambleCode, runtimeCode, runtimeSourceFilePath };
export { RUNTIME_CLIENT_ENTRY_PATH, RUNTIME_CLIENT_RUNTIME_PATH, WS_CHECKER_ERROR_EVENT, WS_CHECKER_RECONNECT_EVENT, composePreambleCode, runtimeCode, runtimeSourceFilePath, wrapVirtualPrefix };

@@ -6,7 +6,11 @@ import fs from "fs";

const RUNTIME_CLIENT_ENTRY_PATH = "/@vite-plugin-checker-runtime-entry";
const composePreambleCode = (base = "/", config) => `
import { inject } from "${base}${RUNTIME_CLIENT_RUNTIME_PATH.slice(1)}";
const wrapVirtualPrefix = (id) => `virtual:${id.slice("/".length)}`;
const composePreambleCode = ({
baseWithOrigin = "/",
overlayConfig
}) => `
import { inject } from "${baseWithOrigin}${RUNTIME_CLIENT_RUNTIME_PATH.slice(1)}";
inject({
overlayConfig: ${JSON.stringify(config)},
base: "${base}",
overlayConfig: ${JSON.stringify(overlayConfig)},
base: "${baseWithOrigin}",
});

@@ -28,4 +32,5 @@ `;

runtimeCode,
runtimeSourceFilePath
runtimeSourceFilePath,
wrapVirtualPrefix
};
//# sourceMappingURL=index.js.map

@@ -11,2 +11,3 @@ import chalk from "chalk";

runtimeCode,
wrapVirtualPrefix,
WS_CHECKER_RECONNECT_EVENT

@@ -47,3 +48,3 @@ } from "./client/index.js";

let isProduction = false;
let devBase = "/";
let baseWithOrigin;
let viteMode;

@@ -79,3 +80,3 @@ let buildWatch = false;

logger = config.logger;
devBase = config.base;
baseWithOrigin = config.server.origin ? config.server.origin + config.base : config.base;
isProduction || (isProduction = config.isProduction || config.command === "build");

@@ -96,3 +97,3 @@ buildWatch = !!config.build.watch;

if (id === RUNTIME_CLIENT_RUNTIME_PATH || id === RUNTIME_CLIENT_ENTRY_PATH) {
return id;
return wrapVirtualPrefix(id);
}

@@ -102,7 +103,7 @@ return;

load(id) {
if (id === RUNTIME_CLIENT_RUNTIME_PATH) {
if (id === wrapVirtualPrefix(RUNTIME_CLIENT_RUNTIME_PATH)) {
return runtimeCode;
}
if (id === RUNTIME_CLIENT_ENTRY_PATH) {
return composePreambleCode(devBase, overlayConfig);
if (id === wrapVirtualPrefix(RUNTIME_CLIENT_ENTRY_PATH)) {
return composePreambleCode({ baseWithOrigin, overlayConfig });
}

@@ -120,3 +121,3 @@ return;

attrs: { type: "module" },
children: composePreambleCode(devBase, overlayConfig)
children: composePreambleCode({ baseWithOrigin, overlayConfig })
}

@@ -123,0 +124,0 @@ ];

@@ -118,3 +118,3 @@ import { ConfigEnv, ErrorPayload } from 'vite';

* Use this to add extra style string to the badge button, the string format is
* [Svelte style](https://svelte.dev/docs#template-syntax-element-directives-style-property)
* [HTML element's style property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style)
* For example, if you want to hide the badge,

@@ -127,3 +127,3 @@ * you can pass `display: none;` to the badgeStyle property

* Use this to add extra style string to the diagnostic panel, the string format is
* [Svelte style](https://svelte.dev/docs#template-syntax-element-directives-style-property)
* [HTML element's style property](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style)
* For example, if you want to change the opacity of the panel,

@@ -130,0 +130,0 @@ * you can pass `opacity: 0.8;` to the panelStyle property

{
"name": "vite-plugin-checker",
"version": "0.6.0",
"version": "0.6.1",
"description": "Vite plugin that runs TypeScript type checker on a separate process.",

@@ -112,7 +112,5 @@ "types": "./dist/esm/main.d.ts",

"clean": "rimraf dist",
"build": "tsup && zx ../../scripts/patchCjs.mjs",
"build:test": "tsup --sourcemap inline",
"changelog": "conventional-changelog -p angular -i ../../CHANGELOG.md -s --commit-path ../../ --lerna-package vite-plugin-checker",
"release": "zx ../../scripts/release.mjs"
"build": "tsup && node ../../scripts/patchCjs.mjs",
"build:test": "tsup --sourcemap inline"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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