Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bugsnag/source-maps

Package Overview
Dependencies
Maintainers
9
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/source-maps

CLI and JS library for uploading source maps to Bugsnag

  • 2.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created

What is @bugsnag/source-maps?

@bugsnag/source-maps is an npm package that helps you upload source maps to Bugsnag, a tool for monitoring and reporting errors in applications. Source maps are used to map minified code back to the original source code, making it easier to debug errors in production environments.

What are @bugsnag/source-maps's main functionalities?

Uploading Browser Source Maps

This feature allows you to upload source maps for browser-based applications. The code sample demonstrates how to upload a source map file along with the minified JavaScript file to Bugsnag.

const { upload } = require('@bugsnag/source-maps');

upload({
  apiKey: 'YOUR_API_KEY',
  appVersion: '1.2.3',
  minifiedUrl: 'https://example.com/app.min.js',
  sourceMap: 'path/to/app.min.js.map',
  minifiedFile: 'path/to/app.min.js',
  overwrite: true
}).then(() => {
  console.log('Source map uploaded successfully');
}).catch(err => {
  console.error('Failed to upload source map', err);
});

Uploading Node.js Source Maps

This feature allows you to upload source maps for Node.js applications. The code sample shows how to upload a source map file along with the corresponding minified JavaScript file to Bugsnag.

const { upload } = require('@bugsnag/source-maps');

upload({
  apiKey: 'YOUR_API_KEY',
  appVersion: '1.2.3',
  sourceMap: 'path/to/app.js.map',
  minifiedFile: 'path/to/app.js',
  minifiedUrl: 'app.js',
  overwrite: true
}).then(() => {
  console.log('Source map uploaded successfully');
}).catch(err => {
  console.error('Failed to upload source map', err);
});

Uploading React Native Source Maps

This feature allows you to upload source maps for React Native applications. The code sample demonstrates how to upload a source map file along with the minified JavaScript bundle for an iOS platform to Bugsnag.

const { upload } = require('@bugsnag/source-maps');

upload({
  apiKey: 'YOUR_API_KEY',
  appVersion: '1.2.3',
  platform: 'ios',
  sourceMap: 'path/to/main.jsbundle.map',
  minifiedFile: 'path/to/main.jsbundle',
  minifiedUrl: 'main.jsbundle',
  overwrite: true
}).then(() => {
  console.log('Source map uploaded successfully');
}).catch(err => {
  console.error('Failed to upload source map', err);
});

Other packages similar to @bugsnag/source-maps

Keywords

FAQs

Package last updated on 02 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc