forked from eslint-community/eslint-plugin-n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfs.js
196 lines (189 loc) · 8.65 KB
/
fs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
"use strict"
const { READ, CALL, CONSTRUCT } = require("@eslint-community/eslint-utils")
/** @type {import('../types.js').SupportVersionTraceMap} */
const promises_api = {
FileHandle: { [READ]: { supported: ["10.0.0"] } },
access: { [READ]: { supported: ["10.0.0"] } },
appendFile: { [READ]: { supported: ["10.0.0"] } },
chmod: { [READ]: { supported: ["10.0.0"] } },
chown: { [READ]: { supported: ["10.0.0"] } },
constants: { [READ]: { supported: ["18.4.0", "16.17.0"] } },
copyFile: { [READ]: { supported: ["10.0.0"] } },
cp: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } },
glob: { [READ]: { experimental: ["22.0.0"] } },
lchmod: { [READ]: { supported: ["10.0.0"], deprecated: ["10.0.0"] } },
lchown: { [READ]: { supported: ["10.0.0"] } },
link: { [READ]: { supported: ["10.0.0"] } },
lstat: { [READ]: { supported: ["10.0.0"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdir: { [READ]: { supported: ["10.0.0"] } },
mkdtemp: { [READ]: { supported: ["10.0.0"] } },
open: { [READ]: { supported: ["10.0.0"] } },
opendir: { [READ]: { supported: ["12.12.0"] } },
readFile: { [READ]: { supported: ["10.0.0"] } },
readdir: { [READ]: { supported: ["10.0.0"] } },
readlink: { [READ]: { supported: ["10.0.0"] } },
realpath: { [READ]: { supported: ["10.0.0"] } },
rename: { [READ]: { supported: ["10.0.0"] } },
rm: { [READ]: { supported: ["14.14.0"] } },
rmdir: { [READ]: { supported: ["10.0.0"] } },
stat: { [READ]: { supported: ["10.0.0"] } },
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
symlink: { [READ]: { supported: ["10.0.0"] } },
truncate: { [READ]: { supported: ["10.0.0"] } },
unlink: { [READ]: { supported: ["10.0.0"] } },
utimes: { [READ]: { supported: ["10.0.0"] } },
watch: { [READ]: { supported: ["15.9.0", "14.18.0"] } },
writeFile: { [READ]: { supported: ["10.0.0"] } },
}
/** @type {import('../types.js').SupportVersionTraceMap} */
const callback_api = {
access: { [READ]: { supported: ["0.11.15"] } },
appendFile: { [READ]: { supported: ["0.6.7"] } },
chmod: { [READ]: { supported: ["0.1.30"] } },
chown: { [READ]: { supported: ["0.1.97"] } },
close: { [READ]: { supported: ["0.0.2"] } },
copyFile: { [READ]: { supported: ["8.5.0"] } },
cp: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } },
createReadStream: { [READ]: { supported: ["0.1.31"] } },
createWriteStream: { [READ]: { supported: ["0.1.31"] } },
exists: { [READ]: { supported: ["0.0.2"], deprecated: ["1.0.0"] } },
fchmod: { [READ]: { supported: ["0.4.7"] } },
fchown: { [READ]: { supported: ["0.4.7"] } },
fdatasync: { [READ]: { supported: ["0.1.96"] } },
fstat: { [READ]: { supported: ["0.1.95"] } },
fsync: { [READ]: { supported: ["0.1.96"] } },
ftruncate: { [READ]: { supported: ["0.8.6"] } },
futimes: { [READ]: { supported: ["0.4.2"] } },
glob: { [READ]: { experimental: ["22.0.0"] } },
lchmod: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchown: { [READ]: { supported: ["0.1.8"] } },
link: { [READ]: { supported: ["0.1.31"] } },
lstat: { [READ]: { supported: ["0.1.30"] } },
lutimes: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdir: { [READ]: { supported: ["0.1.8"] } },
mkdtemp: { [READ]: { supported: ["5.10.0"] } },
native: { [READ]: { supported: ["9.2.0"] } },
open: { [READ]: { supported: ["0.0.2"] } },
openAsBlob: { [READ]: { experimental: ["19.8.0"] } },
opendir: { [READ]: { supported: ["12.12.0"] } },
read: { [READ]: { supported: ["0.0.2"] } },
readdir: { [READ]: { supported: ["0.1.8"] } },
readFile: { [READ]: { supported: ["0.1.29"] } },
readlink: { [READ]: { supported: ["0.1.31"] } },
readv: { [READ]: { supported: ["13.13.0", "12.17.0"] } },
realpath: {
[READ]: { supported: ["0.1.31"] },
native: { [READ]: { supported: ["9.2.0"] } },
},
rename: { [READ]: { supported: ["0.0.2"] } },
rm: { [READ]: { supported: ["14.14.0"] } },
rmdir: { [READ]: { supported: ["0.0.2"] } },
stat: { [READ]: { supported: ["0.0.2"] } },
statfs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
symlink: { [READ]: { supported: ["0.1.31"] } },
truncate: { [READ]: { supported: ["0.8.6"] } },
unlink: { [READ]: { supported: ["0.0.2"] } },
unwatchFile: { [READ]: { supported: ["0.1.31"] } },
utimes: { [READ]: { supported: ["0.4.2"] } },
watch: { [READ]: { supported: ["0.5.10"] } },
watchFile: { [READ]: { supported: ["0.1.31"] } },
write: { [READ]: { supported: ["0.0.2"] } },
writeFile: { [READ]: { supported: ["0.1.29"] } },
writev: { [READ]: { supported: ["12.9.0"] } },
}
/** @type {import('../types.js').SupportVersionTraceMap} */
const synchronous_api = {
accessSync: { [READ]: { supported: ["0.11.15"] } },
appendFileSync: { [READ]: { supported: ["0.6.7"] } },
chmodSync: { [READ]: { supported: ["0.6.7"] } },
chownSync: { [READ]: { supported: ["0.1.97"] } },
closeSync: { [READ]: { supported: ["0.1.21"] } },
copyFileSync: { [READ]: { supported: ["8.5.0"] } },
cpSync: { [READ]: { supported: ["22.3.0"], experimental: ["16.7.0"] } },
existsSync: { [READ]: { supported: ["0.1.21"] } },
fchmodSync: { [READ]: { supported: ["0.4.7"] } },
fchownSync: { [READ]: { supported: ["0.4.7"] } },
fdatasyncSync: { [READ]: { supported: ["0.1.96"] } },
fstatSync: { [READ]: { supported: ["0.1.95"] } },
fsyncSync: { [READ]: { supported: ["0.1.96"] } },
ftruncateSync: { [READ]: { supported: ["0.8.6"] } },
futimesSync: { [READ]: { supported: ["0.4.2"] } },
globSync: { [READ]: { experimental: ["22.0.0"] } },
lchmodSync: { [READ]: { supported: ["0.1.8"], deprecated: ["0.4.7"] } },
lchownSync: { [READ]: { supported: ["0.1.8"] } },
linkSync: { [READ]: { supported: ["0.1.31"] } },
lstatSync: { [READ]: { supported: ["0.1.30"] } },
lutimesSync: { [READ]: { supported: ["14.5.0", "12.19.0"] } },
mkdirSync: { [READ]: { supported: ["0.1.21"] } },
mkdtempSync: { [READ]: { supported: ["5.10.0"] } },
native: { [READ]: { supported: ["9.2.0"] } },
opendirSync: { [READ]: { supported: ["12.12.0"] } },
openSync: { [READ]: { supported: ["0.1.21"] } },
readdirSync: { [READ]: { supported: ["0.1.21"] } },
readFileSync: { [READ]: { supported: ["0.1.8"] } },
readlinkSync: { [READ]: { supported: ["0.1.31"] } },
readSync: { [READ]: { supported: ["0.1.21"] } },
readvSync: { [READ]: { supported: ["13.13.0", "12.17.0"] } },
realpathSync: {
[READ]: { supported: ["0.1.31"] },
native: { [READ]: { supported: ["9.2.0"] } },
},
renameSync: { [READ]: { supported: ["0.1.21"] } },
rmdirSync: { [READ]: { supported: ["0.1.21"] } },
rmSync: { [READ]: { supported: ["14.14.0"] } },
statfsSync: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
statSync: { [READ]: { supported: ["0.1.21"] } },
symlinkSync: { [READ]: { supported: ["0.1.31"] } },
truncateSync: { [READ]: { supported: ["0.8.6"] } },
unlinkSync: { [READ]: { supported: ["0.1.21"] } },
utimesSync: { [READ]: { supported: ["0.4.2"] } },
writeFileSync: { [READ]: { supported: ["0.1.29"] } },
writeSync: { [READ]: { supported: ["0.1.21"] } },
writevSync: { [READ]: { supported: ["12.9.0"] } },
}
/** @type {import('../types.js').SupportVersionTraceMap} */
const fs = {
promises: {
[READ]: {
experimental: ["10.0.0"],
supported: ["11.14.0", "10.17.0"],
},
...promises_api,
},
...callback_api,
...synchronous_api,
constants: { [READ]: { supported: ["0.1.8"] } },
Dir: { [READ]: { supported: ["12.12.0"] } },
Dirent: { [READ]: { supported: ["10.10.0"] } },
FSWatcher: { [READ]: { supported: ["0.5.8"] } },
StatWatcher: { [READ]: { supported: ["14.3.0", "12.20.0"] } },
ReadStream: { [READ]: { supported: ["0.1.93"] } },
Stats: {
[READ]: { supported: ["0.1.21"] },
[CALL]: { deprecated: ["22.0.0", "20.13.0"] },
[CONSTRUCT]: { deprecated: ["22.0.0", "20.13.0"] },
},
StatFs: { [READ]: { supported: ["19.6.0", "18.15.0"] } },
WriteStream: { [READ]: { supported: ["0.1.93"] } },
common_objects: { [READ]: { supported: ["0.1.8"] } },
}
/** @type {import('../types.js').SupportVersionTraceMap} */
module.exports = {
fs: {
[READ]: { supported: ["0.1.8"] },
...fs,
},
"node:fs": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...fs,
},
"fs/promises": {
[READ]: { supported: ["14.0.0"] },
...promises_api,
},
"node:fs/promises": {
[READ]: { supported: ["14.13.1"] },
...promises_api,
},
}