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

Epic: ArcGIS REST JS v5 #1200

Open
patrickarlt opened this issue Mar 10, 2025 · 0 comments
Open

Epic: ArcGIS REST JS v5 #1200

patrickarlt opened this issue Mar 10, 2025 · 0 comments
Milestone

Comments

@patrickarlt
Copy link
Contributor

This issue is for discussing what should be included in ArcGIS REST JS v5 which be our next major version and breaking change opportunity.

There are a few things that we have already discussed:

Currently that would be it. However I want to throw out a few more ideas:

  • Move most request and fetch options to separate requestOptions (option flags used in our internal request function) and fetchOptions (options passed to the internal call to fetch). The only things I would keep would at the top level would be authentication and params. This would mean our main options interface looks like this:
    {
      params: any; // any additional params to append to the request
      authentication: IAuthenticationManager | string; // auth manager or access token
      requestOptions: { // additional options for our intenal request method
        hideToken: boolean; // put the token param in the header for GET requests
        suppressWarnings: boolean // silence all internal console warnings from REST JS 
        portal: string; // used internall by some requests to construct URLs, will override the portal set in thi authentication option
      };
      /** 
       * anything you can pass to the options for fetch 
       * https://developer.mozilla.org/en-US/docs/Web/API/RequestInit 
       * REST JS may override or ignore these as it sees fit. REST JS
       * currently modifies the headers and credentials options.
       **/
      fetchOptions: RequestInit 
    
    }
    This would make it so that we can easily copy options around inside higher level methods where we make multiple internal calls to different endpoints like createApiKey()
  • Remove rawResponse as per discussion in Update typings for functions that wrap request() to return Response when using rawResponse #821 this might mean that some user might be disappointed like in solveRoute throws error when used with rawResponse #1045 (comment) because you wouldn't be able to access response headers. Could we solve this by appending headers to the responses?
  • Support only Node 22+. This means we can ditch all the complexity with node-fetch and the extra packages and finally assume that a standard fetch exists everywhere. Maintenance on 18 ends in April 2025 (this year) and maintenance on 20 ends April 2026 so this might be a controversial move.
@patrickarlt patrickarlt added this to the v5 milestone Mar 10, 2025
@gavinr-maps gavinr-maps pinned this issue Mar 10, 2025
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

No branches or pull requests

1 participant