Skip to content

Remove jQuery Dependency  #142

Open
Open

Description

@amcdnl

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.

Activity

  1. changed the title [-]Remove jQuery Depedencies[/-] [+]Remove jQuery Dependency [/+] on Jan 27, 2022
  2. aaronlippold commented on May 3, 2023

    @aaronlippold

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

  3. ashah-splunk commented on Jun 22, 2023

    @ashah-splunk
    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.

  4. aaronlippold commented on Jun 22, 2023

    @aaronlippold
  5. Amndeep7 commented on Jun 22, 2023

    @Amndeep7

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions