Skip to content

Conversation

@benvinegar
Copy link
Contributor

Changes:

  • Raven is now a class; can be initialized as new Raven() (only via CommonJS)
  • No more global mangling / via header/footer.js
  • Tests mock functions directly on Raven prototype (via global shenanigans)
  • Can now import Raven via CommonJS directly from src
  • raven-js distributables:
    • still have Raven singleton (API hasn't changed)
    • are built using Browserify
    • auto-add/initialize plugins (as before)
  • Moved util-like functions (e.g. isError) into src/utils.js
  • Separated test files for utils, TraceKit
  • Plugins loaded via CommonJS don't auto-initialize / add themselves to ecosystem
  • File-size changes: TBA (definitely bigger)

Still WIP:

  • How plugins fit into this new system

Thoughts:

This is a huge set of changes. It makes Raven more "OO" – which I'm sure will spur some debate. But the result is that there is no longer bunch of global variables whose state is mysteriously mutated between raven.js / raven.test.js, and tests (IMHO) are much easier to follow.

src/utils.js Outdated
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol tabs

@benvinegar
Copy link
Contributor Author

Hmm, so now that I see StackTrace is a singleton ... and it maintains state (e.g. TraceKit.remoteFetching and TraceKit.linesOfContext), that means that two distinct Raven instances will just fight over TraceKit state ...

So, beginning to wonder if this is a good idea or not (class instances).

@benvinegar benvinegar merged commit dc1dfef into master Dec 28, 2015
@mattrobenolt mattrobenolt deleted the modules branch January 4, 2016 17:29
kamilogorek pushed a commit that referenced this pull request Jun 12, 2018
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

Successfully merging this pull request may close these issues.

3 participants