Skip to content

Bump replace-in-file from 8.4.0 to 9.0.0 - #597

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/replace-in-file-9.0.0
Open

Bump replace-in-file from 8.4.0 to 9.0.0#597
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/replace-in-file-9.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 7, 2026

Copy link
Copy Markdown
Contributor

Bumps replace-in-file from 8.4.0 to 9.0.0.

Changelog

Sourced from replace-in-file's changelog.

9.0.0

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

8.0.0

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',
}

7.0.0

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.

6.0.0

... (truncated)

Commits
  • 021d36c Add streaming mode for replacing in large files (#228)
  • 77bcbe4 fix: override vulnerable mocha transitive dependencies (#227)
  • ac10637 Convert codebase to TypeScript (#224)
  • 1f1ff63 Add LICENSE file (#226)
  • 9af8cf2 v9.0.0, CI workflow, and trusted publishing (re-targeted to main) (#223)
  • 0892c65 Switch package manager from Yarn to pnpm (#218)
  • e1da8d6 fix: only convert slash-wrapped strings to regex in stringToRegex (#217)
  • f299546 Upgrade all dependencies (#216)
  • See full diff in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for replace-in-file since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [replace-in-file](https://github.com/adamreisnz/replace-in-file) from 8.4.0 to 9.0.0.
- [Release notes](https://github.com/adamreisnz/replace-in-file/releases)
- [Changelog](https://github.com/adamreisnz/replace-in-file/blob/main/CHANGELOG.md)
- [Commits](adamreisnz/replace-in-file@v8.4.0...v9.0.0)

---
updated-dependencies:
- dependency-name: replace-in-file
  dependency-version: 9.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 7, 2026
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dc22548

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants