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

replace-in-file

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-in-file - npm Package Versions

1
9

4.1.0

Diff

adamreisnz
published 4.0.0 •

Changelog

Source

4.0.0

Breaking changes

The return value is now a results array instead of an array with changed files. The new results array includes each file that was processed, with a flag to indicate whether or not the file was changed, and optionally information about the number of matches and replacements that were made. See the readme for more details.

To update existing code and obtain an array of changed files again, simply convert the results array as follows:

const results = await replace(options);
const changedFiles = results
  .filter(result => result.hasChanged)
  .map(result => result.file);

New features

  • Added countMatches flag to count the number of matches and replacements per file #38, #42, #61
  • Added --quiet flag for CLI to suppress success output #63
  • Added cwd configuration parameter for network drive replacements #56
adamreisnz
published 3.4.4 •

adamreisnz
published 3.4.3 •

adamreisnz
published 3.4.2 •

adamreisnz
published 3.4.0 •

adamreisnz
published 3.3.0 •

adamreisnz
published 3.2.0 •

adamreisnz
published 3.1.1 •

adamreisnz
published 3.1.0 •

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