Alexey Sokolov
495cde635d
Support newer CMake in test too
2026-02-11 12:22:05 -06:00
Simon Gene Gottlieb
ebb85dd462
fix: floating point conversion on x86 (32bit)
2026-02-11 11:14:57 -06:00
Jeremy Nimmer
80ea0028c7
Fix DecodeBase64 to reject truncated input
...
If the input doesn't have the proper number of encoding characters
(a multiple of 4), return an empty result.
Co-Authored-By: Sean Curtis <sean.curtis@tri.global >
2026-02-10 13:49:45 -06:00
Kamil
2e6383d272
Update README.md
2026-02-07 21:23:53 -06:00
Jesse Beder
56e3bb550c
Update project version to 0.9.0
yaml-cpp-0.9.0
2026-02-04 14:26:25 -06:00
dependabot[bot]
f0329d0efd
build(deps): bump actions/checkout in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases )
- [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-02-01 10:53:39 -06:00
Henner Zeller
89ff142b99
Add IWYU export pragmas.
...
If a project is using the facade-header yaml-cpp/yaml.h it might
get `misc-include-cleaner` warnings from the `clangd` language server
and `clang-tidy` that this header is not providing directly the symbols used.
The annotation with IWYU pragmas fixes that and tells the tools that it should consider
all the includes as if they directly provided the symbol
Documentation clangd and clang-tidy
https://clang.llvm.org/extra/clang-tidy/checks/misc/include-cleaner.html points to
https://clangd.llvm.org/design/include-cleaner#iwyu-pragmas
This has been first implemented and docuemnted in the include-what-you-use project
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-begin_exportsend_exports
Signed-off-by: Henner Zeller <h.zeller@acm.org >
2026-01-01 10:15:23 -06:00
Alexander Hans
3738976bdc
fix(bazel): add missing load statements
...
Bazel 9 drops builtin `cc_*` rules, they need to be loaded explicitly now.
2026-01-01 10:14:47 -06:00
dependabot[bot]
5cf25533e3
build(deps): bump actions/checkout in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 5.0.1 to 6.0.1
- [Release notes](https://github.com/actions/checkout/releases )
- [Commits](https://github.com/actions/checkout/compare/v5.0.1...v6.0.1 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.1
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2026-01-01 10:14:17 -06:00
Simon Gene Gottlieb
c7aa78d294
fix: overflow buffer with large precision values
...
Issue #1385 demonstrates how a large 'precision' value can cause buffer
overflows. Originally, the buffer was designed to fit any scientific
notation. But the precision changes at which point large floating point
numbers are displayed in scientific notation or default notation.
In case of the default notation many extra zeros have to be printed,
this was not reflected in the output_buffer and an overflow could
occur.
This PR computes the number of zero that do not fit into the static
buffer and appends them at the end of the function triggering potential
a second dynamic allocation. (The first allocation is the std::string
allocation).
2025-12-28 17:33:09 -06:00
Simon Gene Gottlieb
a2826e8983
fix: unittests sets locale before testing
...
the convert_with_stringstream seems to be missing a
.imbue() call to set the locale independent of the global state.
Not setting this, can in some settings lead to errors, see Issue #1366 .
2025-12-28 17:32:43 -06:00
dependabot[bot]
bbf8bdb087
Bump actions/checkout from 5 to 6 in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases )
- [Commits](https://github.com/actions/checkout/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-12-01 12:20:21 -06:00
dependabot[bot]
a83cd31548
Bump actions/checkout from 4 to 5 in the github-actions group
...
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout ).
Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases )
- [Commits](https://github.com/actions/checkout/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '5'
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-01 16:57:22 -05:00
zhaoshihan
65c1c270db
Fix warning -Wconstexpr-not-const
2025-09-27 10:31:12 -05:00
Michael Müller
4fe2fb83fe
Use std::locale::classic() instead of creating new C locales on demand.
2025-09-17 15:21:50 -05:00
Onyad
aa8d4e4750
up
2025-09-04 14:42:16 -05:00
Christoph Grüninger
2f86d13775
Update googletest to 1.13
...
Fix issue with CMake 4.0
2025-04-29 16:53:58 -05:00
Christoph Grüninger
c9371de783
[cmake] Require minimum CMake version 3.5
...
Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.
2025-04-29 16:53:58 -05:00
Salim B
28f93bdec6
docs: Fix link in README
2025-03-13 14:45:33 -05:00
Patrick Diehl
39f737443b
Update README.md
...
Bump the release note to the latest version
2025-01-24 16:01:30 -06:00
Jeremy Nimmer
73ef0060aa
Avoid including <iostream> in library code
...
Including iostream means introducing the static (global) constructors
and destructors for std::cin, std::cerr, and std::cout. That extra
init and fini code is undesirable when those streams are not actually
used.
Instead, we'll use the narrower includes for exactly what's needed,
i.e., <istream> or <ostream>.
2024-12-30 11:27:02 -06:00
Daniel Levin
7470c2d871
emitter: Support std::string_view
...
Accept Emitter::operator<<(std::string_view).
ABI remains C++11 compatible by exposing new method
Emitter::Write(const char*, size_t).
All affected calls optimized to pass std::string values as pointer + size
tuple into appropriate routines.
2024-12-22 16:22:38 -06:00
Jesse Beder
8a9a7b74ef
Update CONTRIBUTING.md
...
Add some details about testing.
2024-12-22 16:16:07 -06:00
Jesse Beder
d45c4fba3e
Update README.md
2024-12-18 11:43:01 -06:00
Jesse Beder
61db89741d
Exclude ubuntu/C++ 11/googletest system from the test matrix since it doesn't compile.
2024-12-17 15:59:47 -06:00
Jesse Beder
7def2046ff
Fix bazel build, and commit module lock file.
...
Including:
- Remove WORKSPACE and upgrade to MODULE.bazel.
- The integration tests were not included since the directory was misspelled.
- Their header files were not accessible.
2024-12-17 14:49:17 -06:00
IMaloney
1da813f56a
ensuring local tags are retained after loading a node + test
2024-12-17 09:20:46 -06:00
Phil Miller
f878043f12
Don't install embedded copy of GTest
...
Goole Test itself documents the `INSTALL_GTEST` option as something that projects embedding it should set to `OFF`. Leaving it on means that projects downstream from libraries that embed it are likely to encounter conflicting copies. This is particularly annoying because GTest does not maintain anything like a stable API, and so causes builds to fail if include paths pick up an inappropriately installed copy ahead of the one that the code wanted.
Fixes #488
2024-12-17 09:12:49 -06:00
Simon Gene Gottlieb
9ce5a25188
fix: spell fix
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
ebfbf27115
patch: added more defensive programming techniques
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
06ffaf3104
remove reduntant license information
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
0b945415fd
fix: add missing include
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
82f3c04081
fix: add YAML_CPP_API for windows-shared library builds
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
d8de96524c
patch: move dragonbox.h from 'include' folder to 'src' folder
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
5d9e4b6251
patch: split fp_to_string.h into fptostring.h and fptostring.cpp
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
28c0a1bc25
doc: add a little more information to dragonbox file
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
72865f7d32
fix: remove trailing return types
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
f4bca79dc4
fix: fp_to_string uses now 2 spaces
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
d4e00bd473
fix: rename fp_to_string to FpToString to match coding style
2024-11-07 15:14:36 -06:00
Simon Gene Gottlieb
bd070a7b76
fix: prettier floating point numbers
...
Add dragonbox to compute the required precision to print floating point
numbers. This avoids uglification of floating point numbers that
happen by default via std::stringstream.
Numbers like 34.34 used to be converted to '34.340000000000003' as strings.
With this version they will be converted to the string '34.34'.
This fixes issue https://github.com/jbeder/yaml-cpp/issues/1289
2024-11-07 15:14:36 -06:00
Reini Urban
3d2888cc8a
missing keys should throw InvalidNode, not BadConversion
...
Fixes GH #1274
2024-11-01 10:25:39 -05:00
Federico Di Pierro
c2bec4c755
chore(test): moved infiniteloop test to load_node_test suite.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com >
2024-10-29 22:21:05 -05:00
Federico Di Pierro
29c59c01d4
new(test): added a test to avoid future issues with LoadAll().
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com >
2024-10-29 22:21:05 -05:00
Federico Di Pierro
bc67157109
fix(src): avoid possible infinite loop in LoadAll().
...
Leave at first empty root.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com >
2024-10-29 22:21:05 -05:00
Federico Di Pierro
da82fd982c
chore(test/integration): refactor some test cases to their own test.
...
Plus, check that the content is what we actually expect.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com >
2024-09-13 10:18:41 +02:00
Federico Di Pierro
1f2b841949
fix(src,include,test): fixed multiple cases where a bad yaml was accepted.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com >
2024-09-13 10:18:41 +02:00
Orgad Shaneh
47cd2725d6
Remove build debug messages
...
They were commented out before 0733aeb45 , but when that commit
was reverted in 2b65c65e1 they were recovered uncommented.
2024-08-27 12:23:42 -05:00
Orgad Shaneh
850ec4f39e
Fix reference types in iterators
...
Amends 26faac387c .
2024-08-27 11:12:58 -05:00
Simon Gene Gottlieb
84459a7f98
fix: missing token enum name
2024-08-22 07:55:33 -05:00
Simon Gene Gottlieb
ee9c4d19be
fix: parse files with '\r' symbols as line ending correctly
2024-08-22 07:53:52 -05:00