mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-04-19 03:13:51 +01:00
feat: add @generated to lockfiles
Adds the @generated marker to lockfiles to make them easily recognizable as auto-generated.
This commit is contained in:
parent
e6ee935c11
commit
292565b647
2 changed files with 9 additions and 2 deletions
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
- Binary linkers are now done in Rust to simplify their implementation and cross-runtime portability by @daimond113
|
- Binary linkers are now done in Rust to simplify their implementation and cross-runtime portability by @daimond113
|
||||||
- Show available targets in add and install commands if the specifier hasn't matched any by @daimond113
|
- Show available targets in add and install commands if the specifier hasn't matched any by @daimond113
|
||||||
|
- Add [@generated](https://generated.at/) marker to lockfiles by @daimond113
|
||||||
|
|
||||||
## [0.6.0] - 2025-02-22
|
## [0.6.0] - 2025-02-22
|
||||||
### Added
|
### Added
|
||||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -251,8 +251,14 @@ impl Project {
|
||||||
&self,
|
&self,
|
||||||
lockfile: &Lockfile,
|
lockfile: &Lockfile,
|
||||||
) -> Result<(), errors::LockfileWriteError> {
|
) -> Result<(), errors::LockfileWriteError> {
|
||||||
let string = toml::to_string(lockfile)?;
|
let lockfile = toml::to_string(lockfile)?;
|
||||||
fs::write(self.package_dir().join(LOCKFILE_FILE_NAME), string).await?;
|
let lockfile = format!(
|
||||||
|
r"# This file is automatically @generated by pesde.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
{lockfile}"
|
||||||
|
);
|
||||||
|
|
||||||
|
fs::write(self.package_dir().join(LOCKFILE_FILE_NAME), lockfile).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue