forked from pnpm/pnpm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pkg-manifest): preserve comments in YAML manifests
Following on from pnpm#2008 (comment) … Closes pnpm#2008.
- Loading branch information
1 parent
2a20328
commit de1b781
Showing
6 changed files
with
77 additions
and
12 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
pkg-manifest/read-project-manifest/fixtures/commented-package-yaml/modified.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is an example of a package.yaml file with comments. | ||
|
||
# pnpm should keep comments at the same indentation level | ||
name: 'foo' | ||
version: '1.0.0' # it should keep in-line comments on the same line | ||
# It should allow in-line comments with no other content | ||
type: 'commonjs' | ||
|
||
# And it should preserve comments at the end of the file. Note no newline. |
9 changes: 9 additions & 0 deletions
9
pkg-manifest/read-project-manifest/fixtures/commented-package-yaml/package.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is an example of a package.yaml file with comments. | ||
|
||
# pnpm should keep comments at the same indentation level | ||
name: 'foo' | ||
version: '1.0.0' # it should keep in-line comments on the same line | ||
# It should allow in-line comments with no other content | ||
type: 'module' | ||
|
||
# And it should preserve comments at the end of the file. Note no newline. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters