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

postcss-normalize-url

Package Overview
Dependencies
Maintainers
8
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-normalize-url - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

24

dist/index.js

@@ -14,4 +14,2 @@ "use strict";

var _isAbsoluteUrl = _interopRequireDefault(require("is-absolute-url"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -21,6 +19,24 @@

const escapeChars = /([\s\(\)"'])/g;
const escapeChars = /([\s\(\)"'])/g; // Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/; // Windows paths like `c:\`
const WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
/**
* Originally in sindresorhus/is-absolute-url
*
* @param {string} url
*/
function isAbsolute(url) {
if (WINDOWS_PATH_REGEX.test(url)) {
return false;
}
return ABSOLUTE_URL_REGEX.test(url);
}
function convert(url, options) {
if ((0, _isAbsoluteUrl.default)(url) || url.startsWith('//')) {
if (isAbsolute(url) || url.startsWith('//')) {
let normalizedURL = null;

@@ -27,0 +43,0 @@

7

package.json
{
"name": "postcss-normalize-url",
"version": "5.0.3",
"version": "5.0.4",
"description": "Normalize URLs with PostCSS",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"prebuild": "rimraf dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"build": "babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepare": "yarn build"

@@ -27,5 +27,4 @@ },

"dependencies": {
"is-absolute-url": "^3.0.3",
"normalize-url": "^6.0.1",
"postcss-value-parser": "^4.1.0"
"postcss-value-parser": "^4.2.0"
},

@@ -32,0 +31,0 @@ "homepage": "https://github.com/cssnano/cssnano",

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