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.1.0 to 0.1.1

10

lib/rapid-replace.js

@@ -58,3 +58,3 @@

function replaceFile(originFile, newFile){
function replaceFile(originFile, newFile, mode){
// replace

@@ -68,3 +68,3 @@ try{

// 复制新文件
fs.createReadStream(newFile).pipe(fs.createWriteStream(originFile));
fs.createReadStream(newFile, { mode: mode && 0o666, }).pipe(fs.createWriteStream(originFile));
// fs.rename(newFile, originFile);

@@ -82,5 +82,5 @@ console.log('文件替换完成:',newFile, originFile);

files.forEach((file, idx) => {
if(file.new && file.origin){
replaceFile(path.join(npmProject, path.sep, file.origin),
path.join(projectRoot, path.sep, file.new));
if(file.new && file.origin) {
const newFile = path.join(projectRoot, path.sep, file.new);
replaceFile(path.join(npmProject, path.sep, file.origin), newFile, file.permission);
}

@@ -87,0 +87,0 @@ });

{
"name": "rapid-replace",
"version": "0.1.0",
"version": "0.1.1",
"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