Skip to content

Commit

Permalink
Breaking: Rename relative option to relativeSymlinks (closes #251)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Nov 30, 2017
1 parent 1665b38 commit 09379ba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/dest/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var config = {
type: 'boolean',
default: isWindows,
},
relative: {
relativeSymlinks: {
type: 'boolean',
default: false,
},
Expand Down
2 changes: 1 addition & 1 deletion lib/dest/write-contents/write-symbolic-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function writeSymbolicLink(file, optResolver, onWritten) {

var symDirType = useJunctions ? 'junction' : 'dir';
var symType = isDirectory ? symDirType : 'file';
var isRelative = optResolver.resolve('relative', file);
var isRelative = optResolver.resolve('relativeSymlinks', file);

// This is done after prepare() to use the adjusted file.base property
if (isRelative && symType !== 'junction') {
Expand Down
2 changes: 1 addition & 1 deletion lib/symlink/link-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function linkStream(optResolver) {

var symDirType = useJunctions ? 'junction' : 'dir';
var symType = isDirectory ? symDirType : 'file';
var isRelative = optResolver.resolve('relative', file);
var isRelative = optResolver.resolve('relativeSymlinks', file);

// This is done after prepare() to use the adjusted file.base property
if (isRelative && symType !== 'junction') {
Expand Down
2 changes: 1 addition & 1 deletion lib/symlink/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var config = {
type: 'boolean',
default: isWindows,
},
relative: {
relativeSymlinks: {
type: 'boolean',
default: false,
},
Expand Down
14 changes: 7 additions & 7 deletions test/dest-symlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('.dest() with symlinks', function() {

pipe([
from.obj([file]),
vfs.dest(outputBase, { relative: true }),
vfs.dest(outputBase, { relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down Expand Up @@ -265,12 +265,12 @@ describe('.dest() with symlinks', function() {

pipe([
from.obj([file]),
vfs.dest(outputBase, { relative: true }),
vfs.dest(outputBase, { relativeSymlinks: true }),
concat(assert),
], done);
});

it('(windows) relative option is ignored when junctions are used', function(done) {
it('(windows) relativeSymlinks option is ignored when junctions are used', function(done) {
if (!isWindows) {
this.skip();
return;
Expand Down Expand Up @@ -302,12 +302,12 @@ describe('.dest() with symlinks', function() {

pipe([
from.obj([file]),
vfs.dest(outputBase, { useJunctions: true, relative: true }),
vfs.dest(outputBase, { useJunctions: true, relativeSymlinks: true }),
concat(assert),
], done);
});

it('(windows) supports relative option when link is not for a directory', function(done) {
it('(windows) supports relativeSymlinks option when link is not for a directory', function(done) {
if (!isWindows) {
this.skip();
return;
Expand All @@ -332,7 +332,7 @@ describe('.dest() with symlinks', function() {
pipe([
from.obj([file]),
// The useJunctions option is ignored when file is not a directory
vfs.dest(outputBase, { useJunctions: true, relative: true }),
vfs.dest(outputBase, { useJunctions: true, relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down Expand Up @@ -371,7 +371,7 @@ describe('.dest() with symlinks', function() {

pipe([
from.obj([file]),
vfs.dest(outputBase, { useJunctions: false, relative: true }),
vfs.dest(outputBase, { useJunctions: false, relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down
14 changes: 7 additions & 7 deletions test/symlink.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('symlink stream', function() {

pipe([
from.obj([file]),
vfs.symlink(outputBase, { relative: true }),
vfs.symlink(outputBase, { relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down Expand Up @@ -417,12 +417,12 @@ describe('symlink stream', function() {

pipe([
from.obj([file]),
vfs.symlink(outputBase, { relative: true }),
vfs.symlink(outputBase, { relativeSymlinks: true }),
concat(assert),
], done);
});

it('(windows) relative option is ignored when junctions are used', function(done) {
it('(windows) relativeSymlinks option is ignored when junctions are used', function(done) {
if (!isWindows) {
this.skip();
return;
Expand Down Expand Up @@ -455,12 +455,12 @@ describe('symlink stream', function() {

pipe([
from.obj([file]),
vfs.symlink(outputBase, { useJunctions: true, relative: true }),
vfs.symlink(outputBase, { useJunctions: true, relativeSymlinks: true }),
concat(assert),
], done);
});

it('(windows) supports relative option when link is not for a directory', function(done) {
it('(windows) supports relativeSymlinks option when link is not for a directory', function(done) {
if (!isWindows) {
this.skip();
return;
Expand All @@ -485,7 +485,7 @@ describe('symlink stream', function() {
pipe([
from.obj([file]),
// The useJunctions option is ignored when file is not a directory
vfs.symlink(outputBase, { useJunctions: true, relative: true }),
vfs.symlink(outputBase, { useJunctions: true, relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down Expand Up @@ -522,7 +522,7 @@ describe('symlink stream', function() {

pipe([
from.obj([file]),
vfs.symlink(outputBase, { useJunctions: false, relative: true }),
vfs.symlink(outputBase, { useJunctions: false, relativeSymlinks: true }),
concat(assert),
], done);
});
Expand Down

0 comments on commit 09379ba

Please sign in to comment.