{"record":{"id":"51378ce6017b4c6e","repo":"meteor/meteor","slug":"globpatterns-must-be-a-non-empty-array","errorCode":null,"errorMessage":"globPatterns must be a non-empty array","messagePattern":"globPatterns must be a non-empty array","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm-packages/meteor-rspack/lib/ignore.js","lineNumber":94,"sourceCode":"      pattern = '!' + pattern;\n    }\n\n    globPatterns.push(pattern);\n  });\n\n  return globPatterns;\n}\n\n/**\n * Creates a regex pattern to match the specified glob patterns.\n * Converts glob patterns with * and ** into regex equivalents.\n * \n * @param {string[]} globPatterns - Array of glob patterns from createIgnoreGlobConfig\n * @returns {RegExp} - Regex pattern to match the specified patterns\n */\nfunction createIgnoreRegex(globPatterns) {\n  if (!Array.isArray(globPatterns) || globPatterns.length === 0) {\n    throw new Error('globPatterns must be a non-empty array');\n  }\n\n  // Process each glob pattern and convert to regex\n  const regexPatterns = globPatterns.map(pattern => {\n    // Skip negation patterns for the regex\n    if (pattern.startsWith('!')) {\n      return null;\n    }\n\n    // Escape special regex characters, but not * and /\n    let regexPattern = pattern.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n    // Use a temporary placeholder for ** that won't be affected by the * replacement\n    // This is necessary because if we directly replace ** with .* and then replace * with [^/]*\n    const DOUBLE_ASTERISK_PLACEHOLDER = '__DOUBLE_ASTERISK__';\n    regexPattern = regexPattern.replace(/\\*\\*/g, DOUBLE_ASTERISK_PLACEHOLDER);\n\n    // Convert * to regex equivalent (any number of characters except /)","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/meteor/meteor/blob/5076d2f818d3cac01d0cf8312fa5b2332076a4fb/npm-packages/meteor-rspack/lib/ignore.js#L76-L112","documentation":"Error \"globPatterns must be a non-empty array\" thrown in meteor/meteor.","triggerScenarios":"Thrown when globPatterns is missing, not an array, or an empty array.","commonSituations":"Calling the ignore helper without providing at least one glob pattern to match files.","solutions":["Provide a non-empty array of glob patterns.","Remove the globPatterns option entirely if you do not need custom ignore patterns."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5076d2f818d3cac01d0cf8312fa5b2332076a4fb","analyzedAt":"2026-08-13T03:27:40.142Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}