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

@teambit/dependencies.fs.linked-dependencies

Package Overview
Dependencies
Maintainers
16
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/dependencies.fs.linked-dependencies - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.bit-capsule-ready

8

dist/linked-dependencies.d.ts

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

export declare function createLinks(rootDir: string, linkedDeps: Record<string, string>): Promise<void>;
declare type CreateLinksOpts = {
componentId?: string | null | undefined;
avoidHardLink?: boolean;
skipIfSymlinkValid?: boolean;
};
export declare function createLinks(rootDir: string, linkedDeps: Record<string, string>, opts?: CreateLinksOpts): Promise<void>;
export {};

4

dist/linked-dependencies.js

@@ -18,6 +18,6 @@ "use strict";

const utils_1 = require("@teambit/legacy/dist/utils");
function createLinks(rootDir, linkedDeps) {
function createLinks(rootDir, linkedDeps, opts = {}) {
return __awaiter(this, void 0, void 0, function* () {
const modulesDir = path_1.default.join(rootDir, 'node_modules');
yield Promise.all(Object.entries(linkedDeps).map(([packageName, linkPath]) => (0, utils_1.createSymlinkOrCopy)(linkPath.substring(5), path_1.default.join(modulesDir, packageName))));
yield Promise.all(Object.entries(linkedDeps).map(([packageName, linkPath]) => (0, utils_1.createSymlinkOrCopy)(linkPath.substring(5), path_1.default.join(modulesDir, packageName), opts.componentId, opts.avoidHardLink, opts.skipIfSymlinkValid)));
});

@@ -24,0 +24,0 @@ }

import path from 'path';
import { createSymlinkOrCopy } from '@teambit/legacy/dist/utils';
export async function createLinks(rootDir: string, linkedDeps: Record<string, string>) {
type CreateLinksOpts = {
componentId?: string | null | undefined;
avoidHardLink?: boolean;
skipIfSymlinkValid?: boolean;
};
export async function createLinks(rootDir: string, linkedDeps: Record<string, string>, opts: CreateLinksOpts = {}) {
const modulesDir = path.join(rootDir, 'node_modules');
await Promise.all(
Object.entries(linkedDeps).map(([packageName, linkPath]) =>
createSymlinkOrCopy(linkPath.substring(5), path.join(modulesDir, packageName))
createSymlinkOrCopy(
linkPath.substring(5),
path.join(modulesDir, packageName),
opts.componentId,
opts.avoidHardLink,
opts.skipIfSymlinkValid
)
)
);
}
{
"name": "@teambit/dependencies.fs.linked-dependencies",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://bit.cloud/teambit/dependencies/fs/linked-dependencies",
"main": "dist/index.js",

@@ -8,3 +9,3 @@ "componentId": {

"name": "fs/linked-dependencies",
"version": "0.0.1"
"version": "0.0.2"
},

@@ -11,0 +12,0 @@ "dependencies": {},

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