postcss-normalize-url
Advanced tools
Comparing version 3.0.8 to 4.0.0-rc.0
@@ -0,1 +1,7 @@ | ||
# 4.0.0-rc.0 | ||
* Breaking: Drops support for Node 0.12, we now require at least Node 4. | ||
* Breaking: Update PostCSS to 6.0.0. | ||
* Breaking: `stripWWW` is now set to `false` by default. | ||
# 3.0.8 | ||
@@ -2,0 +8,0 @@ |
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
@@ -71,5 +73,5 @@ var _path = require('path'); | ||
if (escapeChars.test(url.value)) { | ||
if (escapeChars.test(url.value) && url.type === 'string') { | ||
escaped = url.value.replace(escapeChars, '\\$1'); | ||
if (escaped.length < url.value.length + (url.type === 'string' ? 2 : 0)) { | ||
if (escaped.length < url.value.length + 2) { | ||
url.value = escaped; | ||
@@ -86,7 +88,7 @@ url.type = 'word'; | ||
module.exports = _postcss2.default.plugin('postcss-normalize-url', function (opts) { | ||
opts = _extends({ | ||
exports.default = _postcss2.default.plugin('postcss-normalize-url', function (opts) { | ||
opts = Object.assign({}, { | ||
normalizeProtocol: false, | ||
stripFragment: false, | ||
stripWWW: true | ||
stripWWW: false | ||
}, opts); | ||
@@ -103,2 +105,3 @@ | ||
}; | ||
}); | ||
}); | ||
module.exports = exports['default']; |
{ | ||
"name": "postcss-normalize-url", | ||
"version": "3.0.8", | ||
"version": "4.0.0-rc.0", | ||
"description": "Normalize URLs with PostCSS", | ||
@@ -11,6 +11,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"pretest": "eslint src", | ||
"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", | ||
"test": "ava src/__tests__", | ||
"test-012": "ava src/__tests__" | ||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/" | ||
}, | ||
@@ -29,22 +26,11 @@ "keywords": [ | ||
"is-absolute-url": "^2.0.0", | ||
"normalize-url": "^1.4.0", | ||
"postcss": "^5.0.14", | ||
"postcss-value-parser": "^3.2.3" | ||
"normalize-url": "^1.0.0", | ||
"postcss": "^6.0.0", | ||
"postcss-value-parser": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.17.0", | ||
"babel-cli": "^6.3.17", | ||
"babel-core": "^6.3.26", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-stage-0": "^6.3.13", | ||
"babel-register": "^6.9.0", | ||
"del-cli": "^0.2.0", | ||
"eslint": "^3.0.0", | ||
"eslint-config-cssnano": "^3.0.0", | ||
"eslint-plugin-babel": "^3.3.0", | ||
"eslint-plugin-import": "^2.0.1" | ||
"babel-cli": "^6.0.0", | ||
"cross-env": "^3.0.0" | ||
}, | ||
"homepage": "https://github.com/ben-eb/postcss-normalize-url", | ||
"homepage": "https://github.com/ben-eb/cssnano", | ||
"author": { | ||
@@ -55,9 +41,9 @@ "name": "Ben Briggs", | ||
}, | ||
"repository": "ben-eb/postcss-normalize-url", | ||
"eslintConfig": { | ||
"extends": "cssnano" | ||
"repository": "ben-eb/cssnano", | ||
"bugs": { | ||
"url": "https://github.com/ben-eb/cssnano/issues" | ||
}, | ||
"ava": { | ||
"require": "babel-register" | ||
"engines": { | ||
"node": ">=4" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# [postcss][postcss]-normalize-url [![Build Status](https://travis-ci.org/ben-eb/postcss-normalize-url.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-normalize-url.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-normalize-url.svg)][deps] | ||
# [postcss][postcss]-normalize-url | ||
@@ -44,8 +44,7 @@ > [Normalize URLs](https://github.com/sindresorhus/normalize-url) with PostCSS. | ||
Please see the [normalize-url documentation][docs]. By default, | ||
`normalizeProtocol` & `stripFragment` are set to `false`; `stripWWW` to `true`. | ||
`normalizeProtocol`, `stripFragment` & `stripWWW` are set to `false`. | ||
## Contributing | ||
## Contributors | ||
Pull requests are welcome. If you add functionality, then please add unit tests | ||
to cover it. | ||
See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md). | ||
@@ -57,6 +56,2 @@ ## License | ||
[docs]: https://github.com/sindresorhus/normalize-url#options | ||
[ci]: https://travis-ci.org/ben-eb/postcss-normalize-url | ||
[deps]: https://gemnasium.com/ben-eb/postcss-normalize-url | ||
[npm]: http://badge.fury.io/js/postcss-normalize-url | ||
[postcss]: https://github.com/postcss/postcss |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
79
0
8575
56
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedpostcss@6.0.23(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedjs-base64@2.6.4(transitive)
- Removedpostcss@5.2.18(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.03.2.3(transitive)
Updatednormalize-url@^1.0.0
Updatedpostcss@^6.0.0
Updatedpostcss-value-parser@^3.0.0