New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rehearsal/plugins

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rehearsal/plugins - npm Package Compare versions

Comparing version 0.0.33 to 0.0.34

dist/src/plugins/diagnostic-fix.plugin.d.ts

4

dist/src/plugins/empty-lines-preserve.plugin.d.ts

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';
/**

@@ -7,4 +7,4 @@ * Preserves empty line in a multiline string to restore them in EmptyLinesRestorePlugin

export declare class EmptyLinesPreservePlugin extends Plugin {
run(params: PluginParams<undefined>): PluginResult;
run(fileName: string): PluginResult;
}
//# sourceMappingURL=empty-lines-preserve.plugin.d.ts.map

@@ -10,5 +10,4 @@ "use strict";

class EmptyLinesPreservePlugin extends service_1.Plugin {
async run(params) {
async run(fileName) {
var _a;
const { fileName } = params;
const text = this.service.getFileText(fileName);

@@ -15,0 +14,0 @@ (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'EmptyLinesPreserve' run on ${fileName}`);

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';
/**

@@ -6,4 +6,4 @@ * Replaces empty line placeholders set by EmptyLinesPreservePlugin with real empty lines

export declare class EmptyLinesRestorePlugin extends Plugin {
run(params: PluginParams<undefined>): PluginResult;
run(fileName: string): PluginResult;
}
//# sourceMappingURL=empty-lines-restore.plugin.d.ts.map

@@ -9,5 +9,4 @@ "use strict";

class EmptyLinesRestorePlugin extends service_1.Plugin {
async run(params) {
async run(fileName) {
var _a;
const { fileName } = params;
const text = this.service.getFileText(fileName);

@@ -14,0 +13,0 @@ (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'EmptyLinesRestore' run on ${fileName}`);

@@ -5,4 +5,3 @@ export { EmptyLinesPreservePlugin } from './empty-lines-preserve.plugin';

export { ReRehearsePlugin } from './re-rehearse.plugin';
export { DiscoverTypesPlugin } from './discover-types.plugin';
export { DiagnosticAutofixPlugin } from './diagnostic-autofix.plugin';
export { DiagnosticFixPlugin } from './diagnostic-fix.plugin';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DiagnosticAutofixPlugin = exports.DiscoverTypesPlugin = exports.ReRehearsePlugin = exports.LintPlugin = exports.EmptyLinesRestorePlugin = exports.EmptyLinesPreservePlugin = void 0;
exports.DiagnosticFixPlugin = exports.ReRehearsePlugin = exports.LintPlugin = exports.EmptyLinesRestorePlugin = exports.EmptyLinesPreservePlugin = void 0;
var empty_lines_preserve_plugin_1 = require("./empty-lines-preserve.plugin");

@@ -12,6 +12,4 @@ Object.defineProperty(exports, "EmptyLinesPreservePlugin", { enumerable: true, get: function () { return empty_lines_preserve_plugin_1.EmptyLinesPreservePlugin; } });

Object.defineProperty(exports, "ReRehearsePlugin", { enumerable: true, get: function () { return re_rehearse_plugin_1.ReRehearsePlugin; } });
var discover_types_plugin_1 = require("./discover-types.plugin");
Object.defineProperty(exports, "DiscoverTypesPlugin", { enumerable: true, get: function () { return discover_types_plugin_1.DiscoverTypesPlugin; } });
var diagnostic_autofix_plugin_1 = require("./diagnostic-autofix.plugin");
Object.defineProperty(exports, "DiagnosticAutofixPlugin", { enumerable: true, get: function () { return diagnostic_autofix_plugin_1.DiagnosticAutofixPlugin; } });
var diagnostic_fix_plugin_1 = require("./diagnostic-fix.plugin");
Object.defineProperty(exports, "DiagnosticFixPlugin", { enumerable: true, get: function () { return diagnostic_fix_plugin_1.DiagnosticFixPlugin; } });
//# sourceMappingURL=index.js.map

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';
/**

@@ -6,4 +6,4 @@ * Lint the text

export declare class LintPlugin extends Plugin {
run(params: PluginParams<undefined>): PluginResult;
run(fileName: string): PluginResult;
}
//# sourceMappingURL=lint.plugin.d.ts.map

@@ -10,5 +10,4 @@ "use strict";

class LintPlugin extends service_1.Plugin {
async run(params) {
async run(fileName) {
var _a, _b, _c;
const { fileName } = params;
const text = this.service.getFileText(fileName);

@@ -19,3 +18,3 @@ try {

if (report && report.output && report.output !== text) {
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'Lint' run on ${params.fileName}`);
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'Lint' run on ${fileName}`);
this.service.setFileText(fileName, report.output);

@@ -26,5 +25,5 @@ return [fileName];

catch (e) {
(_b = this.logger) === null || _b === void 0 ? void 0 : _b.error(`Plugin 'Lint' failed on ${params.fileName}: ${e.message}`);
(_b = this.logger) === null || _b === void 0 ? void 0 : _b.error(`Plugin 'Lint' failed on ${fileName}: ${e.message}`);
}
(_c = this.logger) === null || _c === void 0 ? void 0 : _c.debug(`Plugin 'Lint' run on ${params.fileName} with no changes`);
(_c = this.logger) === null || _c === void 0 ? void 0 : _c.debug(`Plugin 'Lint' run on ${fileName} with no changes`);
return [];

@@ -31,0 +30,0 @@ }

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { Plugin, type PluginResult } from '@rehearsal/service';
/**

@@ -6,4 +6,4 @@ * Removes all comments with `@rehearsal` tag inside

export declare class ReRehearsePlugin extends Plugin {
run(params: PluginParams<undefined>): PluginResult;
run(fileName: string): PluginResult;
}
//# sourceMappingURL=re-rehearse.plugin.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReRehearsePlugin = void 0;
const typescript_1 = require("typescript");
const service_1 = require("@rehearsal/service");
const typescript_1 = require("typescript");
/**

@@ -10,5 +10,4 @@ * Removes all comments with `@rehearsal` tag inside

class ReRehearsePlugin extends service_1.Plugin {
async run(params) {
async run(fileName) {
var _a;
const { fileName } = params;
const tag = '@rehearsal';

@@ -34,3 +33,3 @@ let text = this.service.getFileText(fileName);

this.service.setFileText(fileName, text);
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'Re-Rehearse' run on ${params.fileName}`);
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`Plugin 'Re-Rehearse' run on ${fileName}`);
return [fileName];

@@ -37,0 +36,0 @@ }

{
"name": "@rehearsal/plugins",
"version": "0.0.33",
"version": "0.0.34",
"description": "Rehearsal JavaScript to TypeScript Shared Libraries",

@@ -33,10 +33,11 @@ "keywords": [

"dependencies": {
"@rehearsal/codefixes": "^0.0.33",
"@rehearsal/service": "^0.0.33",
"@rehearsal/codefixes": "^0.0.34",
"@rehearsal/service": "^0.0.34",
"eslint": "8.22.0"
},
"devDependencies": {
"@rehearsal/reporter": "^0.0.33",
"@rehearsal/utils": "^0.0.33",
"@rehearsal/reporter": "^0.0.34",
"@rehearsal/utils": "^0.0.34",
"@types/eslint": "^8.4.1",
"fixturify-project": "^5.0.3",
"vitest": "^0.22.1"

@@ -53,3 +54,3 @@ },

},
"gitHead": "faff427fff74390795105354e6363b3db0362ab4"
"gitHead": "7c7d68ce2e12a02961ff486e673270b6c8644840"
}

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';
/**

@@ -7,4 +7,3 @@ * Preserves empty line in a multiline string to restore them in EmptyLinesRestorePlugin

export class EmptyLinesPreservePlugin extends Plugin {
async run(params: PluginParams<undefined>): PluginResult {
const { fileName } = params;
async run(fileName: string): PluginResult {
const text = this.service.getFileText(fileName);

@@ -11,0 +10,0 @@

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';

@@ -7,4 +7,3 @@ /**

export class EmptyLinesRestorePlugin extends Plugin {
async run(params: PluginParams<undefined>): PluginResult {
const { fileName } = params;
async run(fileName: string): PluginResult {
const text = this.service.getFileText(fileName);

@@ -11,0 +10,0 @@

@@ -5,3 +5,2 @@ export { EmptyLinesPreservePlugin } from './empty-lines-preserve.plugin';

export { ReRehearsePlugin } from './re-rehearse.plugin';
export { DiscoverTypesPlugin } from './discover-types.plugin';
export { DiagnosticAutofixPlugin } from './diagnostic-autofix.plugin';
export { DiagnosticFixPlugin } from './diagnostic-fix.plugin';

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { type PluginResult, Plugin } from '@rehearsal/service';
import { ESLint } from 'eslint';

@@ -8,4 +8,3 @@

export class LintPlugin extends Plugin {
async run(params: PluginParams<undefined>): PluginResult {
const { fileName } = params;
async run(fileName: string): PluginResult {
const text = this.service.getFileText(fileName);

@@ -18,3 +17,3 @@

if (report && report.output && report.output !== text) {
this.logger?.debug(`Plugin 'Lint' run on ${params.fileName}`);
this.logger?.debug(`Plugin 'Lint' run on ${fileName}`);
this.service.setFileText(fileName, report.output);

@@ -24,6 +23,6 @@ return [fileName];

} catch (e) {
this.logger?.error(`Plugin 'Lint' failed on ${params.fileName}: ${(e as Error).message}`);
this.logger?.error(`Plugin 'Lint' failed on ${fileName}: ${(e as Error).message}`);
}
this.logger?.debug(`Plugin 'Lint' run on ${params.fileName} with no changes`);
this.logger?.debug(`Plugin 'Lint' run on ${fileName} with no changes`);

@@ -30,0 +29,0 @@ return [];

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

import { type PluginParams, type PluginResult, Plugin } from '@rehearsal/service';
import { isLineBreak } from 'typescript';
import { Plugin, type PluginResult } from '@rehearsal/service';
/**

@@ -8,5 +9,3 @@ * Removes all comments with `@rehearsal` tag inside

export class ReRehearsePlugin extends Plugin {
async run(params: PluginParams<undefined>): PluginResult {
const { fileName } = params;
async run(fileName: string): PluginResult {
const tag = '@rehearsal';

@@ -40,3 +39,3 @@

this.logger?.debug(`Plugin 'Re-Rehearse' run on ${params.fileName}`);
this.logger?.debug(`Plugin 'Re-Rehearse' run on ${fileName}`);

@@ -43,0 +42,0 @@ return [fileName];

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

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