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

Remove jQuery Dependency #142

Open
amcdnl opened this issue Jan 27, 2022 · 4 comments
Open

Remove jQuery Dependency #142

amcdnl opened this issue Jan 27, 2022 · 4 comments

Comments

@amcdnl
Copy link

amcdnl commented Jan 27, 2022

Issue

This package relies on jQuery ( https://github.com/splunk/splunk-sdk-javascript#client-side-code-example ).

jQuery is not widely used anymore and for simple things like making API calls the fetch API would be better.

@amcdnl amcdnl changed the title Remove jQuery Depedencies Remove jQuery Dependency Jan 27, 2022
@aaronlippold
Copy link

👍🏻 agreed. Any thoughts from the splunk team on this. We have multiple projects facing issues with this dependency.

@ashah-splunk
Copy link
Contributor

@amcdnl as of now we don't have any plans to migrate to fetch API. Please let us know if there is any specific need for using fetch API

@aaronlippold would you please share details of issues that are being faced in the projects because of the jQuery dependency.

@aaronlippold
Copy link

aaronlippold commented Jun 22, 2023 via email

@Amndeep7
Copy link

jQuery issue

  • Our webapp until just recently used the splunk js sdk to interface with splunk instances
  • We are attempting to migrate the webapp to support Node v18 - there is much grief already posted on the internet about it being a difficult process due to node internals changing impacting several base libraries
  • We use webpack to transpile our code from typescript to javascript - during that transpilation process, it goes through and adds 'use strict' to everything including dependencies
  • In our branch where the migration work is being done, we are currently experiencing some runtime errors with anything using jQuery due to jQuery not being compatible with 'use strict'
  • The runtime error we get is as follows and was traced to a jQuery internal function: Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
  • Removing jQuery as a dependency would help us with this issue. For now, we've instead converted to calling the api directly via axios

Fork reason

  • For some reason, we were having issues with using this library in the browser due to process.env being overwritten in this library
  • Unfortunately, the dev who did the implementation for the functionality using this sdk is no longer with the company so I have no further details atm

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

4 participants