Socket
Socket
Sign inDemoInstall

@flareapp/flare-webpack-plugin-sourcemap

Package Overview
Dependencies
2
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.14 to 1.1.0

14

dist/index.js

@@ -14,3 +14,3 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "webpack", "zlib", "fs", "./util"], factory);
define(["require", "exports", "webpack", "zlib", "fs", "./util", "path"], factory);
}

@@ -25,2 +25,3 @@ })(function (require, exports) {

var util_1 = require("./util");
var path = require("path");
var FlareWebpackPluginSourcemap = /** @class */ (function () {

@@ -62,3 +63,3 @@ function FlareWebpackPluginSourcemap(_a) {

}
compilation.warnings.push("@flareapp/flare-webpack-plugin-sourcemap: " + error.message);
compilation.warnings.push("@flareapp/flare-webpack-plugin-sourcemap: " + (error.message || error));
cb();

@@ -95,3 +96,3 @@ });

if (!sourcemaps.length) {
return reject("No sourcemap files were found. Make sure sourcemaps are being generated by adding this line to your webpack config: devtool: \"hidden-source-map\".\n If you don't want to upload your sourcemaps to your server, you can add the \"removeSourcemaps: true\" config option to the Flare webpack plugin.\n Laravel Mix' versioning is currently broken with \"removeSourcemaps\" enabled.");
return reject("No sourcemap files were found. Make sure sourcemaps are being generated by adding this line to your webpack config: devtool: \"hidden-source-map\". If you don't want to upload your sourcemaps to your server, you can add the \"removeSourcemaps: true\" config option to the Flare webpack plugin. Laravel Mix' versioning is currently broken with \"removeSourcemaps\" enabled.");
}

@@ -124,5 +125,8 @@ Promise.all(sourcemaps.map(function (sourcemap) { return _this.uploadSourcemap(sourcemap); }))

var filename = currentChunk.files.find(function (file) { return /\.js/.test(file); });
var sourcemapPath = currentChunk.files.find(function (file) { return /\.js\.map/.test(file); });
// @ts-expect-error
var sourcemapPath = (currentChunk.auxiliaryFiles || currentChunk.files).find(function (file) {
return /\.js\.map/.test(file);
});
if (filename && sourcemapPath) {
var sourcemapLocation = util_1.removeQuery(compiler.outputFileSystem.join(outputPath, sourcemapPath));
var sourcemapLocation = util_1.removeQuery(path.join(outputPath, sourcemapPath));
_this.sourcemapPaths.push(sourcemapLocation);

@@ -129,0 +133,0 @@ try {

@@ -12,2 +12,3 @@ (function (factory) {

Object.defineProperty(exports, "__esModule", { value: true });
exports.removeQuery = exports.uuidv4 = exports.flareLog = void 0;
function flareLog(message, isError) {

@@ -14,0 +15,0 @@ if (isError === void 0) { isError = false; }

{
"name": "@flareapp/flare-webpack-plugin-sourcemap",
"version": "1.0.14",
"version": "1.1.0",
"main": "dist",

@@ -28,3 +28,3 @@ "license": "MIT",

"dependencies": {
"axios": "^0.19.0"
"axios": "^0.21.1"
},

@@ -31,0 +31,0 @@ "publishConfig": {

@@ -7,2 +7,3 @@ import { Compiler, DefinePlugin, compilation } from 'webpack';

import { flareLog, uuidv4, removeQuery } from './util';
import path = require('path');

@@ -76,3 +77,3 @@ type PluginOptions = {

compilation.warnings.push(`@flareapp/flare-webpack-plugin-sourcemap: ${error.message}`);
compilation.warnings.push(`@flareapp/flare-webpack-plugin-sourcemap: ${error.message || error}`);
cb();

@@ -120,9 +121,7 @@ });

return reject(
`No sourcemap files were found. Make sure sourcemaps are being generated by adding this line to your webpack config: devtool: "hidden-source-map".
If you don't want to upload your sourcemaps to your server, you can add the "removeSourcemaps: true" config option to the Flare webpack plugin.
Laravel Mix' versioning is currently broken with "removeSourcemaps" enabled.`
`No sourcemap files were found. Make sure sourcemaps are being generated by adding this line to your webpack config: devtool: "hidden-source-map". If you don't want to upload your sourcemaps to your server, you can add the "removeSourcemaps: true" config option to the Flare webpack plugin. Laravel Mix' versioning is currently broken with "removeSourcemaps" enabled.`
);
}
Promise.all(sourcemaps.map(sourcemap => this.uploadSourcemap(sourcemap)))
Promise.all(sourcemaps.map((sourcemap) => this.uploadSourcemap(sourcemap)))
.then(() => {

@@ -157,7 +156,10 @@ flareLog('Successfully uploaded sourcemaps to Flare.');

return chunks.reduce((sourcemaps, currentChunk) => {
const filename = currentChunk.files.find(file => /\.js/.test(file));
const sourcemapPath = currentChunk.files.find(file => /\.js\.map/.test(file));
const filename = currentChunk.files.find((file) => /\.js/.test(file));
// @ts-expect-error
const sourcemapPath = (currentChunk.auxiliaryFiles || currentChunk.files).find((file) =>
/\.js\.map/.test(file)
);
if (filename && sourcemapPath) {
const sourcemapLocation = removeQuery(compiler.outputFileSystem.join(outputPath, sourcemapPath));
const sourcemapLocation = removeQuery(path.join(outputPath, sourcemapPath));

@@ -210,3 +212,3 @@ this.sourcemapPaths.push(sourcemapLocation);

removeAllSourcemaps() {
this.sourcemapPaths.forEach(path => {
this.sourcemapPaths.forEach((path) => {
try {

@@ -213,0 +215,0 @@ console.log('removing', path);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc