You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

gulp-revert-path

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-revert-path - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
+4
-3
index.js

@@ -10,8 +10,9 @@ 'use strict';

var highestIndex = history.length - 1;
var localReversions = reversions;
if (reversions > highestIndex) {
reversions = highestIndex;
if (localReversions > highestIndex) {
localReversions = highestIndex;
}
history.splice(-reversions, reversions);
history.splice(-localReversions, localReversions);
file.path = history[history.length - 1];

@@ -18,0 +19,0 @@

{
"name": "gulp-revert-path",
"version": "1.2.0",
"version": "1.2.1",
"description": "Revert the previous `file.path` change",

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

"scripts": {
"test": "mocha"
"test": "xo && mocha"
},

@@ -38,4 +38,5 @@ "files": [

"gulp-util": "^3.0.4",
"mocha": "*"
"mocha": "*",
"xo": "*"
}
}
+15
-15

@@ -18,21 +18,21 @@ # gulp-revert-path [![Build Status](https://travis-ci.org/sindresorhus/gulp-revert-path.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-revert-path)

```js
var gulp = require('gulp');
var babel = require('gulp-babel');
var revertPath = require('gulp-revert-path');
var rename = require('gulp-rename');
const gulp = require('gulp');
const babel = require('gulp-babel');
const revertPath = require('gulp-revert-path');
const rename = require('gulp-rename');
gulp.task('default', function () {
return gulp.src('src/app.jsx')
gulp.task('default', () =>
gulp.src('src/app.jsx')
.pipe(babel()) // file.path => src/app.js
.pipe(revertPath()) // file.path => src/app.jsx
.pipe(gulp.dest('dist'));
});
.pipe(gulp.dest('dist'))
);
gulp.task('es2015', function () {
return gulp.src('src/app.txt')
gulp.task('es2015', () =>
gulp.src('src/app.txt')
.pipe(rename('src/app.jsx')) // file.path => src/app.jsx
.pipe(babel()) // file.path => src/app.js
.pipe(revertPath(2)) // file.path => src/app.txt
.pipe(gulp.dest('dist'));
});
.pipe(gulp.dest('dist'))
);
```

@@ -43,7 +43,7 @@

### revertPath(reversions)
### revertPath([reversions])
#### reversions
Type: `number`
Type: `number`<br>
Default: `1`

@@ -61,2 +61,2 @@

MIT © [Sindre Sorhus](http://sindresorhus.com)
MIT © [Sindre Sorhus](https://sindresorhus.com)