Socket
Socket
Sign inDemoInstall

@sentry/webpack-plugin

Package Overview
Dependencies
1
Maintainers
9
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.1 to 1.5.2

2

package.json

@@ -11,3 +11,3 @@ {

"author": "Sentry",
"version": "1.5.1",
"version": "1.5.2",
"license": "MIT",

@@ -14,0 +14,0 @@ "repository": "git@github.com:getsentry/sentry-webpack-plugin.git",

@@ -345,2 +345,28 @@ /*eslint-disable*/

test('injects into multiple entries with array chunks', done => {
expect.assertions(1);
compiler.options.entry = {
main: ['./src/index.js', './src/common.js'],
admin: ['./src/admin.js', './src/common.js'],
};
sentryCliPlugin.apply(compiler);
setImmediate(() => {
expect(compiler.options.entry).toEqual({
main: [
expect.stringMatching(SENTRY_MODULE_RE),
'./src/index.js',
'./src/common.js',
],
admin: [
expect.stringMatching(SENTRY_MODULE_RE),
'./src/admin.js',
'./src/common.js',
],
});
done();
});
});
test('injects into entries specified by a function', done => {

@@ -375,2 +401,3 @@ expect.assertions(1);

expect(compiler.options.entry).toEqual({
main: './src/index.js',
admin: [expect.stringMatching(SENTRY_MODULE_RE), './src/admin.js'],

@@ -387,3 +414,3 @@ });

main: './src/index.js',
admin: './src/admin.js',
admin: ['./src/admin.js', './src/common.js'],
};

@@ -395,3 +422,8 @@ sentryCliPlugin.options.entries = /^ad/;

expect(compiler.options.entry).toEqual({
admin: [expect.stringMatching(SENTRY_MODULE_RE), './src/admin.js'],
main: './src/index.js',
admin: [
expect.stringMatching(SENTRY_MODULE_RE),
'./src/admin.js',
'./src/common.js',
],
});

@@ -406,3 +438,3 @@ done();

compiler.options.entry = {
main: './src/index.js',
main: ['./src/index.js', './src/common.js'],
admin: './src/admin.js',

@@ -415,2 +447,3 @@ };

expect(compiler.options.entry).toEqual({
main: ['./src/index.js', './src/common.js'],
admin: [expect.stringMatching(SENTRY_MODULE_RE), './src/admin.js'],

@@ -417,0 +450,0 @@ });

@@ -121,9 +121,8 @@ const SentryCli = require('@sentry/cli');

if (originalEntry !== null && typeof originalEntry === 'object') {
const nextEntries = {};
Object.keys(originalEntry).forEach(key => {
if (this.checkEntry(key)) {
nextEntries[key] = this.injectEntry(originalEntry[key], newEntry);
}
});
return nextEntries;
return Object.keys(originalEntry).reduce((acc, key) => {
acc[key] = this.checkEntry(key)
? this.injectEntry(originalEntry[key], newEntry)
: originalEntry[key];
return acc;
}, {});
}

@@ -130,0 +129,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc