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

rapid-replace

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapid-replace - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

19

lib/rapid-replace.js

@@ -77,7 +77,8 @@

function processFiles(projectRoot, files){
function processFiles(projectRoot, npmProject, files){
console.log('处理文件:', files);
files.forEach((file, idx) => {
if(file.new && file.origin){
replaceFile(path.join(projectRoot, path.sep, file.origin), path.join(projectRoot, path.sep, file.new));
replaceFile(path.join(projectRoot, path.sep, file.origin),
path.join(npmProject, path.sep, file.new));
}

@@ -87,4 +88,4 @@ });

function projectDir(projectRoot, dir){
const dirPath = path.join(projectDir, path.sep, dir);
function projectDir(projectRoot, npmProject, dir){
const dirPath = path.join(projectRoot, path.sep, dir);

@@ -94,4 +95,6 @@ if(fs.existsSync(dirPath)){

fileList.forEach((relFile) => {
const originFile = path.join(projectRoot, path.sep, newFile);
const newFile = path.join(dirPath, path.sep, relFile);
const newFile = path.join(projectRoot, path.sep, dir, path.sep, relFile);
const originFile = path.join(npmProject, path.sep, dir, path.sep, relFile);
replaceFile(originFile, newFile);

@@ -127,5 +130,5 @@ });

if(project.type === 'file' && project.files){
processFiles(projectDir, project.files);
processFiles(rootPath, projectDir, project.files);
}else if(project.type === 'dir' && project.dir){
projectDir(projectDir, project.dir);
projectDir(rootPath, projectDir, project.dir);
}

@@ -132,0 +135,0 @@ });

{
"name": "rapid-replace",
"version": "0.0.21",
"version": "0.0.22",
"description": "repid replace node modules file",

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

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