Skip to content
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

feat(hub-common): add minimal definitions of ArcGIS types and drop arcgis-js-api #1797

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

tomwayson
Copy link
Member

@tomwayson tomwayson commented Feb 7, 2025

  1. Description:

We were using @types/arcgis-js-api, which has been deprecated and effectively stopped being published as of version 4.31.

They recommend that we use the types from @arcgis/core instead, and I tried that and it worked up until version 4.31, but using the 4.32 rc I see all kinds of type errors when running Karma tests (which still pass). The other downside of using @arcgis/core types is that b/c this repo uses tslint instead of eslint, we can't use @typescript-eslint/no-restricted-imports to ensure that devs do not accidentally bloat the build by importing more than just the types.

We only use the ArcGIS types in a couple of places, so I thought, for now we can just replace those types w/ any a minimal definition of the types we need.

  1. Instructions for testing:

  2. Closes Issues: # (if appropriate)

  3. Updated meaningful TSDoc to methods including Parameters and Returns, see Documentation Guide

  4. used semantic commit messages

  5. [x PR title follows semantic commit format (CRITICAL if the title is not in a semantic format, the release automation will not run!)

  6. updated peerDependencies as needed. CRITICAL our automated release system can not be counted on to update peerDependencies so we must do it manually in our PRs when needed. See the updating peerDependencies section of the release instructions for more details.

affects: @esri/hub-common

we now see TS errors when running karma tests (which still pass)
@tomwayson tomwayson requested a review from benstoltz February 7, 2025 16:21
Copy link
Member

@benstoltz benstoltz left a comment

Choose a reason for hiding this comment

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

Looks good to me despite it not being optimal to switch to :any.

@tomwayson
Copy link
Member Author

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3a1f607) to head (ab562da).
Report is 46 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1797   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files         1032      1035    +3     
  Lines        18812     18879   +67     
  Branches      3428      3450   +22     
=========================================
+ Hits         18812     18879   +67     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomwayson tomwayson changed the title refactor(hub-common): do not use ArcGIS Maps SDK types feat(hub-common): add minimal definitions of ArcGIS types and drop arcgis-js-api Feb 7, 2025
@tomwayson tomwayson merged commit 27c08b8 into master Feb 7, 2025
7 checks passed
@tomwayson tomwayson deleted the r/no-arcgis-types branch February 7, 2025 23:23
esri-dcdev-2 pushed a commit that referenced this pull request Feb 7, 2025
# @esri/hub-common [15.30.0](https://github.com/Esri/hub.js/compare/@esri/[email protected]...@esri/[email protected]) (2025-02-07)

### Features

* **hub-common:** add minimal definitions of ArcGIS types and drop arcgis-js-api ([#1797](#1797)) ([27c08b8](27c08b8))
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.

2 participants