diff --git a/packages/next/package.json b/packages/next/package.json index fcc8d277ab8b7..884b03a410d8b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -229,7 +229,6 @@ "domain-browser": "4.19.0", "edge-runtime": "2.5.4", "events": "3.3.0", - "find-cache-dir": "3.3.1", "find-up": "4.1.0", "fresh": "0.5.2", "get-orientation": "1.1.2", diff --git a/packages/next/src/compiled/@segment/ajv-human-errors/index.js b/packages/next/src/compiled/@segment/ajv-human-errors/index.js deleted file mode 100644 index 13df33a47c41d..0000000000000 --- a/packages/next/src/compiled/@segment/ajv-human-errors/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e={989:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.AggregateAjvError=t.AjvError=void 0;const i=r(866);const a=r(385);const n={fieldLabels:"title",includeOriginalError:false,includeData:false};class AjvError extends Error{constructor(e,t={}){super();this.options={};this.redundant=false;this.options={...n,...t};this.pointer=e.instancePath;this.path=a.jsonPath(e.instancePath);const r=i.getMessage(e,this.options);if(r===null){this.redundant=true;return}this.message=`${a.capitalize(r)}.`;if(this.options.includeOriginalError){this.original=e}if(this.options.includeData){this.data=e.data}}toJSON(){const e={path:this.path,pointer:this.pointer,message:this.message};if(this.options.includeOriginalError){e.original=this.original}if(this.options.includeData){e.data=this.data}return e}}t.AjvError=AjvError;class AggregateAjvError extends Error{constructor(e,t={}){super();this.name="AggregateAjvError";this.errors=(e!==null&&e!==void 0?e:[]).map((e=>new AjvError(e,t))).filter((e=>!e.redundant));this.message=this.errors.map((e=>e.message)).join(" ")}toJSON(){return this.errors.map((e=>e.toJSON()))}*[Symbol.iterator](){for(const e of this.errors){yield e}}}t.AggregateAjvError=AggregateAjvError},866:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.getMessage=t.fieldPreamble=void 0;const i=r(385);const a={"date-time":"date and time",time:"time",date:"date",email:"email address",hostname:"hostname",ipv4:"IPv4 address",ipv6:"IPv6 address",uri:"URI","uri-reference":"URI Reference","uri-template":"URI-template","json-pointer":"JSON Pointer","relative-json-pointer":"relative JSON Pointer",regex:"regular expression"};const fieldPreamble=({instancePath:e,parentSchema:t},{fieldLabels:r})=>{switch(r){case"js":if(e===""){return"the root value"}return`the value at ${i.jsonPath(e).replace(/^\$/,"")}`;case"jsonPath":return`the value at ${i.jsonPath(e)}`;case"jsonPointer":case"instancePath":if(e===""){return"the root value"}return`the value at ${e}`;case"title":if(t===null||t===void 0?void 0:t.title){return t.title}if(e===""){return"the root value"}return`the value at ${e}`;default:throw new Error(`invalid fieldLabels value: ${r}`)}};t.fieldPreamble=fieldPreamble;const getMessage=({data:e,keyword:r,message:n,params:s,parentSchema:o,schemaPath:u,instancePath:l},{fieldLabels:c})=>{const h=t.fieldPreamble({instancePath:l,parentSchema:o},{fieldLabels:c});if(o===null||o===void 0?void 0:o.errorMessage){return`${h} ${o.errorMessage}`}switch(r){case"enum":{const e=s.allowedValues.map(JSON.stringify);const t=i.humanizeList(e,"or");return`${h} must be one of: ${t}`}case"type":{const t=Array.isArray(s.type)?s.type:s.type.split(",");const r=i.humanizeList(t,"or");const a=i.humanizeTypeOf(e);return`${h} must be ${i.indefiniteArticle(r)} ${r} but it was ${a}`}case"minLength":{const t=s.limit;const r=i.pluralize("character",t);const a=e.length;const n=i.pluralize("character",a);return`${h} must be ${t} ${r} or more but it was ${a} ${n}`}case"maxLength":{const t=s.limit;const r=i.pluralize("character",t);const a=e.length;const n=i.pluralize("character",a);return`${h} must be ${t} ${r} or fewer but it was ${a} ${n}`}case"pattern":{if(u.endsWith("propertyNames/pattern"))return null;const e=o===null||o===void 0?void 0:o.patternLabel;if(e){return`${h} must be ${e} but it was not`}else{return`${h} is an invalid string`}}case"format":{const e=a[s.format]||s.format;return`${h} must be a valid ${e} string but it was not`}case"multipleOf":{return`${h} must be a multiple of ${s.multipleOf}`}case"minimum":{return`${h} must be equal to or greater than ${s.limit}`}case"exclusiveMinimum":{return`${h} must be greater than ${s.limit}`}case"maximum":{return`${h} must be equal to or less than ${s.limit}`}case"exclusiveMaximum":{return`${h} must be less than ${s.limit}`}case"additionalProperties":{const e=Object.keys(o===null||o===void 0?void 0:o.properties).join(", ");const t=s.additionalProperty;return`${h} has an unexpected property, ${t}, which is not in the list of allowed properties (${e})`}case"required":{const e=s.missingProperty;return`${h} is missing the required field '${e}'`}case"propertyNames":{return`${h} has an invalid property name ${JSON.stringify(s.propertyName)}`}case"minProperties":{const t=s.limit;const r=Object.keys(e).length;return`${h} must have ${t} or more properties but it has ${r}`}case"maxProperties":{const t=s.limit;const r=Object.keys(e).length;return`${h} must have ${t} or fewer properties but it has ${r}`}case"dependencies":{const e=s.property;const t=s.missingProperty;return`${h} must have property ${t} when ${e} is present`}case"minItems":{const t=s.limit;const r=e.length;return`${h} must have ${t} or more items but it has ${r}`}case"maxItems":{const t=s.limit;const r=e.length;return`${h} must have ${t} or fewer items but it has ${r}`}case"uniqueItems":{const{i:e,j:t}=s;return`${h} must be unique but elements ${t} and ${e} are the same`}default:return`${h} ${n}`}};t.getMessage=getMessage},385:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.humanizeList=t.humanizeTypeOf=t.indefiniteArticle=t.humanizePath=t.jsonPath=t.pluralize=t.capitalize=void 0;const capitalize=e=>{if(typeof e!=="string"||e.length===0){return e}return e.charAt(0).toUpperCase()+e.slice(1)};t.capitalize=capitalize;const pluralize=(e,t)=>{if(t===1){return e}return`${e}s`};t.pluralize=pluralize;const jsonPath=e=>{if(e===""){return"$"}const t=e.substring(1).split(/\//).map((e=>e.replace(/~1/g,"/").replace(/~0/g,"~").replace(/\./g,"\\."))).map((e=>{if(/^\d+$/.exec(e)){return`[${e}]`}return`.${e}`})).join("");return"$"+t};t.jsonPath=jsonPath;const humanizePath=e=>{if(e===""){return"the root value"}return`the value at ${t.jsonPath(e)}`};t.humanizePath=humanizePath;const indefiniteArticle=e=>{switch(e[0]){case"a":case"e":case"i":case"o":case"u":return"an";default:return"a"}};t.indefiniteArticle=indefiniteArticle;const humanizeTypeOf=e=>{const r=typeof e;switch(r){case"object":if(e===null){return"null"}if(Array.isArray(e)){return"an array"}return"an object";case"undefined":return"undefined";default:return`${t.indefiniteArticle(r)} ${r}`}};t.humanizeTypeOf=humanizeTypeOf;const humanizeList=(e,t="and")=>{if(e.length===0){return"nothing"}if(e.length===1){return e[0]}if(e.length===2){return`${e[0]} ${t} ${e[1]}`}return`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`};t.humanizeList=humanizeList}};var t={};function __nccwpck_require__(r){var i=t[r];if(i!==undefined){return i.exports}var a=t[r]={exports:{}};var n=true;try{e[r](a,a.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return a.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.AggregateAjvError=void 0;var t=__nccwpck_require__(989);Object.defineProperty(e,"AggregateAjvError",{enumerable:true,get:function(){return t.AggregateAjvError}})})();module.exports=r})(); \ No newline at end of file diff --git a/packages/next/src/compiled/@segment/ajv-human-errors/package.json b/packages/next/src/compiled/@segment/ajv-human-errors/package.json deleted file mode 100644 index 2b704adf064f8..0000000000000 --- a/packages/next/src/compiled/@segment/ajv-human-errors/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@segment/ajv-human-errors","main":"index.js","license":"MIT"} diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 839a5e4b03c5d..7c904e79ba547 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -1292,14 +1292,6 @@ export async function ncc_devalue(task, opts) { .target('src/compiled/devalue') } -// eslint-disable-next-line camelcase -externals['find-cache-dir'] = 'next/dist/compiled/find-cache-dir' -export async function ncc_find_cache_dir(task, opts) { - await task - .source(relative(__dirname, require.resolve('find-cache-dir'))) - .ncc({ packageName: 'find-cache-dir', externals }) - .target('src/compiled/find-cache-dir') -} // eslint-disable-next-line camelcase externals['find-up'] = 'next/dist/compiled/find-up' export async function ncc_find_up(task, opts) { @@ -2276,7 +2268,6 @@ export async function ncc(task, opts) { 'ncc_cross_spawn', 'ncc_debug', 'ncc_devalue', - 'ncc_find_cache_dir', 'ncc_find_up', 'ncc_fresh', 'ncc_glob', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba58893b2e531..f6d050545c80c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1178,9 +1178,6 @@ importers: events: specifier: 3.3.0 version: 3.3.0 - find-cache-dir: - specifier: 3.3.1 - version: 3.3.1 find-up: specifier: 4.1.0 version: 4.1.0