Skip to content

Conversation

@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented Nov 5, 2024

A followup to #9230, this PR does some internal refactoring of fetchMap() to reduce the (repeated) use of optional parameters with defaults imported from SOURCE_DEFAULTS, and tries to decouple the file somewhat from the baseSource() implementation. User-facing API is unchanged.

It probably also makes sense to move this function into @carto/api-client at some point, but I don't think we're ready to tackle that for v9.1.

@coveralls
Copy link

coveralls commented Nov 5, 2024

Coverage Status

coverage: 91.661% (+0.03%) from 91.63%
when pulling 29fc5fc on donmccurdy/carto-fetchmap-v9.1
into b01b47e on master.

clientId = SOURCE_DEFAULTS.clientId,
headers = {},
clientId,
headers,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a change of behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not "intended" to be a change of behavior (the defaults should be populated downstream, once, not in multiple places like they were here) but I do want to do a bit more testing to confirm this before merging. 👍🏻

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on test/apps/carto-map, no changes found compared to 9.0-release. There is one failing map...

b8abc46c-3c7f-489f-b16f-0664872ad82a

... but it also fails on 9.0.

@felixpalmer felixpalmer mentioned this pull request Dec 4, 2024
45 tasks
@donmccurdy donmccurdy force-pushed the donmccurdy/carto-fetchmap-v9.1 branch from 18a00ba to 342c815 Compare December 4, 2024 21:51
@donmccurdy donmccurdy marked this pull request as ready for review December 4, 2024 21:51
@donmccurdy
Copy link
Collaborator Author

Updated to @carto/[email protected] stable release.

@donmccurdy donmccurdy force-pushed the donmccurdy/carto-fetchmap-v9.1 branch from 342c815 to 29fc5fc Compare December 5, 2024 18:53
@donmccurdy donmccurdy merged commit 442108a into master Dec 5, 2024
4 checks passed
@donmccurdy donmccurdy deleted the donmccurdy/carto-fetchmap-v9.1 branch December 5, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants