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

Gitbeaker attempts to use NodeJS types in browser environment #3480

Closed
2 tasks done
nhollander-alert opened this issue Dec 7, 2023 · 2 comments
Closed
2 tasks done

Comments

@nhollander-alert
Copy link
Contributor

Description

  • Node.js version: n/a
  • Gitbeaker version: 39.19.0 - 39.25.0
  • Gitbeaker release (cli, node, browser, core, requester-utils): requester-utils
  • OS & version: n/a

Since version 39.19.0 the @gitbeaker/requester-utils package has added a dependency on async-sema and picomatch (via micromatch) breaking @gitbeaker/browser due to a reliance on NodeJS specific types. These changes were introduced in #3426 and affect all package versions since then.

Steps to reproduce

Clone this minimal reproduction.

Test ^39.25.0:

git checkout d1356e9e7ed4418063c23f194e926db1a25739f8
npm install
npm run dev

Open the browser and view the developer console. You should see a message like TypeError: events_1.default is not a constructor

Test 39.19.0 (Tag bug was introduced in)

git checkout 10012f86e376e64cccff0e6f517a965424fba27a
npm install
npm run dev

Open the browser and view the developer console. The same message should be present.

Test 39.18.0 (Last working version)

git checkout 4ca222bb6ad2af37536921d1f8ccff8543bd0e88
npm install
npm run dev

Open the browser and view the developer console. AGitlab object should be printed.

Expected behaviour

I expect the behavior to be consistent across all three versions

Actual behaviour

Versions from 39.19.0 can not be used in the browser.

Possible fixes

Unknown

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.
@jdalrymple
Copy link
Owner

Working on this! #3428

@jdalrymple
Copy link
Owner

Gonna close, since im addressing it in #3427

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

2 participants