Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@sentry/types
Advanced tools
The @sentry/types package provides TypeScript definitions for Sentry's JavaScript SDK. It includes types for Sentry's configuration options, event objects, and various interfaces used within Sentry's SDKs. This package is primarily used by developers to ensure type safety and autocompletion when working with Sentry in a TypeScript environment.
Event Interface
Defines the structure of an event that can be sent to Sentry. This includes the event's ID, level, timestamp, platform, and SDK information.
{
event_id: string;
level: 'error' | 'warning' | 'info' | 'debug';
timestamp: number;
platform: string;
sdk: {
name: string;
version: string;
};
}
Options Interface
Specifies the options for configuring the Sentry SDK. This includes the DSN (Data Source Name), breadcrumb limits, debug mode, integrations, and a beforeSend hook for event manipulation.
{
dsn: string;
maxBreadcrumbs: number;
debug: boolean;
integrations: Integration[];
beforeSend: (event: Event) => Event | null;
}
Breadcrumb Interface
Describes a breadcrumb, which is a snapshot of data that describes what happened before an event. This includes the timestamp, message, category, level, and any additional data.
{
timestamp: number;
message: string;
category: string;
level: 'critical' | 'error' | 'warning' | 'info' | 'debug';
data: Record<string, any>;
}
Provides TypeScript definitions for Node.js. Similar to @sentry/types, it's used for type safety and autocompletion but focuses on Node.js' API rather than Sentry's.
The TypeScript language itself, which includes its compiler and type system. While not a direct alternative, it's the foundation that packages like @sentry/types build upon to provide type definitions for specific libraries.
Offers TypeScript definitions for React. Similar to @sentry/types, it aids in developing React applications with TypeScript by providing types for React's API, but it doesn't relate to error monitoring or logging.
Common types used by the Sentry JavaScript SDKs.
8.10.0
opentelemetry-instrumentation-remix
. (#12110)You can now simplify your remix instrumentation by opting-in like this:
const Sentry = require('@sentry/remix');
Sentry.init({
dsn: YOUR_DSN
// opt-in to new auto instrumentation
autoInstrumentRemix: true,
});
With this setup, you do not need to add e.g. wrapExpressCreateRequestHandler
anymore. Additionally, the quality of the
captured data improves. The old way to use @sentry/remix
continues to work, but it is encouraged to use the new setup.
thirdPartyErrorFilterIntegration
from @sentry/browser
(#12512)tags
field to any feedback config param (#12197)getDynamicSamplingContextFromSpan
(#12522)captureRemixServerException
from client SDK (#12497)Work in this release was contributed by @AndreyKovanov and @kiliman. Thank you for your contributions!
FAQs
Types for all Sentry JavaScript SDKs
The npm package @sentry/types receives a total of 10,731,870 weekly downloads. As such, @sentry/types popularity was classified as popular.
We found that @sentry/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.