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
You can now specify a getTargetFile config param to modify the target file for saving the new file contents to. For example:
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
From version 6.0.0 onwards, replace in file requires Node 10 or higher. If you need support for Node 8, please use version 5.x.x.
5.0.0
From version 5.0.0 onwards, replace in file requires Node 8 or higher. If you need support for Node 6, please use version 4.x.x.
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:
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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
coverage: 100.0%. remained the same
when pulling 8c080675e21e805108ba1fb39bb79a71e0595c81 on dependabot/npm_and_yarn/dependencies-dev-4411801b75
into 07e82743c98604167e32ff84622948ab83cbc49f on master.
Bumps the dependencies-dev group with 6 updates in the / directory:
20.14.8
20.14.9
9.5.0
9.6.0
15.6.0
15.8.0
7.2.0
8.0.2
5.5.2
5.5.3
7.13.1
7.15.0
Updates
@types/node
from 20.14.8 to 20.14.9Commits
Updates
eslint
from 9.5.0 to 9.6.0Release notes
Sourced from eslint's releases.
Changelog
Sourced from eslint's changelog.
Commits
473d1bb
9.6.0f435566
Build: changelog update for 9.6.0b15ee30
chore: upgrade@eslint/js
@9
.6.0 (#18632)d655503
chore: package.json update for@eslint/js
release1613e2e
fix: Allow escaping characters in config patterns on Windows (#18628)13dbecd
docs: Limit search to just docs (#18627)7c78ad9
refactor: Use language.visitorKeys and check for non-JS SourceCode (#18625)e2b16e2
feat: Implement feature flags (#18516)69ff64e
refactor: Return value of applyInlineConfig() (#18623)375227f
docs: Update getting-started.md - add pnpm to init eslint config (#18599)Updates
globals
from 15.6.0 to 15.8.0Release notes
Sourced from globals's releases.
Commits
f6b3978
15.8.02ef342a
Addes2025
globals (Same ases2021
) (#256)a20894b
15.7.0f017b0f
Update (#255)Updates
replace-in-file
from 7.2.0 to 8.0.2Changelog
Sourced from replace-in-file's changelog.
... (truncated)
Commits
Updates
typescript
from 5.5.2 to 5.5.3Release notes
Sourced from typescript's releases.
Commits
f0e9921
Bump version to 5.5.3 and LKG738bd60
Cherry-pick #58966 to release-5.5 (#59002)Updates
typescript-eslint
from 7.13.1 to 7.15.0Release notes
Sourced from typescript-eslint's releases.
... (truncated)
Changelog
Sourced from typescript-eslint's changelog.
Commits
2865d31
chore(release): publish 7.15.02671de5
feat(eslint-plugin): back-port new rules around empty object types from v8 (#...a466e07
fix: disableEXPERIMENTAL_useProjectService
indisabled-type-checked
shar...b4fe94f
chore(release): publish 7.14.1dfc4469
chore(release): publish 7.14.0Dependabot 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 merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show