instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
valhalla__valhalla__5762 | valhalla/valhalla | 5,762 | defect | 1f7e906c5399e16c0e8ce10968822c3140874b2f | 029595c79bb83c87f8d2719994f9243fef3f0e2e | feat(tile): add cache for MVT | fixes #5761
Adds 2 new configuration variables and renames one:
- **renamed**: `loki.service_defaults.min_zoom_road_class` -> `loki.service_defaults.mvt_min_zoom_road_class`
- **new**:
- `loki.service_defaults.mvt_cache_dir`: the server-side cache directory root, e.g. `data/mvt_cache`
- `loki.service_defaul... | diff --git a/docs/docs/api/tile/api-reference.md b/docs/docs/api/tile/api-reference.md
index 04c70ce291..b95fa5a565 100644
--- a/docs/docs/api/tile/api-reference.md
+++ b/docs/docs/api/tile/api-reference.md
@@ -12,7 +12,7 @@ We support the usual GET & POST with the common "Slippy Map"/XYZ request pattern
| Option | ... | 3 | 2 | 1 | [{"id": "G0", "claim": "The getpid()-suffixed tmp path and rename idiom can still interleave across multiple loki processes, so the cache write should be made multi-process safe (e.g. via a random unique temp name instead of relying on a per-process suffix and a lock).", "category": "correctness", "verdict": "supported... | null |
valhalla__valhalla__5768 | valhalla/valhalla | 5,768 | defect | d7067cd7950b32141998700e3ff5f60af5c440da | eaff77ef5a2a755f0a535605b32c856612c36de6 | fix: Access handling for unknown OSM Way types like `"disused:route=ferry"` | _Please don't force-push once you received the first review._
# Issue
Sadly, https://github.com/valhalla/valhalla/pull/5476 dramatically changed access handling for all OSM Ways that have unknown combinations of tags. For example, it's quite common that discontinued ferries are just marked as `"disused:route=ferr... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff113e2bec..5f44dd771a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
* FIXED: Fix + prefix handling in to_int/to_float utilities [#5746](https://github.com/valhalla/valhalla/pull/5746)
* FIXED: Use a unique target name for generating symlinks. Fixes ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The added `kv[\"railway\"] == \"rail\"` disjunct makes regular rail ways \"enable all by default\", which is right for shuttle_train but not right for regular trains.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
valhalla__valhalla__5803 | valhalla/valhalla | 5,803 | defect | 2508efc68042f2d33e995ffb5051912f35c50457 | 95982a4c1d3af4d3f4a7aad28018cd86b8d9be52 | add matched points to PBF `trace_attributes` response | Fixes #4708.
Adds matched points to `TripRoute`. Not sure if this is the best place, but it's where we currently return trace attributes information in the `Api` message.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index e02d94a7e8..7fb126c041 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -76,6 +76,7 @@
* ADDED: support for server-side MVT caching [#5762](https://github.com/valhalla/valhalla/pull/5762)
* ADDED: NodeJS bindings support PBF outputs [#5794](https://github.com/valhal... | 2 | 2 | 0 | [{"id": "G0", "claim": "The `pbf_api` test should probably be updated to cover the new matched-points properties.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment that matched_points is only presented in the /trace_attributes output above th... | null |
valhalla__valhalla__5809 | valhalla/valhalla | 5,809 | defect | 111091c003313b8b92ad4d3ae5ea39837eb85036 | 25728a2ef0dd66c9ff312812e627e0852529f95a | feat(tile): add zoom-specific generalization of /tile line geometries | based on #5818
adds generalization to reduce the edges layer size. the default per zoom level is chatgpt generated, I really didn't feel the need to dive into it much..
also I added support for the `generalize` parameter (so far only isochrones). however, for `/tile` I'd rather use it as a float value from 0 - 1... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6da3ba9e9f..c7f0d4a4b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@
* ADDED: support for server-side MVT caching [#5762](https://github.com/valhalla/valhalla/pull/5762)
* ADDED: NodeJS bindings support PBF outputs [#5794](https://github.com/valhal... | 2 | 2 | 2 | [{"id": "G0", "claim": "The hardcoded PeuckerEpsilons tolerances are not derived from the actual tile resolution (they appear to assume a 256 px extent rather than the 4096 MVT units actually served), so they should be checked/derived from meters-per-pixel at the real extent, with the generalize value scaling that tole... | null |
valhalla__valhalla__5818 | valhalla/valhalla | 5,818 | defect | c97b07687ee0d2e6cba5f9481ff370c30b710717 | c05eb2d5288dec965d855951c25ef158bc079609 | chore: cleanup boost geometry usage | this PR unifies boost::geometry types in a new header where we define all necessary types, instead of having bg definitions all over the place. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5edad72589..a0497ef6df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,7 @@
* ADDED: support for server-side MVT caching [#5762](https://github.com/valhalla/valhalla/pull/5762)
* ADDED: NodeJS bindings support PBF outputs [#5794](https://github.com/valhal... | 2 | 2 | 0 | [{"id": "G0", "claim": "The type aliases in PBFToRing (src/loki/polygon_search.cc) should be prefixed with `bg::` for consistency with the other files changed by this PR.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The CHANGELOG entry should ... | null |
valhalla__valhalla__5843 | valhalla/valhalla | 5,843 | defect | 9b278843088b695d11a289f6ab8c71a71c7e3308 | 043208c28cf28aab1d78f9936c0db91b8608debe | fix(mvt): clipping bug | with #5809 I committed a bug to master where I'd clip a mercator unit linestring with a MVT unit bbox, which led to edge parts being dropped when they crossed a MVT border. I found this when working on https://github.com/valhalla/valhalla/pull/5806#issuecomment-3808165025, first thought it was a bug in that PR, but sad... | diff --git a/src/loki/tile_action.cc b/src/loki/tile_action.cc
index dbf0f7328f..7313da9d1c 100644
--- a/src/loki/tile_action.cc
+++ b/src/loki/tile_action.cc
@@ -15,8 +15,13 @@
#include <boost/geometry/algorithms/append.hpp>
#include <boost/geometry/algorithms/equals.hpp>
#include <boost/geometry/algorithms/interse... | 2 | 1 | 0 | [{"id": "G0", "claim": "The old code intersected an edge line given in mercator units with an MVT-unit clip box, so parts of edges crossing tile boundaries were dropped (master fails the updated test with only one edge feature).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "pre_existi... | null |
valhalla__valhalla__5847 | valhalla/valhalla | 5,847 | defect | 9b278843088b695d11a289f6ab8c71a71c7e3308 | eab606e09e6bb02486f11683e7ec2c63d844f3e8 | Fix uk admins | Fixes https://github.com/valhalla/valhalla/issues/5841
The UK-admin specific overrides have been removed. This allows `country_code` to be correctly populated in the admin section of responses - see the issue for more details. Northern Ireland **theoretically** had slightly different pedestrian routing access rules ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fda7af47a4..18e6abfa93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,10 @@
## UNRELEASED
* **Removed**
* **Bug Fix**
- * FIXED: access for backward edges in MVT contains data from the correct edge [#5834](https://github.com/valhalla/valhalla/pull/5834)
+ ... | 2 | 2 | 0 | [{"id": "G0", "claim": "It would make sense to also add entries for the new OSM naming of Northern Ireland to kSupportedLanguages, possibly keeping the old-naming entries in case anybody builds with old admin data.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "... | null |
valhalla__valhalla__5871 | valhalla/valhalla | 5,871 | defect | 340b0122f78b2b43d3859a00cf571f87f88e21bc | 8141f1288e5d9088dba719aaa0f90f2bf8f51dda | don't throw a 442 on an empty matrix result | Fixes #5870
Will return all `null`s instead:
<details><summary>plain</summary>
```json
{
"sources_to_targets": {
"durations": [
[
null
]
],
"distances": [
[
null
]
]
},
"units": "kilometers",
"algorithm": "costmatrix"
}
```
</details>
<details><summary>... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c6735a508..1154168f17 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@
* CHANGED: Added `mjolnir.data_quality_dir` as optional config to control the directory for e.g. duplicateways.txt
* CHANGED: extended `valhalla_build_config` script to optionally... | 1 | 1 | 0 | [{"id": "G0", "claim": "The diagnostic message in check_matrix_empty calling v.GetObject()[metric].GetFloat() on a null value might itself error, and it should print the value's type instead.", "category": "correctness", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
valhalla__valhalla__5903 | valhalla/valhalla | 5,903 | defect | f0c26f598a7364dcc0e45d2f926198ae55bf930c | 5a195316bcee6a69482a8bc29b1fd8100acdc4cf | use mode_costing_t on loki worker instead of cost_ptr | Addendum to #5780
When implementing the double call to `Search::search` in case of `auto_pedestrian` costing, I forgot to actually pass the pedestrian costing with the end location and just passed auto costing :smile:
Addressed by storing `mode_costing_t` on `loki_worker_t` (which is an array of `cost_ptr_t` p... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fcd26c6088..431f41d639 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
* REMOVED: Removed ability to set ISO:3166 country/state code per OSM Node [#5747](https://github.com/valhalla/valhalla/pull/5747)
* **Bug Fix**
* FIXED: Clamp grades on bridges an... | 2 | 1 | 0 | [{"id": "G0", "claim": "kevinkreiser asks whether locate should also block multi-location routes for bikesharing, as he recalls is already done for multimodal and the other costings, the way the new two-location limit handles auto_pedestrian.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "int... | null |
valhalla__valhalla__5908 | valhalla/valhalla | 5,908 | defect | 8298522760df4d00e2d848fbe0f8fb30fda16533 | 9ccb76bc5a91ddb4d9e1456d3f630dced20d612c | fix: Point at `begin_shape_index` should be on the edge even if trace has discontinuities | _Please don't force-push once you received the first review._
# Issue
Fixes https://github.com/valhalla/valhalla/issues/5883
## Tasklist
- [x] Add tests
- [x] Add #fixes with the issue number that this PR addresses
- [ ] Update the docs with any new request parameters or changes to behavior described
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1cb5d155b7..d036ef3157 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
* **Bug Fix**
* FIXED: Clamp grades on bridges and tunnels. [#5728](https://github.com/valhalla/valhalla/pull/5728)
* FIXED: use pedestrian costing on end location in `auto_pedestr... | 2 | 2 | 2 | [{"id": "G0", "claim": "The disconnect check performs a needless opposing-edge graph lookup for every edge in all regular routing use cases, and the reviewer wants a way to skip it when discontinuities are impossible (e.g. using the algorithms that generated the path).", "category": "performance", "verdict": "supported... | null |
valhalla__valhalla__5912 | valhalla/valhalla | 5,912 | defect | 95fb6ddd6e12823ad505283416b7e6bfa4565a63 | c53192b74ecaef9783b1f1ab02f56d7b182d6504 | add access restrictions layer to mvt | This is not quite done, I just wanted to get a first draft out and get someone else's opinion on this: this adds access restrictions to the vector tiles as its own layer rather than attributes of the edges; I think the latter might be possible as well but it seems like it won't work well in some edge cases where an edg... | diff --git a/src/baldr/graphtile.cc b/src/baldr/graphtile.cc
index 41f5050df9..9250fb8461 100644
--- a/src/baldr/graphtile.cc
+++ b/src/baldr/graphtile.cc
@@ -1216,7 +1216,8 @@ const TransitSchedule* GraphTile::GetTransitSchedule(const uint32_t idx) const {
}
// Get the access restriction given its directed edge in... | 5 | 1 | 0 | [{"id": "G0", "claim": "The comment \"Pre-add keys for node properties\" in the access restriction layer builder should read \"Pre-add property keys\", since this is the access restriction layer, not nodes.", "category": "documentation", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "cl... | null |
valhalla__valhalla__5980 | valhalla/valhalla | 5,980 | defect | b0179c6d769161e1e8c5c6cc7b0316be45bbef60 | 59c26622b1160a9ce41cb54c83708594ab254524 | Add support for `junction=intersection` | Closes #5004
## Issue
I have added support for the OSM tag 'junction=intersection', this tag was "recently" created and even though there are only about ~5,5K ways with it, they are only a few but in [taginfo](https://taginfo.openstreetmap.org/tags/junction=intersection) we can check the use is slowly increasing ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9419566db..de95a8efb0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@
* ADDED: incidents to locate JSON response [#5968](https://github.com/valhalla/valhalla/pull/5968)
* ADDED: `--region` to `valhalla_build_extract` to create tars by Geofabrik regi... | 3 | 2 | 0 | [{"id": "G0", "claim": "Asks to confirm how the new `junction=intersection` tag interacts with the existing synthetic `internal_intersection` tag when `infer_internal_intersections = false` — whether both tags can set the internal flag, or the config then makes the new real OSM tag be ignored.", "category": "design", "... | null |
valhalla__valhalla__5993 | valhalla/valhalla | 5,993 | defect | 321f2f766ff697842bb5c667357385aa8ec5a86b | ccc8a9be9af08936688dc228b5050cde97b06d75 | feat: Make `lz4` system dependency optional | _Please don't force-push once you received the first review._
# Issue
While I was toying with running Valhalla on mobile phone I faced the necessity to bake LZ4 for functionality I would never ever use on the phone (because elevation tiles are huge).
This PR makes LZ4 dependency optional in the same way how it's... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index dee11d237f..9cdd7ad888 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@
* ADDED: support for OSM tag 'junction=intersection' to explicitly mark internal intersection edges [#5980](https://github.com/valhalla/valhalla/pull/5980)
* ADDED: `filtered_edge... | 1 | 1 | 0 | [{"id": "G0", "claim": "The vcpkg feature name `lz4` should be expressed more in terms of functionality, e.g. `elevation`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validator__grunt-html__126 | validator/grunt-html | 126 | defect | ef16d3b421b0a1dcc9a5e5762ef0ba336e117768 | 3d83fb64cfcdc6fd3d276ebd3bedeb5212ebb33f | ES6-ify code base and switch style. | I know this is opinionated but those extra spaces were so annoying to me. :/
Anyway, feel free to tweak the rules; I went with what the config I'm using myself.
**Requires #125 merged!**
See the non-whitespace diff https://github.com/jzaefferer/grunt-html/pull/126/files?utf8=%E2%9C%93&diff=unified&w=1
TODO:... | diff --git a/.eslintrc.json b/.eslintrc.json
index 30fe803..4e1d3c7 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,15 +1,268 @@
{
"root": true,
"env": {
- "node": true
+ "node": true,
+ "es6": true
},
- "extends": ["eslint:recommended", "jquery"],
+ "parserOptions": {
+ "sourceType": "mo... | 2 | 1 | 0 | [{"id": "G0", "claim": "It probably makes sense to leave the '// command to call java...' comment stuck to the return line it describes instead of separating the two with a blank line.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Bundling the style chan... | null |
validator__grunt-html__174 | validator/grunt-html | 174 | defect | afbd77ee205aa15ebaf6aaf927554721efbda228 | 7413da67ba1f1c5c51195116405a35c67365f9d1 | Add server tests | Added tests for `config.server`
Fixes #135
| diff --git a/package-lock.json b/package-lock.json
index 809dde2..1923cd5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -18,6 +18,7 @@
"c8": "^7.11.0",
"grunt": "^1.4.1",
"mocha": "^9.2.0",
+ "start-server-and-test": "^1.14.0",
"strip-ansi": "^6.0.1",
"xo"... | 2 | 1 | 1 | [{"id": "G0", "claim": "Question why the PR adds a separate server block of expected results instead of reusing the same tests (\"Any reason we can't use the same tests?\").", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The server tests cannot be... | null |
validator__grunt-html__58 | validator/grunt-html | 58 | defect | aabbbc9b645549b598cbf4495ed8781b6e34118a | ff0cddf039d51308919f35633facb16f8ba457e2 | Lint tweaks | https://github.com/jzaefferer/grunt-html/compare/jzaefferer:master...XhmikosR:lint?w=1
| diff --git a/.jshintrc b/.jshintrc
index dda6844..90d0247 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,13 +1,14 @@
{
- "boss": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "node": true,
- "strict": true,
- "sub": true,
- "undef": true
-}
\ No newline... | 4 | 1 | 0 | [{"id": "G0", "claim": "In encode() the typeof check should wrap the for loop rather than test s on every iteration.", "category": "performance", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Keeping the default grunt task instead of adding a 'test' alias is questioned as addi... | null |
validatorjs__validator.js__1072 | validatorjs/validator.js | 1,072 | defect | 54bf8c4418ec33a64994538c3e9aec7dabe56dd5 | 960cd63aa938b6f354dab78107559c6cb9994589 | feat(isLocale): validate isLocale | - It validates different languages for different geographical location
- Closes #954 | diff --git a/README.md b/README.md
index b46327dde1..b25e3b1a99 100644
--- a/README.md
+++ b/README.md
@@ -117,6 +117,7 @@ Validator | Description
**isJWT(str)** | check if the string is valid JWT token.
**isLatLong(str)** | check if the strin... | 4 | 2 | 1 | [{"id": "G0", "claim": "The PR should include a reference link to the source of the locale data it was built from.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The locale validation should perhaps also consider the general ISO guideline for loca... | null |
validatorjs__validator.js__1074 | validatorjs/validator.js | 1,074 | defect | 54bf8c4418ec33a64994538c3e9aec7dabe56dd5 | 6a1d78d87318018571b8832db5b001e7059d00cd | fix(isLatLong): fix bug on isLatLang | - when lat starts with (, it makes it a true latitude.
- Closes #929 | diff --git a/lib/isLatLong.js b/lib/isLatLong.js
index 88da0c25f..474327e4d 100644
--- a/lib/isLatLong.js
+++ b/lib/isLatLong.js
@@ -16,6 +16,7 @@ function _default(str) {
(0, _assertString.default)(str);
if (!str.includes(',')) return false;
var pair = str.split(',');
+ if (pair[0].charAt(0) === '(' && pair[... | 2 | 1 | 0 | [{"id": "G0", "claim": "The new parenthesis-mismatch check will throw a TypeError ('Cannot read property charAt of undefined') when str is an empty string, because str.split(',') then yields a single-element array and pair[1] is undefined.", "category": "correctness", "verdict": "opposed", "priority": "P0", "scope": "i... | null |
validatorjs__validator.js__1167 | validatorjs/validator.js | 1,167 | defect | 2a80a4fc05ebf3aee30f081e6066149ee194cdef | 9ab98a397f6d95c8f2ed80be8fd17dab7024c760 | Updated mobile phone number validator and test | Added verification for bosnian mobile phone numbers | diff --git a/README.md b/README.md
index b3dd81ddd..b880e3850 100644
--- a/README.md
+++ b/README.md
@@ -122,7 +122,7 @@ Validator | Description
**isMagnetURI(str)** | check if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme).
**is... | 2 | 1 | 1 | [{"id": "G0", "claim": "The newly added bs-BA regex could be simplified to match the style of the surrounding locale patterns (the author notes a simplification would leave out some valid national forms).", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "clai... | null |
validatorjs__validator.js__1227 | validatorjs/validator.js | 1,227 | defect | ea39867fda595e15d49226f9ff66189d05e1645f | 5abe3324c246836951c9880cc257815a00597629 | fix(toFloat): verify the string can be safely converted to a float | Verify the string can be safely converted to a float. This is needed because `parseFloat('2020-01-06T14:31:00.135Z')` will return `2020`, even though it should return `NaN`. This fixes an issue checking `isDivisibleBy('2020-01-06T14:31:00.135Z', 2)`.
Resolves #1226 | diff --git a/es/lib/alpha.js b/es/lib/alpha.js
index 4fa84c1c35..f7e364b846 100644
--- a/es/lib/alpha.js
+++ b/es/lib/alpha.js
@@ -13,7 +13,7 @@ export var alpha = {
'nn-NO': /^[A-ZÆØÅ]+$/i,
'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
- 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,
+ 'pt-PT': /^[A-ZÃÁ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The pull request's diff contains unrelated changes in other files (autogenerated build files and unrelated library updates) and they should be unstaged/removed before merge.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1238 | validatorjs/validator.js | 1,238 | defect | 04b8b0a530aeb8051b7ee829e8539005e419b1ec | fc2e909148f7f029155dd91f533899dcddbd9a9d | Update greek alphabet | This PR refers to #1237
Old regex: `/^[Α-ω]+$/i`
New regex: `/^[Α-ώ]+$/i`
This expanded range now also includes `άέήίΰ` (char codes 940 through 944) and `ϊϋόύώ` (codes 970 through 974)
Resource:
https://stackoverflow.com/questions/23327302/javascript-regex-to-remove-special-characters-but-also-keep-greek-... | diff --git a/es/lib/alpha.js b/es/lib/alpha.js
index f7e364b84..38d385b7c 100644
--- a/es/lib/alpha.js
+++ b/es/lib/alpha.js
@@ -4,7 +4,7 @@ export var alpha = {
'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
'da-DK': /^[A-ZÆØÅ]+$/i,
'de-DE': /^[A-ZÄÖÜß]+$/i,
- 'el-GR': /^[Α-ω]+$/i,
+ 'el-GR': /^[Α-ώ]+$/i,
'es-ES':... | 1 | 1 | 0 | [{"id": "G0", "claim": "For the tests, add more tests other than overwriting the previous ones (the PR rewrote the existing el-GR isAlpha test strings instead of adding new cases).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1243 | validatorjs/validator.js | 1,243 | defect | 1c9efc5a2aed486b102680ebd5ac7250ba7fca07 | 3056c13c907b5f5903b9d11cfd0a7420b919eb1c | feat: implement isIBAN(str) validator | - This PR aims to introduce an implementation to `isIBAN(str)` to validate IBAN (International Bank Account Number) strings.
- Solves part of issue #951
- _Wikipedia_ Reference: [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) | diff --git a/README.md b/README.md
index 9d38a7a60..550d8a375 100644
--- a/README.md
+++ b/README.md
@@ -89,6 +89,7 @@ Validator | Description
**isBase32(str)** | check if a string is base32 encoded.
**isBase64(str)** | check if a string is bas... | 2 | 1 | 0 | [{"id": "G0", "claim": "Re-arrange the country codes in the IBAN regex map in alphabetical order to make the file easier to read and extend by later contributions.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use ES6 syntax such as arrow funct... | null |
validatorjs__validator.js__1246 | validatorjs/validator.js | 1,246 | defect | c77067854c8150aa29afa89e0e1908073e07c202 | c11f7d15f77cc0e927f61a6ffa20a45d4e4163e8 | feat: Add Semantic Versioning Specification (SemVer) Validator | - Add `isSemVer(str)` validator to check for **Semantic Versioning Specification (SemVer)**
- Added tests to cover valid/invalid SemVer strings.
- Reference: [Semantic Versioning 2.0.0
](https://semver.org/)
| diff --git a/README.md b/README.md
index 490d4a245..b6ccdf579 100644
--- a/README.md
+++ b/README.md
@@ -139,6 +139,7 @@ Validator | Description
**isOctal(str)** | check if the string is a valid octal number.
**isPort(str)** | check if the s... | 1 | 1 | 0 | [{"id": "G0", "claim": "The buildMultiLineRegexp helper should be moved to a utilities file (e.g. /src/lib/util/multilineRegex.js) so it can be re-used later.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1270 | validatorjs/validator.js | 1,270 | defect | 4db2711c416b4ddbe47439a78694fcaad82a4cbb | 656cc9745e6f1f19e2ff145bcb3b7a6100028fdf | feat: add new isDate() validator | Resolves #1130 | diff --git a/README.md b/README.md
index 4c456ad7b..a64cd5ba7 100644
--- a/README.md
+++ b/README.md
@@ -173,6 +173,7 @@ Sanitizer | Description
**trim(input [, chars])** | trim characters (whitespace by default) from both sides of the input.
**whitelist(input, chars)** ... | 5 | 4 | 1 | [{"id": "G0", "claim": "Remove the unrelated build-artifact changes to es/lib/isEmail.js from the PR diff since they are unrelated to the PR.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Invalid calendar dates such as 2020-02-30, 2019-02-29 an... | null |
validatorjs__validator.js__1286 | validatorjs/validator.js | 1,286 | defect | 4e0fc27427ef8cda7d18f6e2c1c6b28baa6bb594 | 5ff49982c754da31219a405c2d35eef7c2502950 | isAlpha enhancement | resolve #1282 | diff --git a/es/lib/isAlpha.js b/es/lib/isAlpha.js
index 2b30d1463..7a6857e93 100644
--- a/es/lib/isAlpha.js
+++ b/es/lib/isAlpha.js
@@ -2,7 +2,19 @@ import assertString from './util/assertString';
import { alpha } from './alpha';
export default function isAlpha(str) {
var locale = arguments.length > 1 && argument... | 6 | 4 | 1 | [{"id": "G0", "claim": "The README should be updated to document the new isAlpha options parameter (the `ignore` key) that the pull request adds.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Building the character class from a user-supplied `ign... | null |
validatorjs__validator.js__1356 | validatorjs/validator.js | 1,356 | defect | b7ffd5db054f6dee229f7e1ac317c3fd200df9fb | ff4007e81b6e2115627096719c8878903607878e | HOTFIX - Fixed the bug on BA mobile phone regex | Updated the regular expression for bosnian mobile numbers by removing lookbehinds and modifying the expression to keep the right checks for these mobile numbers | diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js
index ec2a38706d..037d250b5d 100644
--- a/src/lib/isMobilePhone.js
+++ b/src/lib/isMobilePhone.js
@@ -14,6 +14,7 @@ const phones = {
'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/,
'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/,
'ar-TN': /^(\+?216)?[2459]\d{7}$/,
+ 'bs... | 1 | 1 | 1 | [{"id": "G0", "claim": "Bring back the rest of the work that was removed in #1355 (the README documentation and tests accompanying the bs-BA locale), i.e. the pull request should contain more than the single regex line.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
validatorjs__validator.js__1455 | validatorjs/validator.js | 1,455 | defect | 7916dfd093f2cc0ccb44679893b3e999e96bc49e | 1829e7617ebf8e7ad4dc23785c096a801eddfb67 | fix(isAlpha): fix ح character validation in fa-IR language code (#1400) | I added some Persian alphabet characters retrieved from [wikipedia](https://en.wikipedia.org/wiki/Persian_alphabet) on this [line](https://github.com/fakhrip/validator.js/blob/00d1e6157d12a0e10b8a6426c52dc57aa5dc7d77/es/lib/alpha.js#L28)
Also add new validation regarding the language in the [validator.js](https://gith... | diff --git a/src/lib/alpha.js b/src/lib/alpha.js
index acf69a8ac..4107252c3 100644
--- a/src/lib/alpha.js
+++ b/src/lib/alpha.js
@@ -25,6 +25,7 @@ export const alpha = {
'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
'ku-IQ': /^[ئابپتجچحخد... | 3 | 2 | 1 | [{"id": "G0", "claim": "The README should be updated before the PR can be merged.", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The added 'fa-IR' entry should be moved up so the alpha object stays in alphabetic order.", "category": "maintainability... | null |
validatorjs__validator.js__1463 | validatorjs/validator.js | 1,463 | defect | c5a1a226fdaca5f5ba856cad1803070162b1d06f | 435b66249b90ef904a8c89bbc78fd32ffb0f80db | Implemented VAT validation support for english (en-GB) locale | I introduced the `isVAT` method based on a feature request spotted in #852. However, it feels like to big a piece to take all at once so I picked a locale which I need that validation for which is "en-GB".
I purposefully excluded generated files as these seem to contain changes that are not currently checked in the ... | diff --git a/README.md b/README.md
index a591defeb..f1bc2f0ec 100644
--- a/README.md
+++ b/README.md
@@ -155,6 +155,7 @@ Validator | Description
**isURL(str [, options])** | check if the string is an URL.<br/><br/>`options` is an object which defaults to `{ protocols: ['http'... | 3 | 3 | 2 | [{"id": "G0", "claim": "The en-GB VAT matchers could be collapsed into a single one-line regex instead of an array walked by a matching loop.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The VAT validator should be keyed by the ISO 3166-1 alpha-2 ... | null |
validatorjs__validator.js__1495 | validatorjs/validator.js | 1,495 | defect | 39f2bdc432ea3abf145b2782e21bc11e38ca1c9e | 04bad3bf4406bc3c2bff82c3d4e0d6b4f423e958 | feat(isLicensePlate): Introduction with locales for Germany, Liechtenstein, Portugal and Albania | A validator to check if a car license plate is valid or not.
Use cases might include applications where a user might has to register with his car and its license plate as an unique identifier.
## Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x... | diff --git a/src/index.js b/src/index.js
index 4b7f4ae49..8d0f57a1f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -115,6 +115,7 @@ import isWhitelisted from './lib/isWhitelisted';
import normalizeEmail from './lib/normalizeEmail';
import isSlug from './lib/isSlug';
+import isLicensePlate from './lib/isLicensePlat... | 3 | 2 | 1 | [{"id": "G0", "claim": "The German county codes should be covered by a single regex rather than listed manually in an array.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The coverage issue flagged for this pull request should be fixed.", "category": "t... | null |
validatorjs__validator.js__1565 | validatorjs/validator.js | 1,565 | defect | 8831db31e7d5de03cb9744f811ffd256494f97f6 | b57bfb25d82b100a4a0a5da54fa7f0383d759df0 | Add Czech license plates | I have added Czech license plates with regards to all the possible cases I found. [RegExr with tests](https://regexr.com/5je71)
## Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable) - I think I need help with this... | diff --git a/README.md b/README.md
index b2896b73f..c3a5e398b 100644
--- a/README.md
+++ b/README.md
@@ -131,7 +131,7 @@ Validator | Description
**isJWT(str)** | check if the string is valid JWT token.
**isLatLong(str [, options])** | check if... | 2 | 1 | 1 | [{"id": "G0", "claim": "The pull request should add test cases for the new cs-CZ license plate validator, which it ships without any tests.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The cs-CZ regex is too loose and could be made more accurate with ... | null |
validatorjs__validator.js__1575 | validatorjs/validator.js | 1,575 | defect | 8831db31e7d5de03cb9744f811ffd256494f97f6 | 0519f9e1f53951af5d9846fa64a4461a61105962 | isMobileNumber(phone,"vi-VN"): support new telco numbers 087 | We have new telco (https://didong.itelecom.vn/) with number 087***
Update library to support this number as valid VN phone number.
## Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
| diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js
index c34d45dfb..68a19922e 100644
--- a/src/lib/isMobilePhone.js
+++ b/src/lib/isMobilePhone.js
@@ -110,7 +110,7 @@ const phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}... | 1 | 1 | 0 | [{"id": "G0", "claim": "The author should add tests covering the new 087 telco numbers before merging.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1648 | validatorjs/validator.js | 1,648 | defect | a31c116b2a2dc85f469d185acc4e853a2f61fceb | 71d5a3adfaaff67b5e0f11fe3653ee4cff79e57d | Add typeof utility | # What I have done
- Added type of utility to make sure it is easy to check the type of null, object, array, date, among others.
`I.e type of {} == 'object' and type of null == 'null'` and not that all are `object`.
- Added tests for the same, as a way to protect any changes/breaking | diff --git a/src/lib/util/typeOf.js b/src/lib/util/typeOf.js
new file mode 100644
index 0000000000..f96af511af
--- /dev/null
+++ b/src/lib/util/typeOf.js
@@ -0,0 +1,10 @@
+/**
+ * Better way to handle type checking
+ * null, {}, array and date are objects, which confuses
+ */
+export default function typeOf(input) {
+ ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add one more test asserting typeOf(String('kemboi')) returns 'string'.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1665 | validatorjs/validator.js | 1,665 | defect | d1a9b6d8c5bd7350d6a7303085f0269f6a99aa9b | c3da5b828c48b1bc1e089fb85a99cf6e7c300157 | feat(isLicensePlate): add support for Swedish license plates | This PR adds support for Swedish license plates.
## Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
| diff --git a/README.md b/README.md
index 7dbed1295..83e76e570 100644
--- a/README.md
+++ b/README.md
@@ -132,7 +132,7 @@ Validator | Description
**isJWT(str)** | check if the string is valid JWT token.
**isLatLong(str [, options])** | check if... | 4 | 4 | 2 | [{"id": "G0", "claim": "The README's isLicensePlate locale list should put `cs-CZ` back at the start to keep the list in alphabetical order.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The sv-SE regex should be simplified, using character range... | null |
validatorjs__validator.js__1730 | validatorjs/validator.js | 1,730 | defect | 8c4b3b35c3bd36dc3983aadb045422847154451b | e263b32b7a108d853aca95ec950ab934c54eb94c | fix(isMagnetURI): update validation regex | This PR updates the `isMagnetURI` validator regex:
- Fix ReDOS in old regex (thanks to @yetingli for discovering the vulnerability and @JamieSlome for reporting it)
- Validate only exact xt topics (btih,sha1,...) based on [this list](https://en.wikipedia.org/wiki/Magnet_URI_scheme#xt_exact_topic)
- Validate only 3... | diff --git a/src/lib/isMagnetURI.js b/src/lib/isMagnetURI.js
index 54a3d6654..afe27b623 100644
--- a/src/lib/isMagnetURI.js
+++ b/src/lib/isMagnetURI.js
@@ -1,6 +1,6 @@
import assertString from './util/assertString';
-const magnetURI = /^magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32,40}&dn=.+&tr=.+$/i;
+const magnetURI = /^... | 1 | 1 | 0 | [{"id": "G0", "claim": "The `(?:&.+)` group in the new isMagnetURI regex should have a range limit put on its `+` quantifier.", "category": "correctness", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
validatorjs__validator.js__1772 | validatorjs/validator.js | 1,772 | defect | 13651ea2095c0966576fd7bf44505fb5501681de | b01fa0878bba41ca50a7f46cba3edfb4580b591e | feat: (isMobilePhone) Add mobile phone validation for Cameroon (fr-CM) | <!--
Add a descriptive title textbox above, e.g.
feat(validatorName): brief title of what has been done
-->
<!--- briefly describe what you have done in this PR --->
I have added a regex for validating Cameroonian mobile numbers which should work. I'm not super comfortable with regular expressions, so if I hav... | diff --git a/README.md b/README.md
index 1ff1e00dc..68d97886c 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@ Validator | Description
**isMagnetURI(str)** | check if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme).
**is... | 3 | 3 | 2 | [{"id": "G0", "claim": "The country-prefix alternation /^((237) ?|(\\+237) ?)([0-9] ?){9}$/ should be written the simpler way /^(\\+?237)? ([0-9] ?){9}$/.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Update the regex to take into consideration the mobi... | null |
validatorjs__validator.js__1833 | validatorjs/validator.js | 1,833 | defect | 13651ea2095c0966576fd7bf44505fb5501681de | f08f0107ff1467e574e53ca34474acd04b761a61 | feat(isUrl): urls with empty user | URL with an empty user are valid.
Example:
```
http://:pass@www.foobar.com/
```
This kind of URL (${protocol}://:${password}@${hostname}:${port}) can be parsed and allows to extract the password.
discussion: https://github.com/validatorjs/validator.js/issues/1681
## Checklist
- [x] PR contains only chan... | diff --git a/src/lib/isURL.js b/src/lib/isURL.js
index 7f6e0ba5f..8a92601ef 100644
--- a/src/lib/isURL.js
+++ b/src/lib/isURL.js
@@ -111,7 +111,11 @@ export default function isURL(url, options) {
if (options.disallow_auth) {
return false;
}
- if (split[0] === '' || split[0].substr(0, 1) === ':') {
+... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new user/password handling in isURL.js could be simplified to shift the auth string first and split it into user and password, returning false only when both are empty.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1835 | validatorjs/validator.js | 1,835 | defect | 13651ea2095c0966576fd7bf44505fb5501681de | 11555820d65ff7ad53538709418f3e322742b1fc | fix(unescape-bug): Fixed bug where intermediate string contains escaped characters | Fixes: #1827
If the intermediate string contains escape sequences, eg. unescaping `&lt;` resulted in incorrect output `<`. Moved & unescape as last operation to handle all other sequences before that.
## Checklist
- [X] PR contains only changes related; no stray files, etc.
- [ ] README updated (wher... | diff --git a/src/lib/unescape.js b/src/lib/unescape.js
index 213a0f70b..a8b13cee9 100644
--- a/src/lib/unescape.js
+++ b/src/lib/unescape.js
@@ -2,12 +2,12 @@ import assertString from './util/assertString';
export default function unescape(str) {
assertString(str);
- return (str.replace(/&/g, '&')
- .repl... | 1 | 1 | 0 | [{"id": "G0", "claim": "A comment referencing the PR or the linked issue should be added, explaining why the `&` replace must be the last one.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
validatorjs__validator.js__1836 | validatorjs/validator.js | 1,836 | defect | 13651ea2095c0966576fd7bf44505fb5501681de | 61a3b48403a9e56276dee8e037add38016b54cc5 | feat(contains): Added possibility to check that string contains seed multiple times | `contains` now checks if the string contains the seed n number of times, eg. foobarfoobar contains foo 2 times. This functionality is enabled by providing minOccurrences option (defaults to 1). Also refactored the implementation to be based on regex, rather than indexOf.
## Checklist
- [X] PR contains only change... | diff --git a/README.md b/README.md
index 1ff1e00dc..924c3f1ce 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@ Here is a list of the validators currently available.
Validator | Description
--------------------------------------- | --------------------------------------
-**conta... | 1 | 1 | 1 | [{"id": "G0", "claim": "Compiling a RegExp from the user-supplied seed may introduce ReDoS, and tux-tn asks to use split-based counting instead.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
validatorjs__validator.js__1865 | validatorjs/validator.js | 1,865 | defect | 47ee5ad64cf5c684c841b59110af4e221b74945c | 6b987b4b3807cd38687375ed0ae2180221b6ffbe | feat(isMACAddress): add EUI-64 validation | <!--
Add a descriptive title textbox above, e.g.
feat(validatorName): brief title of what has been done
-->
<!--- briefly describe what you have done in this PR --->
This PR adds support for validating against EUI-64 as well as the previous EUI-48. This corresponds with the [macaddr8 type](https://www.postgresql... | diff --git a/README.md b/README.md
index 2cf6505be..59b65ec89 100644
--- a/README.md
+++ b/README.md
@@ -142,7 +142,7 @@ Validator | Description
**isLicensePlate(str [, locale])** | check if string matches the format of a country's license plate.<br/><br/>(locale is one of `['cs-CZ', ... | 3 | 2 | 1 | [{"id": "G0", "claim": "The `String(options.eui)` statement should cast eui in place, i.e. `options.eui = String(options.eui)`, since the result is otherwise discarded.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The README should document the po... | null |
validatorjs__validator.js__1909 | validatorjs/validator.js | 1,909 | defect | f055c111d8720dd5fad720f218f1399ce357e81a | 7c396cc75d35045dd82b1f43a76306541a8a7d24 | feat (isMobilePhone): add Nicaragua validator | Add Nicaragua to Mobile Phone validation
@tux-tn
## Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
| diff --git a/README.md b/README.md
index 0d2ed2bce..3baa62607 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ Validator | Description
**isDecimal(str [, options])** | check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.<br/><br/>... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add the trailing space back to the isEmail line of README.md, whose accidental removal makes the pull request contain an irrelevant change.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
validatorjs__validator.js__1916 | validatorjs/validator.js | 1,916 | defect | f055c111d8720dd5fad720f218f1399ce357e81a | bcd21cc18a06cde227e7609dceff299663a92d13 | fix(isDataURI): fix dataURI mediaType format | fix(isDataURI): fix dataURI mediaType format
The readAsDataURL method [MDN](https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL) generates a dot mediaType for some file formats (.docx - application/vnd.openxmlformats-officedocument.wordprocessingml.document, . xlsx - application/vnd.openxmlform... | diff --git a/src/lib/isDataURI.js b/src/lib/isDataURI.js
index 01e43f70c..966a6f3db 100644
--- a/src/lib/isDataURI.js
+++ b/src/lib/isDataURI.js
@@ -1,6 +1,6 @@
import assertString from './util/assertString';
-const validMediaType = /^[a-z]+\/[a-z0-9\-\+]+$/i;
+const validMediaType = /^[a-z]+\/[a-z0-9\-\+\.]+$/i;
... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a comma to the end of the newly added test-data-URI line in test/validators.js (line 10154, snapshot S1) so that the tests pass.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
validatorjs__validator.js__2144 | validatorjs/validator.js | 2,144 | defect | 531dc7f1f75613bec75c6d888b46480455e78dc7 | 638c89b4014418df25c47c8973d2ad0b512521c3 | Added isFreightContainerID validator | Added isContainerID validator
Check whether a string is an ISO6346 shipping container identification.
[https://en.wikipedia.org/wiki/ISO_6346](https://en.wikipedia.org/wiki/ISO_6346)
** | check if a string is a boolean.<br/>`options` is an object which defaults to `{ loose: false }`. If lo... | 3 | 3 | 2 | [{"id": "G0", "claim": "The isDigit regex could be simplified to ^[0-9]$ since it is tested against a single character, and the regexes should use regular expression literals instead of the RegExp constructor for style consistency with the rest of the project.", "category": "maintainability", "verdict": "supported", "p... | null |
validatorjs__validator.js__2175 | validatorjs/validator.js | 2,175 | defect | 6dba289d273b7ea24345b89b0a13ee39bc372154 | dba8c58d02a6a5d58df9b30be873ca37aa69ff3b | feat(isMobilePhone): Add regex for Somalia so-SO | Added regex validation for Somalia (so-SO) mobile phone numbers, country codes referenced from these documents:
- [THE NATIONAL TELEPHONE NUMBERING PLAN by National Communications Authority - Federal Republic of Somalia](https://nca.gov.so/wp-content/uploads/2021/12/Numbering-Plan-Somalia-Clean-BV-Final-1.pdf)
- [N... | diff --git a/README.md b/README.md
index 08cbe643b..21166f5a4 100644
--- a/README.md
+++ b/README.md
@@ -148,7 +148,7 @@ Validator | Description
**isMagnetURI(str)** | check if the string is a [Magnet URI format][Magnet URI Format].
**isMD5(str)** ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a trailing comma after the last element of the new so-SO test arrays in test/validators.test.js — after '0609876543' in the valid list and after '06945454545' in the invalid list.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
validatorjs__validator.js__2235 | validatorjs/validator.js | 2,235 | defect | 4f639099e29f3f23b9aac05519f3acadb3df3e08 | 53ecf0be6094c8d5fc40c15270b480718ff6025c | feat(isIBAN): add white and blacklist options to the isIBAN validator | ## feat(isIBAN): add white and blacklist options to the isIBAN validator
In order to restrict the list of countries that I want to validate the IBAN against now we can pass the whitelist option with the country codes that I want to validate the code. Also if I want to remove a certain country from the validation now... | diff --git a/README.md b/README.md
index 2a34bc719..e8f5b195e 100644
--- a/README.md
+++ b/README.md
@@ -121,7 +121,7 @@ Validator | Description
**isHexadecimal(str)** | check if the string is a hexadecimal number.
**isHexColor(str)** | check if the s... | 2 | 2 | 1 | [{"id": "G0", "claim": "The README should elaborate how the whitelist/blacklist options are defined, explaining the options object like other validators do and listing the supported country codes.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The... | null |
validatorjs__validator.js__2556 | validatorjs/validator.js | 2,556 | defect | d07eae6cdaf49af6a44b0731b00b0de9827c8019 | 6b05e680a823df43a7e851f23b44da5eec901a24 | Add Qatar phone number validation | - Updated phone object in isMobilePhone validator adding ar-QA regex
- Added isMobilePhone.test.js with Qatar phone number tests
## Checklist
- [ ] PR contains only changes related; no stray files, etc.
- [ ] Tests written
| diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js
index ec1483d65..5e0f4d869 100644
--- a/src/lib/isMobilePhone.js
+++ b/src/lib/isMobilePhone.js
@@ -20,6 +20,7 @@ const phones = {
'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/,
'ar-TN': /^(\+?216)?[2459]\d{7}$/,
'az-AZ': /^(\+994|0)(10|5[015]|7[07]|99)\d{7... | 3 | 3 | 0 | [{"id": "G0", "claim": "The 'en-QA' alias line added by the pull request should be deleted because that locale mapping is not used often enough.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The Qatar tests should be moved into the big validators test f... | null |
validatorjs__validator.js__901 | validatorjs/validator.js | 901 | defect | 5d3fac069ad8f16ef6dce14f1dd99c399840f535 | 87b43c5f318ad801ff3022a5b66e435aacba024f | isURL - email addresses validate as URLs #707 | Adding an option to `isURL` to allow rejecting URLs containing authentication info.
Fixes #707 | diff --git a/lib/isURL.js b/lib/isURL.js
index 1eede9647..079980ead 100644
--- a/lib/isURL.js
+++ b/lib/isURL.js
@@ -103,6 +103,9 @@ function isURL(url, options) {
split = url.split('@');
if (split.length > 1) {
+ if (options.exclude_auth_url) {
+ return false;
+ }
auth = split.shift();
if ... | 3 | 2 | 0 | [{"id": "G0", "claim": "Rename the isURL option exclude_auth_url added by this pull request to disallow_auth for consistency with the other option names.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Update the README to document the isURL option this p... | null |
valorem-labs-inc__quay__82 | valorem-labs-inc/quay | 82 | defect | 802fd20338bf988be3ab79eaa5dfebfda9e2b116 | 69a7c365ed7d987b58246fedac308c98caefbf33 | Session | Session managment within Quay and example MM client. | diff --git a/.gitignore b/.gitignore
index 3a8cabc..8cf10ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
/target
.idea
+
+# Ignore local configuration file
+configuration/local.yaml
diff --git a/build.rs b/build.rs
index 1f5b4ff..576fe23 100644
--- a/build.rs
+++ b/build.rs
@@ -8,6 +8,14 @@ fn main() -> R... | 1 | 1 | 1 | [{"id": "G0", "claim": "Restoring configuration/local.yaml: it has a purpose for the CI pipeline and prod-config overrides and should not be removed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
valyala__fasthttp__1009 | valyala/fasthttp | 1,009 | defect | 2a6f7db5bbc4d7c11f1ccc0cb827e145b9b7d7ea | fd995af528454b189aefdaa51d53032b9f335caf | Add option for middleware to set custom remote address | Fixes #1008 | diff --git a/server.go b/server.go
index 67f47d8638..76e756bf07 100644
--- a/server.go
+++ b/server.go
@@ -572,6 +572,7 @@ type RequestCtx struct {
connID uint64
connRequestNum uint64
connTime time.Time
+ remoteAddr net.Addr
time time.Time
@@ -1091,6 +1092,9 @@ func (ctx *RequestCtx) IsHea... | 1 | 1 | 1 | [{"id": "G0", "claim": "RequestCtx.Init2 should also set ctx.remoteAddr = nil so the custom remote address is cleared when a context is re-initialized.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
valyala__fasthttp__1049 | valyala/fasthttp | 1,049 | defect | be13b504abc5fe227a924c0d8896b289c13b0379 | e44a9fdb6f18a160966bce22161ed04e8b153ba0 | fix: set content-length properly when StreanRequestBody was enabled | Fix #1048
Please take a look. @valyala @kirillDanshin
Thanks. | diff --git a/http.go b/http.go
index 7b3c51c4cf..2511819b00 100644
--- a/http.go
+++ b/http.go
@@ -1185,7 +1185,7 @@ func (req *Request) ContinueReadBodyStream(r *bufio.Reader, maxBodySize int, pre
req.body = bodyBuf
req.bodyStream = acquireRequestStream(bodyBuf, r, contentLength)
- req.Header.SetContentLength(le... | 1 | 1 | 1 | [{"id": "G0", "claim": "A test case that fails before the fix and passes after should be added for the content-length change.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
valyala__fasthttp__1155 | valyala/fasthttp | 1,155 | defect | 3ff6aaa5917f40eeb5cdcb4272c58210f161f0ea | 9dc4b24ac9ea425f1c61970b4b9dd0bb1ae77fd3 | feat: close idle connections when server shutdown | fixes #1103 | diff --git a/server.go b/server.go
index bc4a735bb8..9faad47cf8 100644
--- a/server.go
+++ b/server.go
@@ -414,13 +414,15 @@ type Server struct {
writerPool sync.Pool
hijackConnPool sync.Pool
- // We need to know our listeners so we can close them in Shutdown().
+ // We need to know our listeners and idle con... | 5 | 5 | 1 | [{"id": "G0", "claim": "Rename the `connsMu` mutex to `idleConnsMu` and declare it together with `idleConns` in the Server struct.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Calling setStateLocked(c, StateClosed) from closeIdleConns invokes ... | null |
valyala__fasthttp__1233 | valyala/fasthttp | 1,233 | defect | 61aa8b17a240b66ead927f945a3e8a96c3f0ec40 | 6d164c099c2f82725a518e3fd949796688fee7c5 | Read response when client closes connection #1232 | Closes #1232 | diff --git a/client.go b/client.go
index 800cec3a4d..1d6fbb3ead 100644
--- a/client.go
+++ b/client.go
@@ -13,6 +13,7 @@ import (
"strings"
"sync"
"sync/atomic"
+ "syscall"
"time"
)
@@ -1427,12 +1428,11 @@ func (c *HostClient) doNonNilReqResp(req *Request, resp *Response) (bool, error)
if err == nil {
e... | 5 | 5 | 3 | [{"id": "G0", "claim": "When the write to the server fails with ECONNRESET, the connection is not closed but falls through to be released back to the pool, so a reset connection will be taken from the pool and tried again.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"... | null |
valyala__fasthttp__1444 | valyala/fasthttp | 1,444 | defect | 49951353c83ac7b3ca9a78570dbea0c970b6d801 | c40378b8a030e0515b8820f005221776d60459bb | client.go fix addMissingPort() | Currently it has a minor bug when the default port is not added for IPv6 addreses.
Likely in practice it doesn't affect the system.
Anyway please accept the PR that improves a performance a little bit and also exposes the addMissingPort() so that we can use it our apps code (now I had to copy the func). | diff --git a/client.go b/client.go
index c058f36004..c681582c06 100644
--- a/client.go
+++ b/client.go
@@ -9,7 +9,6 @@ import (
"fmt"
"io"
"net"
- "strconv"
"strings"
"sync"
"sync/atomic"
@@ -495,7 +494,7 @@ func (c *Client) Do(req *Request, resp *Response) error {
hc := m[string(host)]
if hc == nil {
... | 3 | 2 | 1 | [{"id": "G0", "claim": "Replace the implementation of AddMissingPort with the reviewer's suggested cleaner version and add doc comments to the exported function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request's test seems to be ... | null |
valyala__fasthttp__1585 | valyala/fasthttp | 1,585 | defect | 6b68042b6c9da984ab5c47b2ebcb6fdfb32a5a83 | 60a7b53abaef14b45afe0a96c2aecfa7c7c9801d | Auto add 'Vary' header after compression | Add config `SetAddVaryHeaderForCompression` to enable 'Vary: Accept-Encoding' header when compression is used.
Added a config variable `addVaryHeaderForCompress` to control this feature, with setter `SetAddVaryHeaderForCompression`.
To remain backward compatible, it's false by default.
When enabled, 'Vary: Accept-... | diff --git a/http.go b/http.go
index ffb02c8b7e..bfe39a48e5 100644
--- a/http.go
+++ b/http.go
@@ -1723,6 +1723,7 @@ func (resp *Response) brotliBody(level int) error {
resp.bodyRaw = nil
}
resp.Header.SetContentEncodingBytes(strBr)
+ resp.Header.Set("Vary", "Accept-Encoding")
return nil
}
@@ -1778,6 +1779,... | 2 | 2 | 2 | [{"id": "G0", "claim": "Remove SetAddVaryHeaderForCompression and always set the Vary header after compression, as is already done for Content-Encoding.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Do not unconditionally overwrite the Vary header with ... | null |
valyala__fasthttp__1602 | valyala/fasthttp | 1,602 | defect | e181af17c77ac3f2041a192bc59a86210a00e09e | 39006fcf1623eb8a946dcd1b2ed92d9c5148fb52 | Abstracts the RoundTripper interface and provides a default implement | close #1601 | diff --git a/client.go b/client.go
index fa399af13f..cd45a338d0 100644
--- a/client.go
+++ b/client.go
@@ -628,8 +628,10 @@ type DialFunc func(addr string) (net.Conn, error)
// Request argument passed to RetryIfFunc, if there are any request errors.
type RetryIfFunc func(request *Request) bool
-// TransportFunc wra... | 4 | 3 | 0 | [{"id": "G0", "claim": "The inline default-transport code at client.go:1349 should be extracted into a separate transport() method to simplify doNonNilReqResp.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Passing *HostClient to RoundTrip feels wrong an... | null |
valyala__fasthttp__1638 | valyala/fasthttp | 1,638 | defect | 772e4aadb76a6296762b26057de61bd91f8101d9 | b30207aa6fc2637c6642756fc54ce8d355ef9875 | Allow redirect URI path to not be normalized. | Fix #1637
Propagates the `DisablePathNormalizing` setting on a request URI to the redirect URI. This fixes an issue where redirect URIs were being normalized regardless of the setting on the request URI. This could effectively break the redirect URI, depending on the expectations of the server.
Preserves the cur... | diff --git a/client.go b/client.go
index 1c1b486820..02456d313f 100644
--- a/client.go
+++ b/client.go
@@ -1064,16 +1064,17 @@ func doRequestFollowRedirects(req *Request, resp *Response, url string, maxRedir
err = ErrMissingLocation
break
}
- url = getRedirectURL(url, location)
+ url = getRedirectURL(url, ... | 2 | 2 | 1 | [{"id": "G0", "claim": "Reusing the existing DisablePathNormalizing flag to also control redirect-location normalization is a breaking change, so the author should rather expose a new option.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment... | null |
valyala__fasthttp__1810 | valyala/fasthttp | 1,810 | defect | 86c7e844f4e99607af51dcdf67b6b4caa827bc0d | 2ecdf3a8843d58e0b8329a67d378677fc033afa8 | Fix header parser (#1808) | See issue #1808. When FastHTTP receives a header value suffixed or prefixed with tabs, they should be stripped. | diff --git a/header.go b/header.go
index 3cfe82593a..0917cc89af 100644
--- a/header.go
+++ b/header.go
@@ -3296,7 +3296,7 @@ func (s *headerScanner) next() bool {
s.key = s.b[:n]
normalizeHeaderKey(s.key, s.disableNormalizing)
n++
- for len(s.b) > n && s.b[n] == ' ' {
+ for len(s.b) > n && (s.b[n] == ' ' || s.b[n... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a test that shows the parser gets the value and shows the tabs are stripped.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
valyala__fasthttp__1819 | valyala/fasthttp | 1,819 | defect | 1fb34531652380677219b7c8c9c3d02da007a80b | 066cf0866755ad66faaf76556fbbcc47d10b214e | StreamRequestBody shouldn't read more data than actual need. | The StreamRequestBody feature on the server side should not read content that does not belong to the current request body.This is more logical and consistent with the result of not using the StreamRequestBody feature.
Fixes: [#1816](https://github.com/valyala/fasthttp/issues/1816).
The reason for addressing this iss... | diff --git a/TestIssue1816_test.go b/TestIssue1816_test.go
new file mode 100644
index 0000000000..205c44e91a
--- /dev/null
+++ b/TestIssue1816_test.go
@@ -0,0 +1,57 @@
+package fasthttp
+
+import (
+ "bufio"
+ "bytes"
+ "github.com/valyala/fasthttp/fasthttputil"
+ "io"
+ "testing"
+)
+
+func TestStreamReadBug(t *testin... | 2 | 2 | 0 | [{"id": "G0", "claim": "The newly added comment lines in readBodyWithStreaming (in http.go) must be reformatted to satisfy the linter, splitting lines that exceed the character limit and removing the stray empty line the strict linter rejects.", "category": "maintainability", "verdict": "supported", "priority": "P2", "... | null |
valyala__fasthttp__1829 | valyala/fasthttp | 1,829 | defect | a1db411cc28c8214776af8b6a62f4e60c9d2fea8 | f5f48fb86e610a884b035eba73387d41f0c89da0 | Merge the various proxy dialer implementations from the fasthttpproxy into a single struct. | https://github.com/valyala/fasthttp/issues/1822
In this issue, I noticed that the existing implementation doesn't leverage fasthttp's dialer mechanism, so I created this pull request.
At the same time, provide more comprehensive support for proxy environment variables and allow configuration of the fasthttp dialer.
... | diff --git a/fasthttpproxy/dialer.go b/fasthttpproxy/dialer.go
new file mode 100644
index 0000000000..b79194aaa4
--- /dev/null
+++ b/fasthttpproxy/dialer.go
@@ -0,0 +1,238 @@
+package fasthttpproxy
+
+import (
+ "bufio"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "net"
+ "net/url"
+ "strings"
+ "sync"
+ "time"
+
+ "github... | 1 | 1 | 0 | [{"id": "G0", "claim": "The old proxy dialer methods should be rewritten to use the new Dialer instead of keeping their duplicate implementations, since they cannot be removed for backwards compatibility.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
valyala__fasthttp__1860 | valyala/fasthttp | 1,860 | defect | c3050516d957b5bf75b353683c50302e4f955c6b | 8f2d75e8ddc4d5ae091adb6e57f1e398a6a8acf2 | Fix improper memory reuse in NewFastHTTPHandler | Hi Developers,
This pull request fixes the improper memory reuse in NewFastHTTPHandler reported in this [issue](https://github.com/valyala/fasthttp/issues/1859).
If there are any further adjustments or improvements you'd like me to make, please don't hesitate to reach out :)
Best regards! | diff --git a/fasthttpadaptor/adaptor_test.go b/fasthttpadaptor/adaptor_test.go
index 229e368550..94ecf9f8d3 100644
--- a/fasthttpadaptor/adaptor_test.go
+++ b/fasthttpadaptor/adaptor_test.go
@@ -139,6 +139,53 @@ func TestNewFastHTTPHandler(t *testing.T) {
}
}
+func TestNewFastHTTPHandlerWithCookies(t *testing.T) {... | 3 | 2 | 2 | [{"id": "G0", "claim": "The deep copying should be performed through a case branch in the adaptor (ConvertRequest) instead of modifying RequestHeader.VisitAll, since VisitAll's doc says key and value cannot be referenced after f finishes and directly modifying VisitAll may affect its efficiency.", "category": "design",... | null |
valyala__fasthttp__2027 | valyala/fasthttp | 2,027 | defect | d356cacd848d92e7f25f06ec64c29f43e033e369 | 5b9f3598eef4072aee1a7e1512a2374971828aac | refact: eliminate duplication in Request/Response via struct embedding | Reduces code duplication by embedding the `header` struct into both `RequestHeader` and `ResponseHeader` to share common fields.
I found that there are many duplicate methods in `header.go`. We can reduce this repetition by using struct embedding. This PR improves maintainability by allowing shared logic between `Re... | diff --git a/header.go b/header.go
index 178acf7881..eb5058016b 100644
--- a/header.go
+++ b/header.go
@@ -17,6 +17,28 @@ const (
nChar = byte('\n')
)
+type header struct {
+ h []argsKV
+ cookies []argsKV
+
+ bufK []byte
+ bufV []byte
+ contentLengthBytes []byte
+ contentType ... | 5 | 3 | 1 | [{"id": "G0", "claim": "A brief inline comment should be added explaining why secureErrorLogMessage is initialized via a separate field assignment instead of a composite literal in the tests.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Verify t... | null |
valyala__fasthttp__2031 | valyala/fasthttp | 2,031 | defect | 8b512b7dae68ffb700b3240bcb81bed5f5c9e6e8 | e5b271d72e0b5d38b2437c006d43e67788b0c998 | Add warning for deprecated newline separator | See: https://github.com/valyala/fasthttp/pull/2030 | diff --git a/header.go b/header.go
index 178acf7881..31f285da55 100644
--- a/header.go
+++ b/header.go
@@ -52,6 +52,10 @@ type ResponseHeader struct {
noDefaultContentType bool
noDefaultDate bool
secureErrorLogMessage bool
+
+ // This is only used to print the deprecated newline separator warning in head... | 2 | 2 | 0 | [{"id": "G0", "claim": "testLogger.Printf should explicitly handle a formatted string that contains no space, checking the possibly negative IndexByte result, to improve robustness.", "category": "correctness", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The header field 'ma... | null |
valyala__fasthttp__2043 | valyala/fasthttp | 2,043 | defect | dab027680cc57d7c2749ba018a72f8b943f473cc | 9bc455ede7b18c9f6a0fd21356aaa2dfde96d42c | Fix trailer security | Bad trailers weren't checked correctly.
Some bad trailers that could cause security issues weren't being disallowed. | diff --git a/header.go b/header.go
index 0f262bc9af..e07fa123e5 100644
--- a/header.go
+++ b/header.go
@@ -2611,24 +2611,30 @@ func isBadTrailer(key []byte) bool {
case 'a':
return caseInsensitiveCompare(key, strAuthorization)
case 'c':
- if len(key) > len(HeaderContentType) && caseInsensitiveCompare(key[:8], s... | 3 | 3 | 0 | [{"id": "G0", "claim": "The || in the 'x' case return should be wrapped in parentheses or split into separate return statements to ensure proper evaluation order, which the reviewer says is currently incorrect and blocks any header starting with 'x-forwarded' regardless of the second condition.", "category": "correctne... | null |
valyala__fasthttp__2054 | valyala/fasthttp | 2,054 | defect | 1828bd4eee29b489a516b8c01446e621b3a6953e | 10f373f72018c7eddbcffdfc78ed03b90bdf5173 | Add flushing support to fasthttpadaptor | ### Description
Currently, `fasthttpadaptor` runs the net/http handler fully first, then copies the response to a fasthttp response object and returns. This makes it incompatible with net/http handlers that may rely on instantly flushing to the client (e.g. Live Data Streams, SSE events).
This PR adds support flu... | diff --git a/fasthttpadaptor/adaptor.go b/fasthttpadaptor/adaptor.go
index 7153c6dad2..841bc8b73e 100644
--- a/fasthttpadaptor/adaptor.go
+++ b/fasthttpadaptor/adaptor.go
@@ -56,42 +56,166 @@ func NewFastHTTPHandler(h http.Handler) fasthttp.RequestHandler {
ctx.Error("Internal Server Error", fasthttp.StatusInternal... | 13 | 11 | 3 | [{"id": "G0", "claim": "Comments added by this pull request misspell 'occurred' as 'occured' in three places.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The hijacked-connection copy uses a WaitGroup with no timeout mechanism, so if one connect... | null |
valyala__fasthttp__2072 | valyala/fasthttp | 2,072 | defect | e04490f830dd9671b53e2359cddc79a23d7877f3 | e3cf034010b01074c96277beb2262f15b120c62f | Add DNS cache management methods for TCPDialer | Resolves #2066
This commit introduces new methods for managing DNS cache in TCPDialer:
1. FlushDNSCache() - Clears all cached DNS entries, forcing fresh lookups
Key changes:
- Add FlushDNSCache() method to TCPDialer
- Add global FlushDNSCache() function for default dialer
- Refactor tcpAddrsClean() to extra... | diff --git a/client_test.go b/client_test.go
index 1e6aaac105..3cb68aadf0 100644
--- a/client_test.go
+++ b/client_test.go
@@ -3,6 +3,7 @@ package fasthttp
import (
"bufio"
"bytes"
+ "context"
"crypto/tls"
"errors"
"fmt"
@@ -3559,3 +3560,103 @@ func (f F) Read(p []byte) (n int, err error) {
time.Sleep(500 ... | 1 | 1 | 0 | [{"id": "G0", "claim": "Do not expose the CleanDNSCache method, because expired DNS entries are already not used and the method only frees some unused memory a bit earlier, which is not worth increasing the API surface.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
valyala__fasthttp__2081 | valyala/fasthttp | 2,081 | defect | a17ec74999fe7a1f9a46d09d644584e73e97f908 | 29b685cb69c7c9a799bd789fdfd67cf9ea8277c2 | Reimplement flushing support for fasthttpadaptor | Use a simpler implementation, and do more tests. Instead of https://github.com/valyala/fasthttp/pull/2069 | diff --git a/fasthttpadaptor/adaptor.go b/fasthttpadaptor/adaptor.go
index 48cd0e3a1e..8098ddb8ea 100644
--- a/fasthttpadaptor/adaptor.go
+++ b/fasthttpadaptor/adaptor.go
@@ -8,6 +8,7 @@ import (
"net"
"net/http"
"sync"
+ "sync/atomic"
"github.com/valyala/fasthttp"
)
@@ -57,11 +58,11 @@ func NewFastHTTPHandl... | 4 | 2 | 1 | [{"id": "G0", "claim": "The new test suppresses write errors with //nolint:errcheck (the foo/bar writes in the /flush handler and the hijacked-connection write) instead of checking the errors and reporting them with t.Errorf, as the suggestions propose.", "category": "testing", "verdict": "supported", "priority": "P2",... | null |
valyala__fasthttp__2135 | valyala/fasthttp | 2,135 | defect | 3471acf23f1a39e83acd13beec99cd1e809762b1 | 1a7fc0fb76f3c4ed74e98ac7cb94404b9ce3b968 | feat: enhance performance | ## Performance Improvements Summary
This PR introduces benchmark-driven performance optimizations in core `fasthttp` hot paths and keeps only changes with statistically significant wins (`benchstat`, `p < 0.05`) and no allocation regressions.
### 1) Header parse hot-path: remove redundant key validation work
**F... | diff --git a/bytesconv.go b/bytesconv.go
index 053da6a700..fdd01f305f 100644
--- a/bytesconv.go
+++ b/bytesconv.go
@@ -117,9 +117,125 @@ func AppendHTTPDate(dst []byte, date time.Time) []byte {
// ParseHTTPDate parses HTTP-compliant (RFC1123) date.
func ParseHTTPDate(date []byte) (time.Time, error) {
+ if t, ok := ... | 13 | 13 | 9 | [{"id": "G0", "claim": "parseRFC1123DateGMT builds the result with time.Date, which normalizes invalid calendar dates (e.g. \"31 Feb\" becomes a March date) instead of rejecting them like time.Parse(time.RFC1123, ...) would, so ParseHTTPDate callers can get incorrect timestamps.", "category": "correctness", "verdict": ... | null |
valyala__fasthttp__2147 | valyala/fasthttp | 2,147 | defect | c2b317d47d6dd97bf5ca0189ed71dcaefbef0229 | bbc8dfe88bb0cc8328fb678ddfbc1a981c6a05b3 | Add WithLimit methods for uncompression | The current uncompress methods don't enforce a memory limit and are susceptible to things like zip bombs. This pull introduces new methods so retain backwards compatibility. The old methods might be deprecated in the future. | diff --git a/README.md b/README.md
index e6a91402bb..02867b6b54 100644
--- a/README.md
+++ b/README.md
@@ -379,6 +379,7 @@ Important points:
- [r.FormValue()](https://pkg.go.dev/net/http#Request.FormValue) **➜** [ctx.FormValue()](https://pkg.go.dev/github.com/valyala/fasthttp#RequestCtx.FormValue)
- [r.FormFile()... | 2 | 1 | 0 | [{"id": "G0", "claim": "Setting io.LimitedReader.N to int64(maxBodySize) + 1 overflows when maxBodySize is math.MaxInt64 on 64-bit platforms, so the limit misbehaves (e.g., a spurious ErrBodyTooLarge); add an overflow guard or saturate the limit.", "category": "correctness", "verdict": "opposed", "priority": "P1", "sco... | null |
valyala__fasthttp__564 | valyala/fasthttp | 564 | defect | ed16dc07fd135b0c4bff506b7050f4555b3dd9c2 | 1e66f6b13435d62ac13ff09c4fe1976369d6514c | Timing fixes | - Improved timing code to be much cleaner
- Add IdleTimeout
- Remove obsolete optimization (was fixed in Go 2 years ago: https://github.com/golang/go/issues/15133#issuecomment-271571395)
Fixes #563 and potentially #491 | diff --git a/server.go b/server.go
index ef73677985..8879fe66ab 100644
--- a/server.go
+++ b/server.go
@@ -199,19 +199,26 @@ type Server struct {
// Default buffer size is used if not set.
WriteBufferSize int
- // Maximum duration for reading the full request (including body).
- //
- // This also limits the maxim... | 2 | 2 | 1 | [{"id": "G0", "claim": "The doc comment the PR adds for ReadTimeout misnames the field as \"ReadHeaderTimeout\"; the comment should say ReadTimeout.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The deprecation notice for MaxKeepaliveDuration sho... | null |
valyala__fasthttp__787 | valyala/fasthttp | 787 | defect | 5ce12a8e7821c868e464f32fde6507a82ce61ec4 | 4abbbc7d03f931b34b61a0b94056eeb5f68da881 | allow the expect 100 continue workflow to deny requests | Fixes https://github.com/valyala/fasthttp/issues/783
An okay solution right now which allows servers to deny reading the request body after reading the request headers via a server callback configuration.
A more long term solution later on might be to give full control to the user during their handler callback, b... | diff --git a/server.go b/server.go
index 29ce90940e..321c81a981 100644
--- a/server.go
+++ b/server.go
@@ -172,6 +172,17 @@ type Server struct {
// non zero RequestConfig field values will overwrite the default configs
HeaderReceived func(header *RequestHeader) RequestConfig
+ // DenyRequest is called after recei... | 2 | 2 | 0 | [{"id": "G0", "claim": "Comment lines are missing the space after the `//`, in many places throughout the pull request.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "`DenyRequest` is not a clear name for the new callback and it should maybe be ... | null |
valyala__fasthttp__802 | valyala/fasthttp | 802 | defect | dc6b9db7345d6516c8eaba4d62e2518442c60e1b | 581d32b1c2d651b5a96c38cb7211b8802bf3873e | Make FS return a redirect for directories without trailing slash | Fixes #792 | diff --git a/fs.go b/fs.go
index ca70f729a7..28b34f8b97 100644
--- a/fs.go
+++ b/fs.go
@@ -84,12 +84,16 @@ func ServeFile(ctx *RequestCtx, path string) {
})
if len(path) == 0 || path[0] != '/' {
// extend relative path to absolute path
+ hasTrailingSlash := path[len(path) - 1] == '/'
var err error
if path... | 3 | 2 | 1 | [{"id": "G0", "claim": "The new directory-redirect behavior should have a test case added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new test's failure message for the fs.go case says '/.git' where it should say '/fs.go'.", "category": "testing... | null |
valyala__fasttemplate__19 | valyala/fasttemplate | 19 | defect | 8fcc7a99b5795b7c3e95172237cf93282fc339a9 | 434382f4501da0f7ebb91c99fdf4ccc9deafc2a0 | ExecFuncStringWithErr will not panick when f call returns error | ExecFuncString will panic if f call returns an error. But panic isn't a good choice, why not just return that error to user? To avoid unexpected panic, user must recover before calling ExecFuncString, this is a hidden requirement to call ExecFuncString.
For the sake of not breaking the compatibility, I added two new... | diff --git a/template.go b/template.go
index 9120920..1aafedd 100644
--- a/template.go
+++ b/template.go
@@ -49,6 +49,9 @@ func ExecuteFunc(template, startTag, endTag string, w io.Writer, f TagFunc) (int
ni, err = f(w, unsafeBytes2String(s[:n]))
nn += int64(ni)
+ if err != nil {
+ return nn, err
+ }
s = ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The doc comment above (t *Template) ExecuteFuncStringWithErr should name the function as ExecuteFuncStringWithErr instead of ExecuteFuncString.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The bodies of the already existi... | null |
vanilla-extract-css__vanilla-extract__1044 | vanilla-extract-css/vanilla-extract | 1,044 | defect | 3cf6a631feb42975092aa8d1e968d92ef4828763 | 405f4b82e8d59ce6060556a81a18be94ee4bd9d5 | Expose variants from recipe | Adds variants function to a recipe's runtimeFn.
This is a continuation of #712. | diff --git a/packages/recipes/src/createRuntimeFn.ts b/packages/recipes/src/createRuntimeFn.ts
index 4c0d55c50..3a477e3a2 100644
--- a/packages/recipes/src/createRuntimeFn.ts
+++ b/packages/recipes/src/createRuntimeFn.ts
@@ -19,11 +19,10 @@ const shouldApplyCompound = <Variants extends VariantGroups>(
return true;
... | 2 | 2 | 1 | [{"id": "G0", "claim": "Add a test for the new `variants` function, alongside the existing ones in `tests/recipes/recipes.test.ts`.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The changeset description misspells 'accessing' as 'acessing'; correct it.... | null |
vanilla-extract-css__vanilla-extract__1104 | vanilla-extract-css/vanilla-extract | 1,104 | defect | 001be8338a869f41acf19091707a2e097fd80de3 | ad93a925621fd79623a05243f0f4b9dfea47360d | Expose recipe's class names | Fixes: https://github.com/vanilla-extract-css/vanilla-extract/issues/944 https://github.com/vanilla-extract-css/vanilla-extract/issues/868
Hello, here I tried to expose class names from `recipe` to allow referencing from other styles.
Currently it adds base and variants class names to recipe runtime function:
```
... | diff --git a/packages/recipes/src/createRuntimeFn.ts b/packages/recipes/src/createRuntimeFn.ts
index 3a477e3a2..bcfc542ad 100644
--- a/packages/recipes/src/createRuntimeFn.ts
+++ b/packages/recipes/src/createRuntimeFn.ts
@@ -64,5 +64,10 @@ export const createRuntimeFn = <Variants extends VariantGroups>(
runtimeFn.... | 5 | 4 | 3 | [{"id": "G0", "claim": "Exposing the class names via `recipe.base` may not work because `base` can be an array of classes or be empty, so maybe a warning should be thrown when someone uses the non-existing `base` as a string.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"},... | null |
vanilla-extract-css__vanilla-extract__1114 | vanilla-extract-css/vanilla-extract | 1,114 | defect | e88b6d8e15027757a5601e36b338acde757caa33 | 6c64028a10c76571c835ab8357d11b3e52a93142 | Allow `fontFace` to accept array of font face rules | This PR adds support to the `fontFace` function to accept an array of font face rules that share the same font family name.
Example usage:
```
// text.css.ts
import { fontFace, style } from '@vanilla-extract/css';
const gentium = fontFace([
{
src: 'local("Gentium")',
fontWeight: 'normal',
},
... | diff --git a/.changeset/fontFace-array.md b/.changeset/fontFace-array.md
new file mode 100644
index 000000000..7ded1d6d5
--- /dev/null
+++ b/.changeset/fontFace-array.md
@@ -0,0 +1,26 @@
+---
+'@vanilla-extract/css': minor
+---
+
+Supports passing multiple font face rules to `fontFace`
+
+**Example usage**
+
+```ts
+im... | 1 | 1 | 0 | [{"id": "G0", "claim": "The fontFace function could be simplified by normalizing rule to an array with `const rules = Array.isArray(rule) ? rule : [rule];` and then keeping a single code path below, instead of duplicating the loop for the array and single-rule cases.", "category": "maintainability", "verdict": "support... | null |
vanilla-extract-css__vanilla-extract__1334 | vanilla-extract-css/vanilla-extract | 1,334 | defect | d11976cbbf930a369eb8158c1a2a760e0727f7b5 | 92766041b4332dd7a850099a9abf983744deb4f5 | Playwright config update, move snapshots to their own folder | - update the playwright config to add a custom `snapshotPathTemplate` for snapshots, which also removes the need for the `_autoSnapshotSuffix` workaround.
- move the snapshots to the new `e2e/snapshots` dir
Note: this PR is part of future changes required for next e2e testing (https://github.com/vanilla-extract-css... | diff --git a/playwright.config.ts b/playwright.config.ts
index c80abee74..0f94235f2 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -1,9 +1,9 @@
-import { PlaywrightTestConfig, devices } from '@playwright/test';
+import { PlaywrightTestConfig, defineConfig } from '@playwright/test';
// Prevent Vite f... | 1 | 1 | 0 | [{"id": "G0", "claim": "Putting the hyphen inside the curly brackets in the project-level snapshotPathTemplate ('{testFileDir}/{testFileName}-snapshots/{arg}{-projectName}{ext}') looks unintentional, and since this project's name is an empty string the {projectName} token is redundant and should be removed (suggested: ... | null |
vanilla-extract-css__vanilla-extract__1431 | vanilla-extract-css/vanilla-extract | 1,431 | defect | 28df959c1d407c0ae03b8dc2d5363de60513d4ff | 9a0c6898e02ffe54c8455110ac0a7adecb334acc | Fixed composedClassLists breaking order | Closes #1430
This PR achieves this by doing the following:
- Changing scanModule to be a recursive function that always keeps the dependencies last in the array order
- Building up the provided classlist based on the module id, so that it's always in order
The way that I did these things might not be to the ... | diff --git a/.changeset/late-icons-protect.md b/.changeset/late-icons-protect.md
new file mode 100644
index 000000000..4854d8bb5
--- /dev/null
+++ b/.changeset/late-icons-protect.md
@@ -0,0 +1,5 @@
+---
+"@vanilla-extract/integration": patch
+---
+
+Fixed composedClassLists breaking order
diff --git a/packages/integrat... | 6 | 5 | 4 | [{"id": "G0", "claim": "The pull request's ordering change broke existing tests, and the author asks whether they reflect real issues or should simply be updated to match the new order.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "With the fix applied... | null |
vanilla-extract-css__vanilla-extract__1450 | vanilla-extract-css/vanilla-extract | 1,450 | defect | 28df959c1d407c0ae03b8dc2d5363de60513d4ff | 9299c73200763df80adbf7c998a121ac6a6cad1d | Add createViewTransition function | View transitions are starting to get more support and it would be nice to use the same API style from `createContainer` to create locally scoped view transition names.
This PR adds a `createViewContainer` function with a `name` arg and an optional `debugId` arg.
Definitely open to suggestions on naming here - sim... | diff --git a/packages/babel-plugin-debug-ids/src/index.test.ts b/packages/babel-plugin-debug-ids/src/index.test.ts
index 61eb3d87d..4cefbae67 100644
--- a/packages/babel-plugin-debug-ids/src/index.test.ts
+++ b/packages/babel-plugin-debug-ids/src/index.test.ts
@@ -230,6 +230,19 @@ describe('babel plugin', () => {
... | 6 | 6 | 2 | [{"id": "G0", "claim": "The name suffix appended to the identifier gives little benefit and sticks around in production styles, so createViewTransition should be basically identical to the createContainer function (drop the named suffix).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "intro... | null |
vanilla-extract-css__vanilla-extract__1466 | vanilla-extract-css/vanilla-extract | 1,466 | defect | 96dd466127374b21ad7e48e5dd168a03a96af047 | b772e145cbb39edc0d9bab423bca8ae4cc359d75 | perf: Speed up dev prefix generation for long file paths | TL;DR: Replacing a greedy regex with a custom splitting function is ~12,000x faster in some cases. (Local dev) Cold start times decreased by over 50% in pnpm applications.
## The Problem
Across various internal applications, we noticed a sizeable regression in local dev start time when moving from yarn v1 to pnpm... | diff --git a/.changeset/lemon-colts-allow.md b/.changeset/lemon-colts-allow.md
new file mode 100644
index 000000000..035f086f3
--- /dev/null
+++ b/.changeset/lemon-colts-allow.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/css': patch
+---
+
+Speed up dev prefix generation for long file paths
diff --git a/packages/css/src/... | 1 | 1 | 0 | [{"id": "G0", "claim": "The unbounded memoization Map could leak memory slowly in a dev server, so an LRU cache (e.g. lru-cache) should be considered.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
vanilla-extract-css__vanilla-extract__1702 | vanilla-extract-css/vanilla-extract | 1,702 | defect | 9e7a583c935580690062081e93cb297eb0f4fc29 | 387b4a3b8d2c4df03a0f5ce3e6354d1506d45271 | fix: allow :where and :is in selectors when they only target & | Fixes https://github.com/vanilla-extract-css/vanilla-extract/issues/1683
Pulls the main selector validation logic out to a separate function, so it can call itself recursively for the selectors within `:where(...)` and `:is(...)`. Changed the logic so the function returns true/false instead of throwing. Maybe there'... | diff --git a/.changeset/mighty-ravens-fail.md b/.changeset/mighty-ravens-fail.md
new file mode 100644
index 000000000..f9d460fd0
--- /dev/null
+++ b/.changeset/mighty-ravens-fail.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/css': patch
+---
+
+Allow :where and :is in selectors if all selectors target &
diff --git a/packa... | 2 | 2 | 0 | [{"id": "G0", "claim": "The changeset for @vanilla-extract/css should declare a minor version bump instead of patch.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The changeset description should be reworded to 'Allow `:where` and `:is` in `selec... | null |
vanilla-extract-css__vanilla-extract__276 | vanilla-extract-css/vanilla-extract | 276 | defect | 38376b38c8260f50ccdb460c803e5efc5a052d4b | fb62de6a62036f1d9cbd392e2d9597ed20388936 | Replace Dynamic API with `assignInlineVars` and `setElementVars` | See changeset for details.
Closes #245. | diff --git a/.changeset/clever-vans-prove.md b/.changeset/clever-vans-prove.md
new file mode 100644
index 000000000..15496607b
--- /dev/null
+++ b/.changeset/clever-vans-prove.md
@@ -0,0 +1,102 @@
+---
+'@vanilla-extract/dynamic': major
+---
+
+Add `assignInlineVars` and `setElementVars` functions
+
+**assignInlineVars... | 2 | 2 | 0 | [{"id": "G0", "claim": "The repeated inline object type `{ [cssVarName: string]: string }` could be replaced with the existing `Styles` type alias.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The hard-coded `substr` logic for stripping the CS... | null |
vanilla-extract-css__vanilla-extract__376 | vanilla-extract-css/vanilla-extract | 376 | defect | 0ac48dd20a1c34d110932cb8c9fd58d181a30bd5 | 488f7562a692d3ed0bd9869ab53fff5efe492801 | Add RecipeVariants type to get variants from recipes | # Description
Add `RecipeVariants` type to get variants from a recipe.
This type would help consumers easily get the variants type. Useful for typing their components:
```tsx
const textRecipes = recipe({
variants: {
size: {
small: { fontSize: '12px' },
medium: { fontSize: '16px' },
... | diff --git a/.changeset/rare-lemons-study.md b/.changeset/rare-lemons-study.md
new file mode 100644
index 000000000..fc1e45924
--- /dev/null
+++ b/.changeset/rare-lemons-study.md
@@ -0,0 +1,31 @@
+---
+'@vanilla-extract/recipes': patch
+---
+
+Add `RecipeVariants` type to get variants from a recipe.
+
+This type would ... | 6 | 6 | 1 | [{"id": "G0", "claim": "The docs comment should say the shown type is \"a type equivalent to\" rather than \"a similar type to\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docs example's resulting type is wrong: the color and size propert... | null |
vanilla-extract-css__vanilla-extract__391 | vanilla-extract-css/vanilla-extract | 391 | defect | a9b7905a535c10c1e9b0ca3655e65580c6e572ee | 00083b91ee0cace269999ec2710e7a4b856d05e4 | Handle pre-compiled `createTheme` destructuring in Babel plugin | Fixes #369 | diff --git a/.changeset/flat-colts-cheer.md b/.changeset/flat-colts-cheer.md
new file mode 100644
index 000000000..9d0f953f6
--- /dev/null
+++ b/.changeset/flat-colts-cheer.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/babel-plugin': patch
+---
+
+Handle array destructuring from `createTheme` when it's already been compil... | 2 | 1 | 0 | [{"id": "G0", "claim": "The two-step callee check could be shortened to `t.isIdentifier(themeDeclarator.init.callee, { name: 'createTheme' })`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The code should consider checking whether the destruct... | null |
vanilla-extract-css__vanilla-extract__706 | vanilla-extract-css/vanilla-extract | 706 | defect | ac8ad84310f4132029c32b2f46585b36a2662b8f | aba6338ea7b817ae6380e4425da0fbccd368f12a | vite/rollup: Return empty sourcemaps | Fixes #699
This suppresses the warnings in vite and rollup.
I'm not sure this is really what we want though. Logically this is wrong and the warning actually is correct. | diff --git a/.changeset/rich-bobcats-teach.md b/.changeset/rich-bobcats-teach.md
new file mode 100644
index 000000000..539a0eade
--- /dev/null
+++ b/.changeset/rich-bobcats-teach.md
@@ -0,0 +1,6 @@
+---
+'@vanilla-extract/rollup-plugin': minor
+'@vanilla-extract/vite-plugin': minor
+---
+
+Suppress empty sourcemap warn... | 2 | 1 | 0 | [{"id": "G0", "claim": "The changeset should declare a 'patch' bump for both @vanilla-extract/rollup-plugin and @vanilla-extract/vite-plugin instead of 'minor'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Asks whether `null` is handled differen... | null |
vanilla-extract-css__vanilla-extract__810 | vanilla-extract-css/vanilla-extract | 810 | defect | bfde2e5f4b65a1d652a85dc70fc236cad9889bf6 | 39c6774cd2026bad2f72e26d3cfbcc90caa96a21 | Use standard identifier generation logic for variable names | I was getting errors during development when my variable names contained spaces. Turns out it's because we weren't handling variable identifiers the same as everything else, instead manually reimplementing the `generateIdentifier` logic but forgetting to replace spaces with underscores.
To fix this, I've refactored ... | diff --git a/.changeset/gold-trainers-sing.md b/.changeset/gold-trainers-sing.md
new file mode 100644
index 000000000..e936bf8ed
--- /dev/null
+++ b/.changeset/gold-trainers-sing.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/css': patch
+---
+
+Fix spaces in debug IDs for variable names.
diff --git a/.changeset/hungry-tie... | 2 | 1 | 1 | [{"id": "G0", "claim": "The file-name regex should also match `.cjs` and `.mjs` file scopes, since it failed to match those extensions in practice.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The generateIdentifier overloads seem unnecessary sinc... | null |
vanilla-extract-css__vanilla-extract__837 | vanilla-extract-css/vanilla-extract | 837 | defect | b53558a3872987282b23d62b0063e4d789a379f9 | 559ec68dcaa4386bfeb489c41c120e67cda9a256 | Improve performance of transformCss with large amounts of class names | When creating `.css.ts` files with large amounts of locally scoped classes, commonly encountered when using sprinkles, CSS output could be slow to create due to how selectors are transformed with large dynamic regular expressions. This issue was especially prevalent on M1 Macs.
To resolve this, the old regular expr... | diff --git a/.changeset/ninety-windows-marry.md b/.changeset/ninety-windows-marry.md
new file mode 100644
index 000000000..1f2a62b10
--- /dev/null
+++ b/.changeset/ninety-windows-marry.md
@@ -0,0 +1,7 @@
+---
+'@vanilla-extract/css': patch
+---
+
+Improve performance of selector transforms
+
+This issue was especially ... | 4 | 1 | 0 | [{"id": "G0", "claim": "Since the cssesc(..., { isIdentifier: true }) escaping logic now appears in two places, an escapeIdentifier function should be created so the two copies cannot drift apart.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "I... | null |
vanilla-extract-css__vanilla-extract__970 | vanilla-extract-css/vanilla-extract | 970 | defect | 35ce450765a07819ffc974e6c43d90cda37421c9 | de848cbfeb79ec1cf22ed6ad0180eb1baef9cf75 | Update addFileScope to handle commonjs source files | I think this should address the issues noted in #940 and #850 and #963
In my case, I had `.css.js` files in `node_modules` that looked something like this:
```js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
const _css = require('@vanilla-extract/css');
var myStyle = _... | diff --git a/.changeset/pink-experts-design.md b/.changeset/pink-experts-design.md
new file mode 100644
index 000000000..01146e582
--- /dev/null
+++ b/.changeset/pink-experts-design.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/integration': patch
+---
+
+Updated addFileScope to work with CommonJS files
diff --git a/packa... | 2 | 2 | 0 | [{"id": "G0", "claim": "The pull request should add a changeset describing the change so nothing blocks merging.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR should use a tested library such as hasESMSyntax from mlly instead of its own re... | null |
vanilla-extract-css__vanilla-extract__996 | vanilla-extract-css/vanilla-extract | 996 | defect | d9db9bf7a638f8ec9ba1d1518b2a5be47352f397 | d4b1114a3627b23e1a985e028c517b48a15f6589 | Allow shared variables between exports | Fixes #995 | diff --git a/.changeset/short-students-itch.md b/.changeset/short-students-itch.md
new file mode 100644
index 000000000..562812d22
--- /dev/null
+++ b/.changeset/short-students-itch.md
@@ -0,0 +1,5 @@
+---
+'@vanilla-extract/integration': patch
+---
+
+Improve vanilla module serialization by allowing shared varaiables ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The 'should re-use exports in handle serialized function args' test should also cover non-default exports.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'should re-use exports if possible' test should also cover a re-used de... | null |
vanjs-org__van__449 | vanjs-org/van | 449 | defect | d09cfd1e1e3b5ea7cf8d0a9b5deacca4c0946fb4 | d80b53121e023046a53d0a6d5e349239a716dfb4 | feat(addons): add vanjs-prerender | Reasons:
- Alternative to `minivan` and `van-plate`
- Prerender van components on local env like `node`, `bun`, and `deno` (On browser, `outerHTML` can be used instead)
Notes:
- Examples can be see through `test/node/van.prerender.test.js`. (On system, run `node test/node/van.prerender.js` to test)
**Edit**: U... | diff --git a/package.json b/package.json
index 0b42e29d..0a70d8fe 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,8 @@
"files": [
"src/van.js",
"src/van.d.ts",
+ "src/van.prerender.js",
+ "src/van.prerender.d.ts",
"src/van.debug.js",
"src/van.debug.d.ts"
],
@@ -12,6 +14,7 @@
"... | 2 | 1 | 0 | [{"id": "G0", "claim": "The reviewer questions why prerender overrides the global setTimeout by default (opts.overrideSetTimeout defaults to 1) instead of leaving it alone.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tao-VanJS asks the author to add t... | null |
vanna-ai__vanna__354 | vanna-ai/vanna | 354 | defect | fe2d4396c2ca946790895b441dbefa65c5af890f | 07fa73a546b2f016b6bacc2e0b145a1c46fc8bd1 | parameterized the number of documentation documents to be retrieved | I am working with ChromaDB with many small documentation documents and need to increase the number of retrieved documentation documents from the vectorstore.
it would be useful to also be able to parameterize the number of documentation documents to be retrieved from the vectorstore
fixes #353 | diff --git a/src/vanna/chromadb/chromadb_vector.py b/src/vanna/chromadb/chromadb_vector.py
index ffb93de6c..994c5070d 100644
--- a/src/vanna/chromadb/chromadb_vector.py
+++ b/src/vanna/chromadb/chromadb_vector.py
@@ -22,7 +22,8 @@ def __init__(self, config=None):
self.embedding_function = config.get("embedding... | 1 | 1 | 1 | [{"id": "G0", "claim": "Separate configuration parameters for the number of SQL pairs and documentation chunks retrieved should be added so the two can take different values, with n_results kept for backward compatibility as the fallback that per-type settings override.", "category": "design", "verdict": "supported", "... | null |
vanniktech__OnActivityResult__86 | vanniktech/OnActivityResult | 86 | defect | 0eaf904c23b98ef263049af8cb10d64c2f2c0aff | 9225a5b6a488996ab6bc921afa943d895b37a35f | Support user defined result code | Support user defined result code.
There is `Activity.RESULT_FIRST_USER` which can create user defined result code.
https://developer.android.com/reference/android/app/Activity.html#RESULT_FIRST_USER
I want to use it and return a result code.
If you agree with this proposal, I will fix the test code.
## Exa... | diff --git a/onactivityresult-compiler/src/main/java/onactivityresult/compiler/OnActivityResultProcessor.java b/onactivityresult-compiler/src/main/java/onactivityresult/compiler/OnActivityResultProcessor.java
index 014c010..22dd9f0 100644
--- a/onactivityresult-compiler/src/main/java/onactivityresult/compiler/OnActivit... | 2 | 2 | 0 | [{"id": "G0", "claim": "The result code validity check added to OnActivityResultProcessor could be simplified to just `if (filterResultCode < RESULT_OK)` instead of the three-clause condition.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The R... | null |
vanvalenlab__deepcell-tf__282 | vanvalenlab/deepcell-tf | 282 | defect | 89c12db7db085d01531b595147720504cb454ca0 | 135036ff8bac5e5396ea8e82a12616dae3e023d7 | Modified featurenet to include temporal features that can be residuals | - Temporal features include `Conv3D` (previous standard), `None`, `ConvGRU2D` and `ConvLSTM2D`
- Added new parameters including:
1. `temporal` - the mode of temporal feature, which is either None, `'conv'`, `'gru'` or `'lstm'`
2. `residual` - whether the temporal feature is a residual or not (`True` or `False`). If ... | diff --git a/deepcell/model_zoo/featurenet.py b/deepcell/model_zoo/featurenet.py
index c5ad26ab0..9e0821b9a 100644
--- a/deepcell/model_zoo/featurenet.py
+++ b/deepcell/model_zoo/featurenet.py
@@ -33,9 +33,9 @@
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.models import Sequential, M... | 5 | 5 | 2 | [{"id": "G0", "claim": "The new code in featurenet.py has whitespace/PEP8 issues and should pass `python3 -m pytest --pep8 deepcell/model_zoo/featurenet.py`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "An unrecognized `mode` value (e.g. a typ... | null |
vanvalenlab__deepcell-tf__286 | vanvalenlab/deepcell-tf | 286 | defect | 89c12db7db085d01531b595147720504cb454ca0 | e12f3feeb0effda56d8b8c8d04f6311dffb0545f | Speeding up the pixel transform | The current implementation of the pixel transform first identifies all unique label IDs in all stacks of training images, then loops over each ID, then over each crop.
The current implementation of the watershed transform instead first loops over each crop, then identifies the unique cell IDs within each crop, and ... | diff --git a/deepcell/image_generators/__init__.py b/deepcell/image_generators/__init__.py
index 0bc8aa4e8..0e3916813 100644
--- a/deepcell/image_generators/__init__.py
+++ b/deepcell/image_generators/__init__.py
@@ -92,10 +92,25 @@ def _transform_masks(y, transform, data_format=None, **kwargs):
if transform == 'p... | 3 | 3 | 2 | [{"id": "G0", "claim": "The refactored pixelwise transform is not passing the test_pixelwise_transform_2d and test_pixelwise_transform_3d tests in deepcell/utils/transform_utils_test.py.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "pixelwise_transform... | null |
vanvalenlab__deepcell-tf__295 | vanvalenlab/deepcell-tf | 295 | defect | 7e349a70ed131a338dbccf403dc3f2f36c0caeb9 | e610dadb23172457b6e161800e633e7a1238cfff | fix pixel transform bug | When I modified the pixel transform for #286, I accidentally removed two layers of the for loop. I should have just removed the first. This resulted in only the last cell in each crop being transformed, rather than every cell in the crop. Closes #294 | diff --git a/deepcell/utils/transform_utils.py b/deepcell/utils/transform_utils.py
index f2e3d1646..48d1a2dad 100644
--- a/deepcell/utils/transform_utils.py
+++ b/deepcell/utils/transform_utils.py
@@ -69,8 +69,9 @@ def pixelwise_transform(mask, dilation_radius=None, data_format=None,
for cell_label in np.unique(ma... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add a small test to check for this pixel transform failure so the bug will not pop up again.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
vanvalenlab__deepcell-tf__342 | vanvalenlab/deepcell-tf | 342 | defect | 2d019485edff146ccdac4671b10034d4650f0fe4 | eceb3981fa31b0c9e2ee688706a5e92070bf4100 | Expand metrics package functionality | ## What
* metrics now tests for correctness of assigned error types rather than just lack of run-time errors
* metrics now returns the label ID of cells assigned to each category
* metrics now plots the segmentation mask of all cells in the crop, color-coded by the error type
* metrics now automatically adds small ... | diff --git a/deepcell/metrics.py b/deepcell/metrics.py
index 3ca4493ac..63c4421d8 100644
--- a/deepcell/metrics.py
+++ b/deepcell/metrics.py
@@ -55,7 +55,8 @@
from scipy.optimize import linear_sum_assignment
-import skimage.io
+import matplotlib as mpl
+import matplotlib.pyplot as plt
from skimage.measure import ... | 14 | 14 | 1 | [{"id": "G0", "claim": "The ObjectAccuracy class docstring should document the new force_event_links parameter and describe in the general description when a user would want to use it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "self.merge_indi... | null |
vanvalenlab__deepcell-tf__344 | vanvalenlab/deepcell-tf | 344 | defect | 902d4a9c5a3d9b24ad9417a76e0624d50083961b | d90e390812982e52852f4a854d2e7012e1be2ad3 | Training on multiple labels of the same image | ## What
Modified SemanticDataLoader to take y and y_2 labels, apply separate set of transforms to y2.
## Why
Allows network to be trained with different labels.
First attempt at training a deep watershed network worked as expected! You can see that it's predicting a slightly more narrow, nucleus-focused range... | diff --git a/deepcell/image_generators/image_generators_test.py b/deepcell/image_generators/image_generators_test.py
index ad9675b01..cf7bf2bd1 100644
--- a/deepcell/image_generators/image_generators_test.py
+++ b/deepcell/image_generators/image_generators_test.py
@@ -38,6 +38,7 @@
from tensorflow.python.platform impo... | 4 | 3 | 1 | [{"id": "G0", "claim": "A list of lists would be preferable to the `transforms_y2` parameter, which only really solves the problem for 2 labels rather than for 'multiple labels'.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "There may be hidden `y_true[... | null |
vanvalenlab__deepcell-tf__365 | vanvalenlab/deepcell-tf | 365 | defect | 890b7cd85983eb2811c5b0689431267df6e5f66e | 19645352166b7b84acc657b16313104de619d46a | Fix interpolation and add support for training 3D PanopticNet models | ## What
Fixed issue with interpolation and added support for training 3D models.
## Why
The presence of the interpolation flag prevented the creation of 3D models. This pull request fixes that issue and also adds generators and transforms for time series data.
---
Fixes #362
| diff --git a/deepcell/image_generators/__init__.py b/deepcell/image_generators/__init__.py
index c583fb992..7e3449614 100644
--- a/deepcell/image_generators/__init__.py
+++ b/deepcell/image_generators/__init__.py
@@ -154,7 +154,7 @@ def _transform_masks(y, transform, data_format=None, **kwargs):
y_transfor... | 14 | 14 | 4 | [{"id": "G0", "claim": "SemanticIterator.flow should keep passing save_to_dir, save_prefix and save_format to the SemanticIterator constructor instead of dropping them (save_format was still missing after the earlier restore).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
vanvalenlab__deepcell-tf__370 | vanvalenlab/deepcell-tf | 370 | defect | 890b7cd85983eb2811c5b0689431267df6e5f66e | 1b6ca5d5573ddda361e4782390d16ce993a320d2 | PanopticNet Updates | ## What
Updates example notebook with new loss generator code, adds checks for invalid input sizes.
Closes #367, closes #368 | diff --git a/deepcell/model_zoo/panopticnet.py b/deepcell/model_zoo/panopticnet.py
index 74ad75499..8ae825f8c 100755
--- a/deepcell/model_zoo/panopticnet.py
+++ b/deepcell/model_zoo/panopticnet.py
@@ -326,6 +326,15 @@ def PanopticNet(backbone,
'from {}.'.format(temporal_mode,
... | 4 | 4 | 2 | [{"id": "G0", "claim": "The pull request rewrites every line of deepcell/model_zoo/panopticnet.py, apparently because of line-ending characters, and the file's original line endings should be preserved.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai... | null |
vanvalenlab__deepcell-tf__371 | vanvalenlab/deepcell-tf | 371 | defect | 890b7cd85983eb2811c5b0689431267df6e5f66e | 583051d976fce38428de3146d2f37590ed40d3c8 | Multiplex application | ## What
* Add in an application for multiplex segmentation
* Modify existing application setup to use new version of resize which preserves labels
## Why
* Adds ability to use current version of multiplex model
| diff --git a/deepcell/applications/__init__.py b/deepcell/applications/__init__.py
index 0dc925184..971f67e92 100644
--- a/deepcell/applications/__init__.py
+++ b/deepcell/applications/__init__.py
@@ -31,6 +31,7 @@
from deepcell.applications.application import Application
from deepcell.applications.cytoplasm_segmen... | 8 | 7 | 4 | [{"id": "G0", "claim": "The Returns section of the MultiplexSegmentation.predict docstring lists the outputs in the wrong order (model output before labeled image) and should match the order of the actual outputs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G... | null |
vanvalenlab__deepcell-tf__373 | vanvalenlab/deepcell-tf | 373 | defect | 2d9c09430ce29df8fdfb3a5fb865ef6a9495eed5 | 51a4c2333965f866a0facad352364382739b2944 | Correct calculation of image size for rescale | ## What
* Correct calculation of image size for rescale in application objects
## Why
* The original calculation was the inverse of what it should have been
| diff --git a/deepcell/applications/application.py b/deepcell/applications/application.py
index c8941b3fc..d944819d4 100644
--- a/deepcell/applications/application.py
+++ b/deepcell/applications/application.py
@@ -104,8 +104,8 @@ def _resize_input(self, image, image_mpp):
# Don't scale the image if mpp is the s... | 1 | 1 | 1 | [{"id": "G0", "claim": "Include a new test for `_resize_input` that tests the correct calculation.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
vanvalenlab__deepcell-tf__376 | vanvalenlab/deepcell-tf | 376 | defect | 2f58690bb0b0367622bf406d7c8d50ebec3ed359 | cf9ae9fe734b48014404d437bf46fb70bd37e07d | Simplify transform names | ## What
* Changed the transform names to 'pixelwise', 'fgbg', 'inner-distance', and 'outer-distance'
## Why
* The number of transforms in the library was getting too large. Further, there was no consistent naming convention, which made them hard to use.
| diff --git a/deepcell/image_generators/__init__.py b/deepcell/image_generators/__init__.py
index 7e3449614..60e1e1bb5 100644
--- a/deepcell/image_generators/__init__.py
+++ b/deepcell/image_generators/__init__.py
@@ -67,12 +67,10 @@ def _transform_masks(y, transform, data_format=None, **kwargs):
valid_transforms =... | 1 | 1 | 1 | [{"id": "G0", "claim": "It might be useful to continue to support the old transform names ('deepcell', 'watershed', 'watershed-cont', 'centroid') so previous notebooks don't break, while warning that they are deprecated.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.