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

@speedy-js/code-helper-diagnostic

Package Overview
Dependencies
Maintainers
9
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedy-js/code-helper-diagnostic - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

lib/diagnostic/diagnostic.d.ts

@@ -19,6 +19,8 @@ import { ModuleGraph } from '@speedy-js/speedy-types';

private errors;
/** 模块图记录 */
private moduleGraphMap;
/** 构建错误记录 */
private buildErrorMap;
/** 模块图记录 */
private moduleGraphMap;
/** 当前打包配置 */
private bundleConfig;
constructor(root: string, opt: DiagnosticOption);

@@ -25,0 +27,0 @@ /** 读取构建器库 */

@@ -31,6 +31,8 @@ "use strict";

this.errors = [];
/** 模块图记录 */
this.moduleGraphMap = new Map();
/** 构建错误记录 */
this.buildErrorMap = new Map();
/** 模块图记录 */
this.moduleGraphMap = new Map();
/** 当前打包配置 */
this.bundleConfig = new Map();
this.root = path_1.default.resolve(root);

@@ -80,2 +82,3 @@ this.options = opt;

runSpeedy() {
var _a;
return __awaiter(this, void 0, void 0, function* () {

@@ -85,3 +88,7 @@ try {

const Bundler = this.bundler.SpeedyBundler;
const userConfig = yield this.getDiagnosticConfig();
const userConfig = yield ((_a = this.bundler) === null || _a === void 0 ? void 0 : _a.loadConfig({
root: path_1.default.resolve(this.root),
configFile: this.options.projectConfig,
command: 'build',
}));
if (!userConfig) {

@@ -180,10 +187,6 @@ this.logger.error(`No builder found, terminate diagnosis.`);

getDiagnosticConfig() {
var _a;
return __awaiter(this, void 0, void 0, function* () {
return (_a = this.bundler) === null || _a === void 0 ? void 0 : _a.loadConfig({
root: path_1.default.resolve(this.root),
configFile: this.options.projectConfig,
command: 'build',
});
});
var _a, _b;
if (this.options.project === 'speedy') {
return (_b = (_a = this.compilers[0]) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.diagnostic;
}
}

@@ -197,4 +200,4 @@ /**

return __awaiter(this, void 0, void 0, function* () {
const userConfig = yield this.getDiagnosticConfig();
const _rulesConfig = typeof (userConfig === null || userConfig === void 0 ? void 0 : userConfig.diagnostic) === 'object' ? userConfig.diagnostic.rules : undefined;
const userConfig = this.getDiagnosticConfig();
const _rulesConfig = typeof userConfig === 'object' ? userConfig.rules : undefined;
const result = yield (0, linter_1.lint)({

@@ -209,3 +212,3 @@ errors: this.buildErrorMap,

root: this.root,
config: (userConfig === null || userConfig === void 0 ? void 0 : userConfig.diagnostic) || {},
config: userConfig !== null && userConfig !== void 0 ? userConfig : {},
});

@@ -212,0 +215,0 @@ this.errors = this.errors.concat(result.errors);

@@ -23,3 +23,3 @@ "use strict";

minor: ['patch', 'minor'],
major: ['patch', 'monor', 'major'],
major: ['patch', 'minor', 'major'],
};

@@ -26,0 +26,0 @@ class PackageMap {

import type { Range, ModuleGraph, Severity, SeverityInput, SeverityString, IDiagnosticConfig } from '@speedy-js/speedy-types';
import type { Chalk } from 'chalk';
import type { Document } from './document';
export { Severity, SeverityInput, SeverityString, ModuleGraph } from '@speedy-js/speedy-types';
/** 诊断建议 */

@@ -5,0 +6,0 @@ export interface Suggestion {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleKind = exports.DiagnosticLevel = void 0;
exports.RuleKind = exports.DiagnosticLevel = exports.Severity = void 0;
var speedy_types_1 = require("@speedy-js/speedy-types");
Object.defineProperty(exports, "Severity", { enumerable: true, get: function () { return speedy_types_1.Severity; } });
/** 诊断等级 */

@@ -5,0 +7,0 @@ var DiagnosticLevel;

{
"name": "@speedy-js/code-helper-diagnostic",
"version": "1.2.0",
"version": "1.2.1",
"description": "",

@@ -17,3 +17,3 @@ "keywords": [],

"dependencies": {
"@speedy-js/speedy-utils": "0.13.2-alpha.10",
"@speedy-js/speedy-utils": "0.13.2-alpha.11",
"lines-and-columns": "2.0.3",

@@ -26,6 +26,6 @@ "look-it-up": "2.1.0"

"@speedy-js/eslint-config": "0.0.1",
"@speedy-js/speedy-config-loader": "0.13.2-alpha.10",
"@speedy-js/speedy-error": "0.13.2-alpha.10",
"@speedy-js/speedy-logger": "0.13.2-alpha.10",
"@speedy-js/speedy-types": "0.13.2-alpha.10",
"@speedy-js/speedy-config-loader": "0.13.2-alpha.11",
"@speedy-js/speedy-error": "0.13.2-alpha.11",
"@speedy-js/speedy-logger": "0.13.2-alpha.11",
"@speedy-js/speedy-types": "0.13.2-alpha.11",
"@speedy-js/test-toolkit": "0.9.2-alpha.2",

@@ -32,0 +32,0 @@ "@types/node": "12.20.42",

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