Skip to content

Commit bedd8ce

Browse files
committedJun 13, 2021
Meta tweaks
1 parent 4eb8f47 commit bedd8ce

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed
 

‎index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ declare namespace cpFile {
1010
/**
1111
[Permissions](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) for created directories.
1212
13+
It has no effect on Windows.
14+
1315
@default 0o777
1416
*/
1517
readonly directoryMode?: number;

‎package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
"sinon": "^9.0.0",
5555
"tsd": "^0.11.0",
5656
"uuid": "^7.0.2",
57-
"xo": "^0.27.2"
57+
"xo": "^0.28.2"
58+
},
59+
"xo": {
60+
"rules": {
61+
"unicorn/string-content": "off"
62+
}
5863
}
5964
}

‎readme.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ Overwrite existing destination file.
6464
Type: `number`\
6565
Default: `0o777`
6666

67-
[Permissions](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) for created directories. Not supported on Windows.
67+
[Permissions](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) for created directories.
68+
69+
It has no effect on Windows.
6870

6971
### cpFile.on('progress', handler)
7072

‎test/async.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ test('do not create `destination` directory on unreadable `source`', async t =>
110110
test('preserve timestamps', async t => {
111111
await cpFile('license', t.context.destination);
112112
const licenseStats = fs.lstatSync('license');
113-
const tempStats = fs.lstatSync(t.context.destination);
114-
assertDateEqual(t, licenseStats.atime, tempStats.atime);
115-
assertDateEqual(t, licenseStats.mtime, tempStats.mtime);
113+
const temporaryStats = fs.lstatSync(t.context.destination);
114+
assertDateEqual(t, licenseStats.atime, temporaryStats.atime);
115+
assertDateEqual(t, licenseStats.mtime, temporaryStats.mtime);
116116
});
117117

118118
test('preserve mode', async t => {
119119
await cpFile('license', t.context.destination);
120120
const licenseStats = fs.lstatSync('license');
121-
const tempStats = fs.lstatSync(t.context.destination);
122-
t.is(licenseStats.mode, tempStats.mode);
121+
const temporaryStats = fs.lstatSync(t.context.destination);
122+
t.is(licenseStats.mode, temporaryStats.mode);
123123
});
124124

125125
test('throw an Error if `source` does not exists', async t => {

‎test/sync.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ test('do not create `destination` directory on unreadable `source`', t => {
125125
test('preserve timestamps', t => {
126126
cpFile.sync('license', t.context.destination);
127127
const licenseStats = fs.lstatSync('license');
128-
const tempStats = fs.lstatSync(t.context.destination);
129-
assertDateEqual(t, licenseStats.atime, tempStats.atime);
130-
assertDateEqual(t, licenseStats.mtime, tempStats.mtime);
128+
const temporaryStats = fs.lstatSync(t.context.destination);
129+
assertDateEqual(t, licenseStats.atime, temporaryStats.atime);
130+
assertDateEqual(t, licenseStats.mtime, temporaryStats.mtime);
131131
});
132132

133133
test('preserve mode', t => {
134134
cpFile.sync('license', t.context.destination);
135135
const licenseStats = fs.lstatSync('license');
136-
const tempStats = fs.lstatSync(t.context.destination);
137-
t.is(licenseStats.mode, tempStats.mode);
136+
const temporaryStats = fs.lstatSync(t.context.destination);
137+
t.is(licenseStats.mode, temporaryStats.mode);
138138
});
139139

140140
test('throw an Error if `source` does not exists', t => {

0 commit comments

Comments
 (0)
Please sign in to comment.