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

Fix broken debug extension #631

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Fix broken debug extension #631

merged 2 commits into from
Jul 2, 2024

Conversation

jpwilliams
Copy link
Member

@jpwilliams jpwilliams commented Jul 2, 2024

Summary

debug is a really old library, and its browser detection is old, too. For newer pairings of framework and runtime such as Nitro + Cloudflare Pages, their code for detecting which code should be delivered doesn't catch the markers these leave behind.

One silly symptom of this is that Debug() returns an anonymous function with no extra properties instead of a Debugger instance if the wrong code is consumed following a bad detection. This results in the following .extend() call failing.

We fix that here by just not calling .extend().

Checklist

  • Added a docs PR that references this PR N/A Bug fix
  • Added unit/integration tests N/A Will add a Nitro example in another PR
  • Added changesets if applicable

@jpwilliams jpwilliams added the Bug Something isn't working label Jul 2, 2024
@jpwilliams jpwilliams self-assigned this Jul 2, 2024
Copy link

changeset-bot bot commented Jul 2, 2024

🦋 Changeset detected

Latest commit: 87a378c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
inngest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jpwilliams jpwilliams added the prerelease/inngest Create snapshot releases for a PR for the "inngest" package. label Jul 2, 2024
@inngest-release-bot inngest-release-bot added the 📦 inngest Affects the `inngest` package label Jul 2, 2024
@inngest-release-bot
Copy link
Collaborator

inngest-release-bot commented Jul 2, 2024

A user has added the prerelease/inngest label, so this PR will be published to npm with the tag pr-631. It will be updated with the latest changes as you push commits to this PR.

You can install this prerelease version with:

npm install inngest@pr-631

The last release was built and published from 87a378c.

@jpwilliams jpwilliams merged commit ac6796c into main Jul 2, 2024
40 checks passed
@jpwilliams jpwilliams deleted the fix/debug-extension branch July 2, 2024 15:57
jpwilliams added a commit that referenced this pull request Jul 2, 2024
## Summary
<!-- Succinctly describe your change, providing context, what you've
changed, and why. -->

[debug](https://www.npmjs.com/package/debug) is a really old library,
and its browser detection is old, too. For newer pairings of framework
and runtime such as Nitro + Cloudflare Pages, their code for detecting
which code should be delivered doesn't catch the markers these leave
behind.

One silly symptom of this is that `Debug()` returns an anonymous
function with no extra properties instead of a `Debugger` instance if
the wrong code is consumed following a bad detection. This results in
the following `.extend()` call failing.

We fix that here by just not calling `.extend()`.

## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [ ] ~Added a [docs PR](https://github.com/inngest/website) that
references this PR~ N/A Bug fix
- [ ] ~Added unit/integration tests~ N/A Will add a Nitro example in
another PR
- [x] Added changesets if applicable
jpwilliams pushed a commit that referenced this pull request Jul 2, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## inngest@3.19.19

### Patch Changes

- [#631](#631)
[`ac6796c`](ac6796c)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix exception
being thrown from `debug` when used with Nitro running on Cloudflare
Pages

-
[`191fe36`](191fe36)
Thanks [@jpwilliams](https://github.com/jpwilliams)! - Fix failure
handlers incorrectly inheriting config options such as `batchEvents` and
`concurrency` from their parent function

- [#630](#630)
[`d4de6d7`](d4de6d7)
Thanks [@stefanosala](https://github.com/stefanosala)! - Fix missing
config fields such as `concurrency` when validating

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working 📦 inngest Affects the `inngest` package prerelease/inngest Create snapshot releases for a PR for the "inngest" package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants