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

babel-codemod

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-codemod - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

src/AllSyntaxPlugin.d.ts

2

package.json
{
"name": "babel-codemod",
"version": "1.7.0",
"version": "1.7.1",
"description": "babel-codemod rewrites JavaScript using babel plugins.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

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

const source_map_support_1 = require("source-map-support");
const AllSyntaxPlugin_1 = require("./AllSyntaxPlugin");
const PluginLoader_1 = require("./PluginLoader");

@@ -109,3 +110,3 @@ const RecastPlugin_1 = require("./RecastPlugin");

return __awaiter(this, void 0, void 0, function* () {
let result = [RecastPlugin_1.default];
let result = [AllSyntaxPlugin_1.default, RecastPlugin_1.default];
for (let plugin of yield this.getPlugins()) {

@@ -112,0 +113,0 @@ let options = (plugin.declaredName && this.pluginOptions.get(plugin.declaredName)) ||

import * as Babel from '@babel/core';
export default function (babel: Babel): {
parserOverride(code: string, options: object, parse: (code: string, options: object) => object): object;
import { ParseOptions } from './TransformRunner';
export default function (babel: typeof Babel): {
parserOverride(code: string, options: ParseOptions, parse: (code: string, options: ParseOptions) => object): object;
generatorOverride(ast: object, options: any, code: string, generate: (ast: object, options: any) => string): string;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const recast = require("recast");
const AllSyntaxPlugin_1 = require("./AllSyntaxPlugin");
const DEFAULT_OPTIONS = {

@@ -9,15 +10,3 @@ sourceType: 'module',

allowSuperOutsideMethod: true,
plugins: [
'flow',
'jsx',
'asyncGenerators',
'classProperties',
'doExpressions',
'exportExtensions',
'functionBind',
'functionSent',
'objectRestSpread',
'dynamicImport',
'decorators'
]
plugins: AllSyntaxPlugin_1.ALL_PLUGINS
};

@@ -24,0 +13,0 @@ function default_1(babel) {

@@ -15,3 +15,8 @@ import * as Babel from '@babel/core';

}
export declare type ParseOptions = object;
export interface BabelOptions {
filename: string;
}
export interface ParseOptions {
plugins: Array<string>;
}
export declare type AST = object;

@@ -21,2 +26,3 @@ export declare type RawBabelPlugin = (babel: typeof Babel) => {

visitor?: Visitor;
manipulateOptions?: (opts: object, parserOpts: ParseOptions) => void;
parserOverride?: (code: string, options: ParseOptions, parse: (code: string, options: ParseOptions) => AST) => AST;

@@ -23,0 +29,0 @@ generatorOverride?: (ast: AST, options: GeneratorOptions, code: string, generate: (ast: AST, options: GeneratorOptions) => string) => string;

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

const pirates_1 = require("pirates");
const AllSyntaxPlugin_1 = require("./AllSyntaxPlugin");
let useBabelrc = false;

@@ -26,2 +27,3 @@ let revert = null;

presets: [],
plugins: [AllSyntaxPlugin_1.default],
sourceMaps: 'inline'

@@ -28,0 +30,0 @@ };

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