|  | 
|  | 1 | +"use strict" | 
|  | 2 | + | 
|  | 3 | +const bufferModule = require("./node-builtins-modules/buffer.js") | 
|  | 4 | +const consoleModule = require("./node-builtins-modules/console.js") | 
|  | 5 | +const cryptoModule = require("./node-builtins-modules/crypto.js") | 
|  | 6 | +const eventsModule = require("./node-builtins-modules/events.js") | 
|  | 7 | +const processModule = require("./node-builtins-modules/process.js") | 
|  | 8 | +const perfModule = require("./node-builtins-modules/perf_hooks.js") | 
|  | 9 | +const streamModule = require("./node-builtins-modules/stream.js") | 
|  | 10 | +const timersModule = require("./node-builtins-modules/timers.js") | 
|  | 11 | +const urlModule = require("./node-builtins-modules/url.js") | 
|  | 12 | +const utilModule = require("./node-builtins-modules/util.js") | 
|  | 13 | +const workerThreadsModule = require("./node-builtins-modules/worker_threads.js") | 
|  | 14 | + | 
|  | 15 | +const { buffer } = bufferModule | 
|  | 16 | +const { console } = consoleModule | 
|  | 17 | +const { crypto } = cryptoModule | 
|  | 18 | +const { events } = eventsModule | 
|  | 19 | +const { process } = processModule | 
|  | 20 | +const { perf_hooks } = perfModule | 
|  | 21 | +const { ["stream/web"]: WebStream } = streamModule | 
|  | 22 | +const { timers } = timersModule | 
|  | 23 | +const { url } = urlModule | 
|  | 24 | +const { util } = utilModule | 
|  | 25 | +const { worker_threads } = workerThreadsModule | 
|  | 26 | + | 
|  | 27 | +const { READ } = require("@eslint-community/eslint-utils") | 
|  | 28 | + | 
|  | 29 | +/** @type {import('./types.js').SupportVersionTraceMap} */ | 
|  | 30 | +const nodeGlobals = { | 
|  | 31 | +    __filename: { [READ]: { supported: ["0.0.1"] } }, | 
|  | 32 | +    __dirname: { [READ]: { supported: ["0.1.27"] } }, | 
|  | 33 | +    require: { | 
|  | 34 | +        [READ]: { supported: ["0.1.13"] }, | 
|  | 35 | +        cache: { [READ]: { supported: ["0.3.0"] } }, | 
|  | 36 | +        extensions: { | 
|  | 37 | +            [READ]: { | 
|  | 38 | +                supported: ["0.3.0"], | 
|  | 39 | +                deprecated: ["0.10.6"], | 
|  | 40 | +            }, | 
|  | 41 | +        }, | 
|  | 42 | +        main: { [READ]: { supported: ["0.1.17"] } }, | 
|  | 43 | +        resolve: { | 
|  | 44 | +            [READ]: { supported: ["0.3.0"] }, | 
|  | 45 | +            paths: { [READ]: { supported: ["8.9.0"] } }, | 
|  | 46 | +        }, | 
|  | 47 | +    }, | 
|  | 48 | +    module: { | 
|  | 49 | +        [READ]: { supported: ["0.1.16"] }, | 
|  | 50 | +        children: { [READ]: { supported: ["0.1.16"] } }, | 
|  | 51 | +        exports: { [READ]: { supported: ["0.1.16"] } }, | 
|  | 52 | +        filename: { [READ]: { supported: ["0.1.16"] } }, | 
|  | 53 | +        id: { [READ]: { supported: ["0.1.16"] } }, | 
|  | 54 | +        isPreloading: { [READ]: { supported: ["15.4.0", "14.17.0"] } }, | 
|  | 55 | +        loaded: { [READ]: { supported: ["0.1.16"] } }, | 
|  | 56 | +        parent: { | 
|  | 57 | +            [READ]: { | 
|  | 58 | +                supported: ["0.1.16"], | 
|  | 59 | +                deprecated: ["14.6.0", "12.19.0"], | 
|  | 60 | +            }, | 
|  | 61 | +        }, | 
|  | 62 | +        path: { [READ]: { supported: ["11.14.0"] } }, | 
|  | 63 | +        paths: { [READ]: { supported: ["0.4.0"] } }, | 
|  | 64 | +        require: { [READ]: { supported: ["0.5.1"] } }, | 
|  | 65 | +    }, | 
|  | 66 | +    exports: { [READ]: { supported: ["0.1.12"] } }, | 
|  | 67 | + | 
|  | 68 | +    AbortController: { | 
|  | 69 | +        [READ]: { experimental: ["15.0.0", "14.17.0"], supported: ["15.4.0"] }, | 
|  | 70 | +    }, | 
|  | 71 | +    AbortSignal: { | 
|  | 72 | +        [READ]: { supported: ["15.0.0", "14.17.0"] }, | 
|  | 73 | +        abort: { [READ]: { supported: ["15.12.0", "14.17.0"] } }, | 
|  | 74 | +        timeout: { [READ]: { supported: ["17.3.0", "16.14.0"] } }, | 
|  | 75 | +        any: { [READ]: { supported: ["20.3.0", "18.17.0"] } }, | 
|  | 76 | +    }, | 
|  | 77 | +    DOMException: { [READ]: { supported: ["17.0.0"] } }, | 
|  | 78 | +    FormData: { | 
|  | 79 | +        [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, | 
|  | 80 | +    }, | 
|  | 81 | +    Headers: { | 
|  | 82 | +        [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, | 
|  | 83 | +    }, | 
|  | 84 | +    MessageEvent: { [READ]: { supported: ["15.0.0"] } }, | 
|  | 85 | +    Navigator: { [READ]: { experimental: ["21.0.0"] } }, | 
|  | 86 | +    Request: { | 
|  | 87 | +        [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, | 
|  | 88 | +    }, | 
|  | 89 | +    Response: { | 
|  | 90 | +        [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, | 
|  | 91 | +    }, | 
|  | 92 | +    WebAssembly: { [READ]: { supported: ["8.0.0"] } }, | 
|  | 93 | +    WebSocket: { [READ]: { experimental: ["21.0.0", "20.10.0"] } }, | 
|  | 94 | + | 
|  | 95 | +    fetch: { | 
|  | 96 | +        [READ]: { experimental: ["17.5.0", "16.15.0"], supported: ["21.0.0"] }, | 
|  | 97 | +    }, | 
|  | 98 | +    global: { [READ]: { supported: ["0.1.27"], deprecated: ["12.0.0"] } }, | 
|  | 99 | +    queueMicrotask: { | 
|  | 100 | +        [READ]: { supported: ["12.0.0"], experimental: ["11.0.0"] }, | 
|  | 101 | +    }, | 
|  | 102 | +    navigator: { | 
|  | 103 | +        [READ]: { experimental: ["21.0.0"] }, | 
|  | 104 | +        hardwareConcurrency: { [READ]: { supported: ["21.0.0"] } }, | 
|  | 105 | +        language: { [READ]: { supported: ["21.2.0"] } }, | 
|  | 106 | +        languages: { [READ]: { supported: ["21.2.0"] } }, | 
|  | 107 | +        platform: { [READ]: { supported: ["21.2.0"] } }, | 
|  | 108 | +        userAgent: { [READ]: { supported: ["21.1.0"] } }, | 
|  | 109 | +    }, | 
|  | 110 | +    structuredClone: { [READ]: { supported: ["17.0.0"] } }, | 
|  | 111 | + | 
|  | 112 | +    // module.buffer | 
|  | 113 | +    Blob: buffer.Blob, | 
|  | 114 | +    Buffer: { | 
|  | 115 | +        ...buffer.Buffer, | 
|  | 116 | +        [READ]: { supported: ["0.1.103"] }, | 
|  | 117 | +    }, | 
|  | 118 | +    File: buffer.File, | 
|  | 119 | +    atob: { [READ]: { supported: ["16.0.0"] } }, | 
|  | 120 | +    btoa: { [READ]: { supported: ["16.0.0"] } }, | 
|  | 121 | + | 
|  | 122 | +    // module.console | 
|  | 123 | +    console: console, | 
|  | 124 | + | 
|  | 125 | +    // module.crypto | 
|  | 126 | +    crypto: { | 
|  | 127 | +        ...crypto.webcrypto, | 
|  | 128 | +        [READ]: { experimental: ["17.6.0", "16.15.0"] }, | 
|  | 129 | +    }, | 
|  | 130 | +    Crypto: { [READ]: { experimental: ["17.6.0", "16.15.0"] } }, | 
|  | 131 | +    CryptoKey: { [READ]: { experimental: ["17.6.0", "16.15.0"] } }, | 
|  | 132 | +    SubtleCrypto: { [READ]: { experimental: ["17.6.0", "16.15.0"] } }, | 
|  | 133 | + | 
|  | 134 | +    // module.events | 
|  | 135 | +    CustomEvent: events.CustomEvent, | 
|  | 136 | +    Event: events.Event, | 
|  | 137 | +    EventTarget: events.EventTarget, | 
|  | 138 | + | 
|  | 139 | +    // module.perf_hooks | 
|  | 140 | +    PerformanceEntry: { | 
|  | 141 | +        ...perf_hooks.PerformanceEntry, | 
|  | 142 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 143 | +    }, | 
|  | 144 | +    PerformanceMark: { | 
|  | 145 | +        ...perf_hooks.PerformanceMark, | 
|  | 146 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 147 | +    }, | 
|  | 148 | +    PerformanceMeasure: { | 
|  | 149 | +        ...perf_hooks.PerformanceMeasure, | 
|  | 150 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 151 | +    }, | 
|  | 152 | +    PerformanceObserver: { | 
|  | 153 | +        ...perf_hooks.PerformanceObserver, | 
|  | 154 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 155 | +    }, | 
|  | 156 | +    PerformanceObserverEntryList: { | 
|  | 157 | +        ...perf_hooks.PerformanceObserverEntryList, | 
|  | 158 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 159 | +    }, | 
|  | 160 | +    PerformanceResourceTiming: { | 
|  | 161 | +        ...perf_hooks.PerformanceResourceTiming, | 
|  | 162 | +        [READ]: { supported: ["19.0.0"] }, | 
|  | 163 | +    }, | 
|  | 164 | +    performance: { | 
|  | 165 | +        ...perf_hooks.performance, | 
|  | 166 | +        [READ]: { supported: ["16.0.0"] }, | 
|  | 167 | +    }, | 
|  | 168 | + | 
|  | 169 | +    // module.process | 
|  | 170 | +    process: process, | 
|  | 171 | + | 
|  | 172 | +    // module.stream | 
|  | 173 | +    ReadableStream: { | 
|  | 174 | +        ...WebStream.ReadableStream, | 
|  | 175 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 176 | +    }, | 
|  | 177 | +    ReadableStreamDefaultReader: { | 
|  | 178 | +        ...WebStream.ReadableStreamDefaultReader, | 
|  | 179 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 180 | +    }, | 
|  | 181 | +    ReadableStreamBYOBReader: { | 
|  | 182 | +        ...WebStream.ReadableStreamBYOBReader, | 
|  | 183 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 184 | +    }, | 
|  | 185 | +    ReadableStreamDefaultController: { | 
|  | 186 | +        ...WebStream.ReadableStreamDefaultController, | 
|  | 187 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 188 | +    }, | 
|  | 189 | +    ReadableByteStreamController: { | 
|  | 190 | +        ...WebStream.ReadableByteStreamController, | 
|  | 191 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 192 | +    }, | 
|  | 193 | +    ReadableStreamBYOBRequest: { | 
|  | 194 | +        ...WebStream.ReadableStreamBYOBRequest, | 
|  | 195 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 196 | +    }, | 
|  | 197 | +    WritableStream: { | 
|  | 198 | +        ...WebStream.WritableStream, | 
|  | 199 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 200 | +    }, | 
|  | 201 | +    WritableStreamDefaultWriter: { | 
|  | 202 | +        ...WebStream.WritableStreamDefaultWriter, | 
|  | 203 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 204 | +    }, | 
|  | 205 | +    WritableStreamDefaultController: { | 
|  | 206 | +        ...WebStream.WritableStreamDefaultController, | 
|  | 207 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 208 | +    }, | 
|  | 209 | +    TransformStream: { | 
|  | 210 | +        ...WebStream.TransformStream, | 
|  | 211 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 212 | +    }, | 
|  | 213 | +    TransformStreamDefaultController: { | 
|  | 214 | +        ...WebStream.TransformStreamDefaultController, | 
|  | 215 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 216 | +    }, | 
|  | 217 | +    ByteLengthQueuingStrategy: { | 
|  | 218 | +        ...WebStream.ByteLengthQueuingStrategy, | 
|  | 219 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 220 | +    }, | 
|  | 221 | +    CountQueuingStrategy: { | 
|  | 222 | +        ...WebStream.CountQueuingStrategy, | 
|  | 223 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 224 | +    }, | 
|  | 225 | +    TextEncoderStream: { | 
|  | 226 | +        ...WebStream.TextEncoderStream, | 
|  | 227 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 228 | +    }, | 
|  | 229 | +    TextDecoderStream: { | 
|  | 230 | +        ...WebStream.TextDecoderStream, | 
|  | 231 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 232 | +    }, | 
|  | 233 | +    CompressionStream: { | 
|  | 234 | +        ...WebStream.CompressionStream, | 
|  | 235 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 236 | +    }, | 
|  | 237 | +    DecompressionStream: { | 
|  | 238 | +        ...WebStream.DecompressionStream, | 
|  | 239 | +        [READ]: { experimental: ["18.0.0"] }, | 
|  | 240 | +    }, | 
|  | 241 | + | 
|  | 242 | +    // module.timers | 
|  | 243 | +    setInterval: timers.setInterval, | 
|  | 244 | +    clearInterval: timers.clearInterval, | 
|  | 245 | +    setTimeout: timers.setTimeout, | 
|  | 246 | +    clearTimeout: timers.clearTimeout, | 
|  | 247 | +    setImmediate: timers.setImmediate, | 
|  | 248 | +    clearImmediate: timers.clearImmediate, | 
|  | 249 | + | 
|  | 250 | +    // module.url | 
|  | 251 | +    URL: { | 
|  | 252 | +        ...url.URL, | 
|  | 253 | +        [READ]: { supported: ["10.0.0"] }, | 
|  | 254 | +    }, | 
|  | 255 | +    URLSearchParams: { | 
|  | 256 | +        ...url.URLSearchParams, | 
|  | 257 | +        [READ]: { supported: ["10.0.0"] }, | 
|  | 258 | +    }, | 
|  | 259 | + | 
|  | 260 | +    // module.util | 
|  | 261 | +    TextDecoder: { | 
|  | 262 | +        ...util.TextDecoder, | 
|  | 263 | +        [READ]: { supported: ["11.0.0"] }, | 
|  | 264 | +    }, | 
|  | 265 | +    TextEncoder: { | 
|  | 266 | +        ...util.TextEncoder, | 
|  | 267 | +        [READ]: { supported: ["11.0.0"] }, | 
|  | 268 | +    }, | 
|  | 269 | + | 
|  | 270 | +    // module.worker_threads | 
|  | 271 | +    BroadcastChannel: { | 
|  | 272 | +        ...worker_threads.BroadcastChannel, | 
|  | 273 | +        [READ]: { supported: ["18.0.0"] }, | 
|  | 274 | +    }, | 
|  | 275 | +    MessageChannel: { | 
|  | 276 | +        ...worker_threads.MessageChannel, | 
|  | 277 | +        [READ]: { supported: ["15.0.0"] }, | 
|  | 278 | +    }, | 
|  | 279 | +    MessagePort: { | 
|  | 280 | +        ...worker_threads.MessagePort, | 
|  | 281 | +        [READ]: { supported: ["15.0.0"] }, | 
|  | 282 | +    }, | 
|  | 283 | +} | 
|  | 284 | + | 
|  | 285 | +/** @type {import('./types.js').SupportVersionTraceMap} */ | 
|  | 286 | +module.exports = nodeGlobals | 
0 commit comments