Skip to content

Update dependency replace-in-file to v9 - #141

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/replace-in-file-9.x
Open

Update dependency replace-in-file to v9#141
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/replace-in-file-9.x

Conversation

@renovate

@renovate renovate Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
replace-in-file 6.3.59.0.0 age confidence

Release Notes

adamreisnz/replace-in-file (replace-in-file)

v9.0.0

Compare Source

The package now requires Node 22.12.0 or higher, as Node 18 and Node 20 have reached end of life. If you need support for older versions of Node, please use version 8.x.x.

Breaking changes
  • Node 22.12.0 or higher is now required (dependencies yargs@18 and chalk@6 require it)
  • Strings passed to from are now only converted to a regular expression if they both start and end with a slash (e.g. "/cat/g"), as documented. Previously, plain strings that merely ended in a slash and optional flag characters (e.g. "assets/img" or "foo/") were silently converted to regular expressions as well.
New features
  • Added a streaming option for processing large files with bounded memory usage. Files are streamed through Node streams instead of being read into memory in full, with matches found across chunk boundaries. This also enables processing of files larger than the maximum string size supported by Node.js (about 500MB), which previously failed outright. Regex matches are guaranteed up to a configurable maxMatchLength window (default 1024 characters); plain string values are always matched exactly. Streaming is available for asynchronous replacement via the API (streaming: true) and in the CLI via --streaming. See the README for details and constraints.
Other changes
  • The codebase has been converted to TypeScript. Type definitions are now generated from the source code instead of being maintained by hand, fixing several inaccuracies in the previous type definitions:
    • The types incorrectly declared a default export and a replaceInFile.replaceInFileSync namespace API, both of which were removed from the runtime in 8.0.0
    • processFile and processFileSync were missing from the types
    • The cwd, verbose, quiet, fs and fsSync options were missing from the config type
  • The package now ships compiled output from the dist folder, and an exports map has been added. Deep imports into package internals (e.g. replace-in-file/src/...) are no longer possible
  • Upgraded all dependencies, including chalk to 6.x
  • The repository now uses pnpm as its package manager

v8.4.0

Compare Source

v8.3.1

Compare Source

v8.3.0

Compare Source

v8.2.0

Compare Source

v8.1.0

Compare Source

v8.0.3

Compare Source

v8.0.2

Compare Source

v8.0.1

Compare Source

v8.0.0

Compare Source

The package has been converted to an ES module and now requires Node 18 or higher. If you need support for Node 16 or below, please use version 7.x.x.

Breaking changes
  • Package has been converted to an ES module
  • No longer providing a default export. Use the named exports replaceInFile or replaceInFileSync instead.
  • The replace.sync syntax is no longer available. Use the named export replaceInFileSync instead.
  • The callback API has been removed for asynchronous replacements. Please use promises or async/await instead.
  • Configuration files provided to the CLI using the --configFile flag can now only be JSON.
  • To use a custom fs implementation, you must now specify fs config parameter for the async API, and fsSync for the sync API. For the asynchronous APIs, the provided fs must provide the readFile and writeFile methods. For the synchronous APIs, the provided fsSync must provide the readFileSync and writeFileSync methods.
  • If a cwd parameter is provided, it will no longer be prefixed to each path using basic string concatenation, but rather uses path.join() to ensure correct path concatenation.
New features
  • The isRegex flag is no longer required.
  • You can now specify a getTargetFile config param to modify the target file for saving the new file contents to. For example:
const options = {
  files: 'path/to/files/*.html',
  getTargetFile: source => `new/path/${source}`,
  from: 'foo',
  to: 'bar',
}

v7.2.0

Compare Source

v7.1.0

Compare Source

v7.0.2

Compare Source

v7.0.1

Compare Source

v7.0.0

Compare Source

Strings provided to the from value are now escaped for regex matching when counting of matches is enabled. This is unlikely to result in any breaking changes, but as a precaution the major version has been bumped.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/replace-in-file-9.x branch from 3b693b0 to 2782e44 Compare September 2, 2026 22:35
@renovate
renovate Bot force-pushed the renovate/replace-in-file-9.x branch from 2782e44 to ab71c5c Compare September 4, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants