Skip to content

Commit d768bdc

Browse files
committed
v2.0.1
1 parent a3dc69e commit d768bdc

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# rollup-plugin-cleanup changes
22

33
### v2.0.1
4+
- Adds rollup >=0.50 as peerDependencies, hope to update devDependencies soon\*.
45
- Preserves empty lines inside multi-line strings.
6+
- Welcome to @mkhl to the rollup-plugin-cleanup team!
7+
8+
\* MagicString v0.24.x has great enhancements, but it needs testing with this plugin.
59

610
### v2.0.0
711
- Requires node v4.2 or later.

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![Build Status][build-image]][build-url]
2-
[![Test Coverage][cover-image]][cover-url]
32
[![npm Version][npm-image]][npm-url]
43
[![License][license-image]][license-url]
54

@@ -12,7 +11,7 @@ With *cleanup*, you have:
1211
* Removal of JavaScript comments through powerful filters (configurable)
1312
* Normalization of line endings (Unix, Mac, or Windows)
1413
* Empty lines compactation (configurable)
15-
* Remotion of trailing spaces
14+
* Remotion of trailing spaces preserving ES6 Template Literal Strings
1615
* Source Map support
1716

1817
Please see [Whats New](#whats-new), cleanup v2.0.0 requires node v4.2 or above.
@@ -106,14 +105,11 @@ This filter will preserve multiline comments starting with a dash, in addition t
106105

107106
### What's New
108107

109-
- Requires node v4.2 or later.
110-
- Emission of source map honors the Rollup `sourceMap` or `sourcemap` (lowercased) options.
111-
- Generated errors are displayed through the standard Rollup's `error` method.
112-
- Fixed tests to match rollup v0.48.x parameters and async operation.
113-
- Now the plugin operation is async and returns a Promise.
114-
- Using facebook [jest](http://facebook.github.io/jest/) for tests.
115-
108+
- Adds rollup >=0.50 as peerDependencies, hope to update devDependencies soon\*.
109+
- Preserves empty lines inside ES6 Template Literal Strings, thanks to @mkhl.
110+
- Welcome to @mkhl to the rollup-plugin-cleanup team!
116111

112+
\* MagicString v0.24.x has great enhancements, but it needs testing with this plugin.
117113

118114
---
119115

dist/rollup-plugin-cleanup.es.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* rollup-plugin-cleanup v2.0.0
2+
* rollup-plugin-cleanup v2.0.1
33
* @author aMarCruz
44
* @license MIT
55
*/
@@ -224,13 +224,13 @@ function removeLines(magicStr, code, file, options) {
224224

225225
if (empties) {
226226
// maxEmptyLines -1 or > 0
227-
while (match = NEXT_LINES.exec(region)) {
227+
while ((match = NEXT_LINES.exec(region))) {
228228
block = match[0];
229229
replaceBlock(block, start + match.index, limitLines(block, maxEolChars));
230230
}
231231
} else {
232232
// removes all the empty lines
233-
while (match = NEXT_LINES.exec(region)) {
233+
while ((match = NEXT_LINES.exec(region))) {
234234
replaceBlock(match[0], start + match.index, eolTo);
235235
}
236236
}

dist/rollup-plugin-cleanup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* rollup-plugin-cleanup v2.0.0
2+
* rollup-plugin-cleanup v2.0.1
33
* @author aMarCruz
44
* @license MIT
55
*/
@@ -226,13 +226,13 @@ function removeLines(magicStr, code, file, options) {
226226

227227
if (empties) {
228228
// maxEmptyLines -1 or > 0
229-
while (match = NEXT_LINES.exec(region)) {
229+
while ((match = NEXT_LINES.exec(region))) {
230230
block = match[0];
231231
replaceBlock(block, start + match.index, limitLines(block, maxEolChars));
232232
}
233233
} else {
234234
// removes all the empty lines
235-
while (match = NEXT_LINES.exec(region)) {
235+
while ((match = NEXT_LINES.exec(region))) {
236236
replaceBlock(match[0], start + match.index, eolTo);
237237
}
238238
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-cleanup",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Rollup plugin to trim trailing spaces, compact empty lines, and normalize line endings",
55
"main": "dist/rollup-plugin-cleanup.js",
66
"module": "dist/rollup-plugin-cleanup.es.js",
@@ -54,5 +54,8 @@
5454
"rollup-plugin-buble": "^0.16.0",
5555
"rollup-plugin-jsx": "^1.0.3",
5656
"rollup-plugin-riot": "^1.1.0"
57+
},
58+
"peerDependencies": {
59+
"rollup": ">=0.50.0"
5760
}
5861
}

0 commit comments

Comments
 (0)