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

install-local-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-local-dependencies - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

CHANGELOG.md

4

bin/install.js

@@ -10,3 +10,3 @@ #!/usr/bin/env node

async function install_and_link() {
async function install() {
const {

@@ -52,3 +52,3 @@ cwd,

install_and_link()
install()
.then((packed_dependencies) => {

@@ -55,0 +55,0 @@ if (packed_dependencies) {

{
"name": "install-local-dependencies",
"version": "0.1.0",
"version": "0.1.1",
"description": "Yet another local dependency installer",

@@ -25,3 +25,3 @@ "homepage": "https://github.com/body-builder/install-local-dependencies#readme",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"release": "standard-version --sign"
},

@@ -31,13 +31,13 @@ "author": "Benedek Káldi",

"dependencies": {
"chokidar": "^3.5.0",
"chokidar": "^3.5.1",
"cosmiconfig": "^7.0.0",
"exec-sh": "^0.3.4",
"exec-sh": "^0.4.0",
"find-cache-dir": "^3.3.1",
"fs-extra": "^9.0.1",
"globby": "^11.0.2",
"lodash": "^4.17.20",
"fs-extra": "^10.0.0",
"globby": "^11.0.3",
"lodash": "^4.17.21",
"pify": "^5.0.0",
"rimraf": "^3.0.2",
"tar": "^6.0.5"
"tar": "^6.1.0"
}
}

@@ -8,3 +8,3 @@ # Install local dependencies

Yet another local dependency installer. Works with NPM, Yarn and PNPM.
Yet another local dependency installer (and watcher). Works with NPM, Yarn and PNPM.

@@ -11,0 +11,0 @@ `install-local-dependencies` checks your **package.json** and installs the listed local packages as they were installed from `npm`. This helps you to get a production-like installation of your locally developed package, without all the issues of symlinked packages (`npm link`), invalid peerDependencies, or different dependency instances in the project, and the development package (eg. React's Invalid Hook Call warnings).

@@ -16,3 +16,3 @@ const path = require('path');

cwd,
temp_path: find_cache_dir({ cwd, name: 'install-local-dependencies' }),
temp_path: find_cache_dir({ cwd, name: this_package_json.name }),
modules_dir: 'node_modules',

@@ -22,3 +22,3 @@ manager: 'npm',

types: ['dependencies', 'devDependencies'],
ignored_files: ['package.json', 'node_modules'],
ignored_files: ['package.json', 'node_modules', '.DS_Store'],
ignored_packages: [],

@@ -25,0 +25,0 @@ };

@@ -150,2 +150,2 @@ const path = require('path');

delete_tarball,
};
};

@@ -84,3 +84,3 @@ const fs = require('fs');

try {
return await promisified.fs.lstat(file_path);
return await promisified.fse.lstat(file_path);
} catch (e) {

@@ -103,4 +103,4 @@ return null;

async function copy_file_or_directory(link_target, link_path) {
const stats = await get_file_stats(link_target);
async function copy_file_or_directory(source_path, destination_path) {
const stats = await get_file_stats(source_path);

@@ -114,8 +114,8 @@ if (!stats) {

if (is_directory) {
return promisified.fs.mkdir(link_path);
return promisified.fs.mkdir(destination_path);
}
// console.log('COPY', link_target, 'to', link_path);
// console.log('COPY', source_path, 'to', destination_path);
return promisified.fse.copy(link_target, link_path);
return promisified.fse.copy(source_path, destination_path);
}

@@ -154,2 +154,2 @@

color_log,
};
};

@@ -142,3 +142,3 @@ const path = require('path');

// This contains all the required data to install the dependencies, or only recreate the hardlinks
// This contains all the required data to install the dependencies, or start the watcher
return { original_package_json, local_dependencies, mocked_dependencies, packed_dependencies };

@@ -150,3 +150,3 @@ }

if (!Array.isArray(packed_dependencies)) {
throw new Error('No data received to link the dependencies.');
throw new Error('No data received to install the dependencies.');
}

@@ -182,4 +182,4 @@

return await Promise.all(local_package_files.map(async (file) => {
const local_path = path.resolve(local_package_path, file); // A path to the existing file
const installed_path = path.resolve(installed_package_path, file); // A path to the new link
const local_path = path.resolve(local_package_path, file); // The path to the source file
const installed_path = path.resolve(installed_package_path, file); // The path to the file in the installed package

@@ -212,3 +212,3 @@ return { local_path, installed_path };

// Delete files
// we should do this in two steps, to avoid possible deletion of already linked files (when a folder gets )
// we should do this in two steps, to avoid possible deletion of already copied files (when a folder gets )
await Promise.all(all_dependencies_files.map(async ({ local_path, installed_path }) => {

@@ -218,3 +218,3 @@ return remove_file_or_directory(installed_path);

// Link files
// Copy files
await Promise.all(all_dependencies_files.map(async ({ local_path, installed_path }) => {

@@ -328,2 +328,2 @@ return copy_file_or_directory(local_path, installed_path);

watch_dependencies,
};
};
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