experimental-worker.cjs.map
1.97 KB
{"version":3,"names":["major","minor","process","versions","node","split","map","Number","Error","normalizeESLintConfig","require","analyzeScope","baseParse","WorkerClient","client","exports","parseForESLint","code","options","normalizedOptions","ast","scopeManager","visitorKeys","getVisitorKeys"],"sources":["../src/experimental-worker.cjs"],"sourcesContent":["const [major, minor] = process.versions.node.split(\".\").map(Number);\n\nif (major < 12 || (major === 12 && minor < 3)) {\n throw new Error(\n \"@babel/eslint-parser/experimental-worker requires Node.js >= 12.3.0\",\n );\n}\n\nconst { normalizeESLintConfig } = require(\"./configuration.cjs\");\nconst analyzeScope = require(\"./analyze-scope.cjs\");\nconst baseParse = require(\"./parse.cjs\");\n\nconst { WorkerClient } = require(\"./client.cjs\");\nconst client = new WorkerClient();\n\nexports.parseForESLint = function (code, options = {}) {\n const normalizedOptions = normalizeESLintConfig(options);\n const ast = baseParse(code, normalizedOptions, client);\n const scopeManager = analyzeScope(ast, normalizedOptions, client);\n\n return { ast, scopeManager, visitorKeys: client.getVisitorKeys() };\n};\n"],"mappings":"AAAA,MAAM,CAACA,KAAD,EAAQC,KAAR,IAAiBC,OAAO,CAACC,QAAR,CAAiBC,IAAjB,CAAsBC,KAAtB,CAA4B,GAA5B,EAAiCC,GAAjC,CAAqCC,MAArC,CAAvB;;AAEA,IAAIP,KAAK,GAAG,EAAR,IAAeA,KAAK,KAAK,EAAV,IAAgBC,KAAK,GAAG,CAA3C,EAA+C;EAC7C,MAAM,IAAIO,KAAJ,CACJ,qEADI,CAAN;AAGD;;AAED,MAAM;EAAEC;AAAF,IAA4BC,OAAO,CAAC,qBAAD,CAAzC;;AACA,MAAMC,YAAY,GAAGD,OAAO,CAAC,qBAAD,CAA5B;;AACA,MAAME,SAAS,GAAGF,OAAO,CAAC,aAAD,CAAzB;;AAEA,MAAM;EAAEG;AAAF,IAAmBH,OAAO,CAAC,cAAD,CAAhC;;AACA,MAAMI,MAAM,GAAG,IAAID,YAAJ,EAAf;;AAEAE,OAAO,CAACC,cAAR,GAAyB,UAAUC,IAAV,EAAgBC,OAAO,GAAG,EAA1B,EAA8B;EACrD,MAAMC,iBAAiB,GAAGV,qBAAqB,CAACS,OAAD,CAA/C;EACA,MAAME,GAAG,GAAGR,SAAS,CAACK,IAAD,EAAOE,iBAAP,EAA0BL,MAA1B,CAArB;EACA,MAAMO,YAAY,GAAGV,YAAY,CAACS,GAAD,EAAMD,iBAAN,EAAyBL,MAAzB,CAAjC;EAEA,OAAO;IAAEM,GAAF;IAAOC,YAAP;IAAqBC,WAAW,EAAER,MAAM,CAACS,cAAP;EAAlC,CAAP;AACD,CAND"}