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

source-map-loader

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-map-loader - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

dist/index.js

@@ -113,3 +113,3 @@ "use strict";

sourceContent = originalSourceContent;
} else if (!errored && sourceURL) {
} else if (!errored && sourceURL && !(0, _utils.isURL)(sourceURL)) {
this.addDependency(sourceURL);

@@ -116,0 +116,0 @@ } // Return original value of `source` when error happens

@@ -9,2 +9,3 @@ "use strict";

exports.getSourceMappingURL = getSourceMappingURL;
exports.isURL = isURL;

@@ -92,2 +93,6 @@ var _path = _interopRequireDefault(require("path"));

function getAbsolutePath(context, request, sourceRoot) {
if (isURL(sourceRoot)) {
return new URL(request, sourceRoot).toString();
}
if (sourceRoot) {

@@ -120,2 +125,8 @@ if (_path.default.isAbsolute(sourceRoot)) {

if (isURL(sourceURL)) {
return {
path: sourceURL
};
}
try {

@@ -162,5 +173,9 @@ buffer = await new Promise((resolve, reject) => {

function isURL(value) {
return /^[a-z][a-z0-9+.-]*:/i.test(value) && !_path.default.win32.isAbsolute(value);
}
async function fetchFromURL(loaderContext, context, url, sourceRoot, skipReading = false) {
// 1. It's an absolute url and it is not `windows` path like `C:\dir\file`
if (/^[a-z][a-z0-9+.-]*:/i.test(url) && !_path.default.win32.isAbsolute(url)) {
if (isURL(url)) {
const {

@@ -167,0 +182,0 @@ protocol

{
"name": "source-map-loader",
"version": "4.0.0",
"version": "4.0.1",
"description": "extracts inlined source map and offers it to webpack",

@@ -48,23 +48,23 @@ "license": "MIT",

"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.17.10",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.19.3",
"@commitlint/cli": "^16.3.0",
"@commitlint/config-conventional": "^16.2.4",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^28.1.0",
"babel-jest": "^29.1.2",
"cross-env": "^7.0.3",
"del": "^6.0.0",
"del-cli": "^4.0.1",
"eslint": "^8.15.0",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.1",
"jest": "^28.1.0",
"jest": "^29.1.2",
"lint-staged": "^12.4.1",
"memfs": "^3.4.1",
"memfs": "^3.4.7",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"prettier": "^2.7.1",
"standard-version": "^9.5.0",
"webpack": "^5.72.1"
"webpack": "^5.74.0"
},

@@ -71,0 +71,0 @@ "keywords": [

@@ -22,6 +22,18 @@ <div align="center">

```bash
```console
npm i -D source-map-loader
```
or
```console
yarn add -D source-map-loader
```
or
```console
pnpm add -D source-map-loader
```
Then add the plugin to your `webpack` config. For example:

@@ -28,0 +40,0 @@

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