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

@speedy-js/speedy-types

Package Overview
Dependencies
Maintainers
11
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedy-js/speedy-types - npm Package Compare versions

Comparing version 0.13.2-alpha.19 to 0.13.2-modern.0

14

lib/bundler.d.ts

@@ -7,6 +7,5 @@ import { AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, SyncHook, AsyncParallelHook } from 'tapable';

import { Callback } from './callback';
import { SpeedyErrorInstance, SpeedyErrorParams, SpeedyErrorsData } from './error';
import { SpeedyErrorOptions } from './error';
import { HMRPayload } from './hmr';
import { ISpeedyStats } from './stats';
import { ModuleGraph } from './module-graph';
export interface ISpeedyBundlerHooks {

@@ -56,3 +55,3 @@ /**

*/
endCompilation: AsyncSeriesHook<[SpeedyErrorsData]>;
endCompilation: AsyncSeriesHook<[]>;
/**

@@ -80,2 +79,3 @@ * 所有assets的后续处理,如根据assets生成html文件

hmr: AsyncSeriesHook<[HMRPayload]>;
error: AsyncSeriesHook<[string[]]>;
/**

@@ -140,2 +140,3 @@ * This hook is intended to be used by Speedy Internal Plugins, don't use it publicly or you maybe fired.

resolve(source: string, options?: BundlerResolveOptions): Promise<BundlerResolveResult>;
error(message: string, opts: SpeedyErrorOptions): void;
getTransformContext(path: string): ITransformContext;

@@ -151,9 +152,2 @@ getSourcemapContext(path: string): ISourcemapContext;

}>;
moduleGraph?: ModuleGraph;
report(error: any): void;
throw(message: string, option: SpeedyErrorParams): void;
printErrors(): void;
getErrors(): SpeedyErrorsData;
clearErrors(): void;
removeError(...errors: SpeedyErrorInstance[]): void;
}

@@ -160,0 +154,0 @@ export interface ITransformContext extends ISourcemapContext {

@@ -46,9 +46,3 @@ import type { Options as ProxyOptions } from '../http-proxy-middleware';

baseUrl?: string;
/**
* Enable cors.
*
* @default false
*/
cors?: boolean;
}
export declare type DevServerNormalized = Required<DevServer>;

@@ -13,3 +13,2 @@ import type { MinifyOptions } from 'terser';

import type { Analyze, AnalyzeNormalized } from './analyze';
import { IDiagnosticConfig } from './diagnostic';
export * from './style';

@@ -26,3 +25,2 @@ export * from './asset';

export * from './html';
export * from './diagnostic';
/**

@@ -115,4 +113,3 @@ * - `'serve'` will enable devPlugin, which will start a server.

clearScreen?: boolean;
/** @default true */
diagnostic?: IDiagnosticConfig | boolean;
moduleId?: string;
}

@@ -146,4 +143,5 @@ export interface Cache {

}
export interface BuildConfig extends Required<Omit<CLIConfig, 'terserOptions' | 'dev' | 'filter'>> {
export interface BuildConfig extends Required<Omit<CLIConfig, 'terserOptions' | 'dev' | 'filter' | 'moduleId'>> {
logger: ILogger;
moduleId?: string;
analyze: AnalyzeNormalized;

@@ -150,0 +148,0 @@ resolve: ResolveNormalized;

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

__exportStar(require("./html"), exports);
__exportStar(require("./diagnostic"), exports);
//# sourceMappingURL=index.js.map

@@ -5,3 +5,3 @@ /**

export declare type Input = {
[name: string]: string;
[name: string]: string | string[];
};

@@ -18,10 +18,3 @@ /**

preferRelative?: boolean;
/**
*
* Enable native resolver to speedy up compile speedy.
*
* Default is `true`.
*/
enableNativeResolve?: boolean;
};
export declare type ResolveNormalized = Required<Resolve>;

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

import type CleanCss from 'clean-css';
import type { ProcessOptions as PostcssProcessOptions, AcceptedPlugin as PostcssPlugin } from '../../shims/postcss';

@@ -31,3 +30,2 @@ declare type Item = RegExp | ((path: string) => boolean);

postcss?: PostcssOptions;
cleanCss?: CleanCss.OptionsOutput;
}

