Unverified Commit f0005039 authored by Balázs Orbán's avatar Balázs Orbán Committed by GitHub

unlock eslint-config-next dependencies (#35781)

Fixes #35753

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
parent 60f74230
......@@ -10,14 +10,14 @@
},
"dependencies": {
"@next/eslint-plugin-next": "12.1.6-canary.13",
"@rushstack/eslint-patch": "1.0.8",
"@typescript-eslint/parser": "5.19.0",
"eslint-import-resolver-node": "0.3.4",
"eslint-import-resolver-typescript": "2.4.0",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jsx-a11y": "6.5.1",
"eslint-plugin-react": "7.29.1",
"eslint-plugin-react-hooks": "4.3.0"
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.21.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0"
},
"peerDependencies": {
"eslint": "^7.23.0 || ^8.0.0",
......
(()=>{var r={773:(r,e,t)=>{var s=t(17);r.exports=function(r,e){if(e){var t=e.map((function(e){return s.resolve(r,e)}))}else{var t=r}var n=t.slice(1).reduce((function(r,e){if(!e.match(/^([A-Za-z]:)?\/|\\/)){throw new Error("relative path without a basedir")}var t=e.split(/\/+|\\+/);for(var s=0;r[s]===t[s]&&s<Math.min(r.length,t.length);s++);return r.slice(0,s)}),t[0].split(/\/+|\\+/));return n.length>1?n.join("/"):"/"}},153:(r,e,t)=>{"use strict";const s=t(147);const n=t(17);const{promisify:o}=t(837);const i=t(849);const c=i.satisfies(process.version,">=10.12.0");const checkPath=r=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(r.replace(n.parse(r).root,""));if(e){const e=new Error(`Path contains invalid characters: ${r}`);e.code="EINVAL";throw e}}};const processOptions=r=>{const e={mode:511&~process.umask(),fs:s};return{...e,...r}};const permissionError=r=>{const e=new Error(`operation not permitted, mkdir '${r}'`);e.code="EPERM";e.errno=-4048;e.path=r;e.syscall="mkdir";return e};const makeDir=async(r,e)=>{checkPath(r);e=processOptions(e);const t=o(e.fs.mkdir);const i=o(e.fs.stat);if(c&&e.fs.mkdir===s.mkdir){const s=n.resolve(r);await t(s,{mode:e.mode,recursive:true});return s}const make=async r=>{try{await t(r,e.mode);return r}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(n.dirname(r)===r){throw permissionError(r)}if(e.message.includes("null bytes")){throw e}await make(n.dirname(r));return make(r)}try{const e=await i(r);if(!e.isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw e}return r}};return make(n.resolve(r))};r.exports=makeDir;r.exports.sync=(r,e)=>{checkPath(r);e=processOptions(e);if(c&&e.fs.mkdirSync===s.mkdirSync){const t=n.resolve(r);s.mkdirSync(t,{mode:e.mode,recursive:true});return t}const make=r=>{try{e.fs.mkdirSync(r,e.mode)}catch(t){if(t.code==="EPERM"){throw t}if(t.code==="ENOENT"){if(n.dirname(r)===r){throw permissionError(r)}if(t.message.includes("null bytes")){throw t}make(n.dirname(r));return make(r)}try{if(!e.fs.statSync(r).isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw t}}return r};return make(n.resolve(r))}},449:(r,e,t)=>{"use strict";const s=t(17);const n=t(147);const o=t(773);const i=t(402);const c=t(153);const{env:a,cwd:u}=process;const isWritable=r=>{try{n.accessSync(r,n.constants.W_OK);return true}catch(r){return false}};function useDirectory(r,e){if(e.create){c.sync(r)}if(e.thunk){return(...e)=>s.join(r,...e)}return r}function getNodeModuleDirectory(r){const e=s.join(r,"node_modules");if(!isWritable(e)&&(n.existsSync(e)||!isWritable(s.join(r)))){return}return e}r.exports=(r={})=>{if(a.CACHE_DIR&&!["true","false","1","0"].includes(a.CACHE_DIR)){return useDirectory(s.join(a.CACHE_DIR,"find-cache-dir"),r)}let{cwd:e=u()}=r;if(r.files){e=o(e,r.files)}e=i.sync(e);if(!e){return}const t=getNodeModuleDirectory(e);if(!t){return undefined}return useDirectory(s.join(e,"node_modules",".cache",r.name),r)}},402:(r,e,t)=>{"use strict";const s=t(17);const n=t(55);const pkgDir=async r=>{const e=await n("package.json",{cwd:r});return e&&s.dirname(e)};r.exports=pkgDir;r.exports["default"]=pkgDir;r.exports.sync=r=>{const e=n.sync("package.json",{cwd:r});return e&&s.dirname(e)}},147:r=>{"use strict";r.exports=require("fs")},55:r=>{"use strict";r.exports=require("next/dist/compiled/find-up")},849:r=>{"use strict";r.exports=require("next/dist/compiled/semver")},17:r=>{"use strict";r.exports=require("path")},837:r=>{"use strict";r.exports=require("util")}};var e={};function __nccwpck_require__(t){var s=e[t];if(s!==undefined){return s.exports}var n=e[t]={exports:{}};var o=true;try{r[t](n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete e[t]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(449);module.exports=t})();
\ No newline at end of file
(()=>{var r={773:(r,e,t)=>{var s=t(17);r.exports=function(r,e){if(e){var t=e.map((function(e){return s.resolve(r,e)}))}else{var t=r}var n=t.slice(1).reduce((function(r,e){if(!e.match(/^([A-Za-z]:)?\/|\\/)){throw new Error("relative path without a basedir")}var t=e.split(/\/+|\\+/);for(var s=0;r[s]===t[s]&&s<Math.min(r.length,t.length);s++);return r.slice(0,s)}),t[0].split(/\/+|\\+/));return n.length>1?n.join("/"):"/"}},153:(r,e,t)=>{"use strict";const s=t(147);const n=t(17);const{promisify:o}=t(837);const i=t(849);const c=i.satisfies(process.version,">=10.12.0");const checkPath=r=>{if(process.platform==="win32"){const e=/[<>:"|?*]/.test(r.replace(n.parse(r).root,""));if(e){const e=new Error(`Path contains invalid characters: ${r}`);e.code="EINVAL";throw e}}};const processOptions=r=>{const e={mode:511&~process.umask(),fs:s};return{...e,...r}};const permissionError=r=>{const e=new Error(`operation not permitted, mkdir '${r}'`);e.code="EPERM";e.errno=-4048;e.path=r;e.syscall="mkdir";return e};const makeDir=async(r,e)=>{checkPath(r);e=processOptions(e);const t=o(e.fs.mkdir);const i=o(e.fs.stat);if(c&&e.fs.mkdir===s.mkdir){const s=n.resolve(r);await t(s,{mode:e.mode,recursive:true});return s}const make=async r=>{try{await t(r,e.mode);return r}catch(e){if(e.code==="EPERM"){throw e}if(e.code==="ENOENT"){if(n.dirname(r)===r){throw permissionError(r)}if(e.message.includes("null bytes")){throw e}await make(n.dirname(r));return make(r)}try{const e=await i(r);if(!e.isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw e}return r}};return make(n.resolve(r))};r.exports=makeDir;r.exports.sync=(r,e)=>{checkPath(r);e=processOptions(e);if(c&&e.fs.mkdirSync===s.mkdirSync){const t=n.resolve(r);s.mkdirSync(t,{mode:e.mode,recursive:true});return t}const make=r=>{try{e.fs.mkdirSync(r,e.mode)}catch(t){if(t.code==="EPERM"){throw t}if(t.code==="ENOENT"){if(n.dirname(r)===r){throw permissionError(r)}if(t.message.includes("null bytes")){throw t}make(n.dirname(r));return make(r)}try{if(!e.fs.statSync(r).isDirectory()){throw new Error("The path is not a directory")}}catch(r){throw t}}return r};return make(n.resolve(r))}},302:(r,e,t)=>{"use strict";const s=t(17);const n=t(55);const pkgDir=async r=>{const e=await n("package.json",{cwd:r});return e&&s.dirname(e)};r.exports=pkgDir;r.exports["default"]=pkgDir;r.exports.sync=r=>{const e=n.sync("package.json",{cwd:r});return e&&s.dirname(e)}},449:(r,e,t)=>{"use strict";const s=t(17);const n=t(147);const o=t(773);const i=t(302);const c=t(153);const{env:a,cwd:u}=process;const isWritable=r=>{try{n.accessSync(r,n.constants.W_OK);return true}catch(r){return false}};function useDirectory(r,e){if(e.create){c.sync(r)}if(e.thunk){return(...e)=>s.join(r,...e)}return r}function getNodeModuleDirectory(r){const e=s.join(r,"node_modules");if(!isWritable(e)&&(n.existsSync(e)||!isWritable(s.join(r)))){return}return e}r.exports=(r={})=>{if(a.CACHE_DIR&&!["true","false","1","0"].includes(a.CACHE_DIR)){return useDirectory(s.join(a.CACHE_DIR,"find-cache-dir"),r)}let{cwd:e=u()}=r;if(r.files){e=o(e,r.files)}e=i.sync(e);if(!e){return}const t=getNodeModuleDirectory(e);if(!t){return undefined}return useDirectory(s.join(e,"node_modules",".cache",r.name),r)}},147:r=>{"use strict";r.exports=require("fs")},55:r=>{"use strict";r.exports=require("next/dist/compiled/find-up")},849:r=>{"use strict";r.exports=require("next/dist/compiled/semver")},17:r=>{"use strict";r.exports=require("path")},837:r=>{"use strict";r.exports=require("util")}};var e={};function __nccwpck_require__(t){var s=e[t];if(s!==undefined){return s.exports}var n=e[t]={exports:{}};var o=true;try{r[t](n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete e[t]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(449);module.exports=t})();
\ No newline at end of file
......@@ -135212,9 +135212,14 @@ module.exports = class AliasFieldPlugin {
);
return callback();
}
const data1 = fieldData[innerRequest];
const data2 = fieldData[innerRequest.replace(/^\.\//, "")];
const data = typeof data1 !== "undefined" ? data1 : data2;
const data = Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest
)
? fieldData[innerRequest]
: innerRequest.startsWith("./")
? fieldData[innerRequest.slice(2)]
: undefined;
if (data === innerRequest) return callback();
if (data === undefined) return callback();
if (data === false) {
......@@ -135273,6 +135278,7 @@ module.exports = class AliasFieldPlugin {
const forEachBail = __webpack_require__(78565);
const { PathType, getType } = __webpack_require__(67079);
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
......@@ -135297,6 +135303,18 @@ module.exports = class AliasPlugin {
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
const getAbsolutePathWithSlashEnding = maybeAbsolutePath => {
const type = getType(maybeAbsolutePath);
if (type === PathType.AbsolutePosix || type === PathType.AbsoluteWin) {
return resolver.join(maybeAbsolutePath, "_").slice(0, -1);
}
return null;
};
const isSubPath = (path, maybeSubPath) => {
const absolutePath = getAbsolutePathWithSlashEnding(maybeSubPath);
if (!absolutePath) return false;
return path.startsWith(absolutePath);
};
resolver
.getHook(this.source)
.tapAsync("AliasPlugin", (request, resolveContext, callback) => {
......@@ -135309,11 +135327,9 @@ module.exports = class AliasPlugin {
if (
innerRequest === item.name ||
(!item.onlyModule &&
innerRequest.startsWith(
request.request
? `${item.name}/`
: resolver.join(item.name, "_").slice(0, -1)
))
(request.request
? innerRequest.startsWith(`${item.name}/`)
: isSubPath(innerRequest, item.name)))
) {
const remainingRequest = innerRequest.substr(item.name.length);
const resolveWithAlias = (alias, callback) => {
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment