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

@teleporthq/teleport-plugin-import-statements

Package Overview
Dependencies
Maintainers
5
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleporthq/teleport-plugin-import-statements - npm Package Compare versions

Comparing version 0.10.0-alpha.1 to 0.10.0-alpha.2

9

__tests__/index.ts

@@ -1,6 +0,7 @@

import { createPlugin } from '../src/'
import { createImportPlugin } from '../src/'
import { componentDependency } from '@teleporthq/teleport-uidl-builders'
import { ComponentStructure } from '@teleporthq/teleport-types'
describe('plugin-import-statements', () => {
const plugin = createPlugin({
const plugin = createImportPlugin({
importLibsChunkName: 'test-lib',

@@ -12,3 +13,3 @@ importLocalsChunkName: 'test-local',

it('creates 3 AST chunks from the different types of dependencies', async () => {
const structure = {
const structure: ComponentStructure = {
chunks: [],

@@ -33,3 +34,3 @@ uidl: null,

it('pushes chunks for imports even when no statement is needed', async () => {
const structure = {
const structure: ComponentStructure = {
chunks: [],

@@ -36,0 +37,0 @@ options: {},

@@ -7,4 +7,4 @@ import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types';

}
export declare const createPlugin: ComponentPluginFactory<ImportPluginConfig>;
export declare const createImportPlugin: ComponentPluginFactory<ImportPluginConfig>;
declare const _default: ComponentPlugin;
export default _default;

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

var teleport_types_1 = require("@teleporthq/teleport-types");
exports.createPlugin = function (config) {
exports.createImportPlugin = function (config) {
var _a = config || {}, _b = _a.importLibsChunkName, importLibsChunkName = _b === void 0 ? 'import-lib' : _b, _c = _a.importPackagesChunkName, importPackagesChunkName = _c === void 0 ? 'import-pack' : _c, _d = _a.importLocalsChunkName, importLocalsChunkName = _d === void 0 ? 'import-local' : _d, _e = _a.fileType, fileType = _e === void 0 ? teleport_types_1.FileType.JS : _e;

@@ -59,3 +59,2 @@ var importPlugin = function (structure) { return __awaiter(_this, void 0, void 0, function () {

};
exports.default = exports.createPlugin();
var groupDependenciesByPackage = function (dependencies, packageType) {

@@ -98,2 +97,3 @@ var result = {};

};
exports.default = exports.createImportPlugin();
//# sourceMappingURL=index.js.map

@@ -7,4 +7,4 @@ import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types';

}
export declare const createPlugin: ComponentPluginFactory<ImportPluginConfig>;
export declare const createImportPlugin: ComponentPluginFactory<ImportPluginConfig>;
declare const _default: ComponentPlugin;
export default _default;
import { ASTBuilders } from '@teleporthq/teleport-shared';
import { ChunkType, FileType, } from '@teleporthq/teleport-types';
export const createPlugin = (config) => {
export const createImportPlugin = (config) => {
const { importLibsChunkName = 'import-lib', importPackagesChunkName = 'import-pack', importLocalsChunkName = 'import-local', fileType = FileType.JS, } = config || {};

@@ -17,3 +17,2 @@ const importPlugin = async (structure) => {

};
export default createPlugin();
const groupDependenciesByPackage = (dependencies, packageType) => {

@@ -54,2 +53,3 @@ const result = {};

};
export default createImportPlugin();
//# sourceMappingURL=index.js.map
{
"name": "@teleporthq/teleport-plugin-import-statements",
"version": "0.10.0-alpha.1",
"version": "0.10.0-alpha.2",
"description": "A plugin for handling import statements in JavaScript code",

@@ -11,2 +11,3 @@ "author": "teleportHQ",

"module": "dist/esm/index.js",
"sideEffects": false,
"repository": {

@@ -29,6 +30,6 @@ "type": "git",

"dependencies": {
"@teleporthq/teleport-shared": "^0.10.0-alpha.1",
"@teleporthq/teleport-types": "^0.10.0-alpha.1"
"@teleporthq/teleport-shared": "^0.10.0-alpha.2",
"@teleporthq/teleport-types": "^0.10.0-alpha.2"
},
"gitHead": "d4c96887909af2dd6b68054751aa7eca8a48a4d0"
"gitHead": "b185c3fdb7dc94ff8c7eed63f7edba055fffa8d0"
}

@@ -18,3 +18,3 @@ import { ASTBuilders } from '@teleporthq/teleport-shared'

export const createPlugin: ComponentPluginFactory<ImportPluginConfig> = (config) => {
export const createImportPlugin: ComponentPluginFactory<ImportPluginConfig> = (config) => {
const {

@@ -42,4 +42,2 @@ importLibsChunkName = 'import-lib',

export default createPlugin()
const groupDependenciesByPackage = (

@@ -98,1 +96,3 @@ dependencies: Record<string, UIDLDependency>,

}
export default createImportPlugin()

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