@@ -34,0 +32,0 @@ export interface PostCssPx2RemOptions {

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

import { ErrorOverlayPayload } from './hmr';
export { Message as EsbuildError } from '@speedy-js/esbuild';
/** 位置 */

@@ -18,96 +16,21 @@ export interface Position {

}
/** 错误等级 */
export declare enum ErrorLevel {
Ignore = 0,
Warn = 1,
Error = 2
}
/** 代码提示位置 */
export interface CodeFramePosition {
line: number;
export declare type FramePosition = Omit<Position, 'column'> & {
column?: number;
};
export interface FrameRange {
start: FramePosition;
end?: FramePosition;
}
/** 代码所在文件选项 */
export interface CodeFrameFileOption {
/** 文件路径 */
export interface CodeFrameOption {
filePath: string;
}
/** 代码指示选项 */
export interface CodeFrameNormalOption {
/** 文件路径 */
filePath: string;
/** 文件内容 */
fileContent: string;
/** 起点 */
start?: CodeFramePosition;
/** 终点 */
end?: CodeFramePosition;
range: FrameRange;
}
/**
* 代码指示选项
* - 此类型主要是为了兼容 esbuild
*/
export interface CodeFrameLineOption {
/** 文件路径 */
filePath: string;
/** 错误行文本 */
lineText: string;
/** 起点 */
start?: CodeFramePosition;
/** 错误字符长度 */
length?: number;
}
export declare type CodeFrameOption = CodeFrameFileOption | CodeFrameNormalOption | CodeFrameLineOption;
/** 控制项 */
export interface ControllerOption {
/**
* 隐藏堆栈信息
* - 默认为`true`
*/
noStack?: boolean;
/**
* 不显示颜色
* - 默认为`false`
*/
noColor?: boolean;
}
/** 错误数据 */
export interface SpeedyErrorInstance {
/** 项目标识 */
prefixCode?: string;
/** 错误编码 */
code: string;
/** 错误信息 */
message: string;
/** 错误原因代码 */
reason?: string;
/** 堆栈数据 */
stack?: string;
/** 错误所在绝对路径 */
path?: string;
/**
* 错误等级
* - 默认为`'Error'`
*/
level?: keyof typeof ErrorLevel;
/** 错误提示 */
export interface SpeedyErrorOptions {
hint?: string;
/** 说明链接 */
referenceUrl?: string;
/** 将错误导出成 ErrorOverlay 所支持的格式 */
toOverlayPayload(): ErrorOverlayPayload;
/** 设置控制项 */
setControllerOption(opt: ControllerOption): void;
/** 设置代码指示 */
setCodeFrame(opt: CodeFrameOption): void;
documentationURL?: string;
errors?: Error[];
hideStack?: boolean;
disableColor?: boolean;
codeFrame?: CodeFrameOption;
}
export interface SpeedyErrorsData {
errors: SpeedyErrorInstance[];
warnings: SpeedyErrorInstance[];
}
/** 错误数据输入 */
export declare type SpeedyErrorParams = Omit<SpeedyErrorInstance, 'code' | 'message' | 'path' | 'setControllerOption' | 'setCodeFrame' | 'toOverlayPayload'> & {
code?: string;
controller?: ControllerOption;
codeFrame?: CodeFrameOption;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorLevel = void 0;
/** 错误等级 */
var ErrorLevel;
(function (ErrorLevel) {
ErrorLevel[ErrorLevel["Ignore"] = 0] = "Ignore";
ErrorLevel[ErrorLevel["Warn"] = 1] = "Warn";
ErrorLevel[ErrorLevel["Error"] = 2] = "Error";
})(ErrorLevel = exports.ErrorLevel || (exports.ErrorLevel = {}));
//# sourceMappingURL=error.js.map

@@ -31,12 +31,5 @@ /**

}
export interface ErrorOverlayPayload {
title: string;
message: string;
path: string;
codeFrame: string;
stack: string;
}
export interface ErrorPayload {
type: 'error';
errors: ErrorOverlayPayload[];
errors: string[];
}

@@ -13,2 +13,1 @@ import './module';

export * from './stats';
export * from './module-graph';

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

__exportStar(require("./stats"), exports);
__exportStar(require("./module-graph"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@speedy-js/speedy-types",
"version": "0.13.2-alpha.19",
"version": "0.13.2-modern.0",
"description": "",

@@ -22,5 +22,4 @@ "source": "src/index.ts",

"@types/node": "12.20.42",
"@types/clean-css": "4.2.5",
"chokidar": "3.5.2",
"@speedy-js/esbuild": "0.14.28-speedy-5",
"@speedy-js/esbuild": "0.14.28-speedy-6",
"http-proxy-middleware": "2.0.1",

@@ -43,3 +42,2 @@ "tapable": "2.2.1",

"typescript": "4.4.4",
"postcss-load-config": "3.1.4",
"@speedy-js/speedy-node-rig": "1.0.0"

@@ -46,0 +44,0 @@ },

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

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