-
Notifications
You must be signed in to change notification settings - Fork 119
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
refactor: remove common-types entirely (and move typings into whatever package makes the most sense) #515
Conversation
After consolidating all items/groups/sharing into https://github.com/Esri/arcgis-rest-js/search?q=isLocationArray&unscoped_q=isLocation But My first question is that I'm not 100% sure that a TS project will automagically get the types of a transitive dependency. We'd need to test that before going ahead w/ this approach. TBH - I'm a little more into the idea of going back to putting our common types in My next question is, if someone needed to use the fns in Maybe we should get rid of |
they definitely do. i confirmed by npm installing 'terraformer-arcgis-parser',
i did that in #512
they'd need to
that's the whole point. so far its just been a placeholder package and we've stuffed extra methods like |
Just to make sure I understand, that screen shot is from a package that installed Even if so, I don't like it (sorry). Ever since embroider-build/ember-auto-import#95 (comment) I've been following Edward Faulkner's philosophy of:
Which, as he says, leaves 2 options if you want to allow consuming packages to use what's in your own dependencies:
That goes for both the types and the fns. The whole reason we're doing this PR is to further reduce the number of All in all, I wonder if sparing our users an extra |
how do you feel about making this change @patrickarlt? |
we can hide the fact that typings and common utilities are housed in a shared package by AFFECTS PACKAGES: @esri/arcgis-rest-feature-service @esri/arcgis-rest-geocoder @esri/arcgis-rest-portal @esri/arcgis-rest-routing
f2fb9d5
to
c36c468
Compare
I'm with @tomwayson on this one. I've been bitten by the weird trick of requiring or importing something I didn't explicitly I don't think the extra burden of a peerDep install is all that bad. @tomwayson it is worth noting that common will have |
yeah, If we want to get rid of one more |
fair enough. my preference would be to:
if that works for you @patrickarlt, just say the word and i will make it so. |
I'd also be fine w/ putting the types in |
the only reason i'm not keen on placing the types in |
Just thinking out loud, but what if |
@jgravois sounds like a good idea to me. Maybe rename |
for better or worse, some folks just want to make requests, so i think there's a benefit to making sure its in the name of our core package. how about this?
|
I like |
My only thought with |
@noahmulfinger do you think that we should re-export all common types from the respective packages then? That wouldn't add any weight to the builds and it would avoid a separate install? For example in the new export { IItem /* re-export all the types used in portal */ } from "@esri-arcgis-rest-types" |
@jgravois or do we just try to move everything out of common-types and into its respective package now that we are combining most things into |
i think we could get away without it. i'll take a look. |
Trying to move stuff into the respective packages definitely seems like a better option than re-exporting types. I imagine it would be easy to forget exports, and it might complicate the doc build. |
alright, i've pushed up a couple more commits:
import { IPoint, ILocation } from "@esri/arcgis-rest-request/src"; i'm going to merge this work and then get #508 in sync with |
while we're preparing to release v2.0.0, i'd like to take the opportunity to make
common
an actual (non-external) dependency ofportal
,feature-service
,geocoder
androuting
, instead of an externalpeerDependency
.peerDependency
warnings asking them to install another package they don't need.instead of
AFFECTS PACKAGES:
@esri/arcgis-rest-feature-service
@esri/arcgis-rest-geocoder
@esri/arcgis-rest-portal
@esri/arcgis-rest-routing