-
-
Notifications
You must be signed in to change notification settings - Fork 97
enhance: Allow schema import directly - not just { schema } #3706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 58d33a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Size Change: 0 B Total Size: 79.8 kB ℹ️ View Unchanged
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3706 +/- ##
=======================================
Coverage 98.13% 98.13%
=======================================
Files 150 150
Lines 2735 2736 +1
Branches 537 537
=======================================
+ Hits 2684 2685 +1
Misses 11 11
Partials 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
59352c0 to
1975af8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Details
| Benchmark suite | Current: 58d33a9 | Previous: 7b4337a | Ratio |
|---|---|---|---|
normalizeLong |
444 ops/sec (±0.93%) |
447 ops/sec (±1.37%) |
1.01 |
normalizeLong Values |
404 ops/sec (±0.14%) |
417 ops/sec (±0.20%) |
1.03 |
denormalizeLong |
289 ops/sec (±2.92%) |
295 ops/sec (±2.23%) |
1.02 |
denormalizeLong Values |
267 ops/sec (±2.06%) |
269 ops/sec (±2.15%) |
1.01 |
denormalizeLong donotcache |
1039 ops/sec (±0.13%) |
1026 ops/sec (±0.23%) |
0.99 |
denormalizeLong Values donotcache |
777 ops/sec (±0.34%) |
766 ops/sec (±0.19%) |
0.99 |
denormalizeShort donotcache 500x |
1570 ops/sec (±0.15%) |
1596 ops/sec (±0.14%) |
1.02 |
denormalizeShort 500x |
858 ops/sec (±2.23%) |
872 ops/sec (±1.83%) |
1.02 |
denormalizeShort 500x withCache |
6565 ops/sec (±0.18%) |
6594 ops/sec (±0.16%) |
1.00 |
queryShort 500x withCache |
2763 ops/sec (±0.10%) |
2789 ops/sec (±0.09%) |
1.01 |
buildQueryKey All |
50899 ops/sec (±0.17%) |
52616 ops/sec (±0.16%) |
1.03 |
query All withCache |
7341 ops/sec (±0.12%) |
7849 ops/sec (±0.25%) |
1.07 |
denormalizeLong with mixin Entity |
279 ops/sec (±2.33%) |
285 ops/sec (±2.29%) |
1.02 |
denormalizeLong withCache |
7044 ops/sec (±0.14%) |
7246 ops/sec (±0.19%) |
1.03 |
denormalizeLong Values withCache |
5160 ops/sec (±0.12%) |
5099 ops/sec (±0.16%) |
0.99 |
denormalizeLong All withCache |
7103 ops/sec (±0.12%) |
7480 ops/sec (±0.20%) |
1.05 |
denormalizeLong Query-sorted withCache |
7343 ops/sec (±0.25%) |
7822 ops/sec (±0.38%) |
1.07 |
denormalizeLongAndShort withEntityCacheOnly |
1728 ops/sec (±0.27%) |
1694 ops/sec (±0.19%) |
0.98 |
getResponse |
4782 ops/sec (±0.69%) |
4711 ops/sec (±0.73%) |
0.99 |
getResponse (null) |
10365358 ops/sec (±1.03%) |
10666527 ops/sec (±1.05%) |
1.03 |
getResponse (clear cache) |
268 ops/sec (±2.01%) |
271 ops/sec (±2.04%) |
1.01 |
getSmallResponse |
3378 ops/sec (±0.16%) |
3306 ops/sec (±0.21%) |
0.98 |
getSmallInferredResponse |
2530 ops/sec (±0.34%) |
2551 ops/sec (±0.11%) |
1.01 |
getResponse Collection |
4667 ops/sec (±0.53%) |
4528 ops/sec (±0.30%) |
0.97 |
get Collection |
4649 ops/sec (±0.23%) |
4574 ops/sec (±0.52%) |
0.98 |
get Query-sorted |
5374 ops/sec (±0.16%) |
5296 ops/sec (±0.25%) |
0.99 |
setLong |
444 ops/sec (±0.22%) |
465 ops/sec (±0.14%) |
1.05 |
setLongWithMerge |
256 ops/sec (±0.28%) |
261 ops/sec (±0.17%) |
1.02 |
setLongWithSimpleMerge |
271 ops/sec (±0.15%) |
275 ops/sec (±0.87%) |
1.01 |
setSmallResponse 500x |
952 ops/sec (±0.14%) |
947 ops/sec (±0.27%) |
0.99 |
This comment was automatically generated by workflow using github-action-benchmark.
a77627f to
fe7673b
Compare
fe7673b to
58d33a9
Compare
Motivation
Previously, schema classes like
Union,Collection,Query, etc. could only be imported via theschemanamespace:This adds an extra namespace that isn't necessary and makes imports more verbose. Users requested the ability to import these classes directly for cleaner, more intuitive imports.
Solution
Added direct exports for all schema classes (
Union,Invalidate,Collection,Query,Values,All) from@data-client/endpoint. These are now available as named exports alongside the existingschemanamespace export, which remains available for backward compatibility.The change is purely additive - no breaking changes. Users can now choose between:
Since
@data-client/restre-exports everything from@data-client/endpoint, these direct imports also work from@data-client/rest.Technical details:
packages/endpoint/src/index.tsfor all schema classes exceptObjectandArray(which are type-only)