@vercel/static-build 2.7.6 → 2.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +112 -60
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -8665,7 +8665,7 @@ var require_frameworks = __commonJS({
8665
8665
  cachePattern: ".cache/**"
8666
8666
  },
8667
8667
  {
8668
- name: "Docusaurus (v2)",
8668
+ name: "Docusaurus (v2+)",
8669
8669
  slug: "docusaurus-2",
8670
8670
  demo: "https://docusaurus-2-template.vercel.app",
8671
8671
  logo: "https://api-frameworks.vercel.sh/framework-logos/docusaurus.svg",
@@ -9340,7 +9340,7 @@ var require_frameworks = __commonJS({
9340
9340
  getOutputDirName: async () => "public"
9341
9341
  },
9342
9342
  {
9343
- name: "SvelteKit (v1)",
9343
+ name: "SvelteKit",
9344
9344
  slug: "sveltekit-1",
9345
9345
  demo: "https://sveltekit-1-template.vercel.app",
9346
9346
  logo: "https://api-frameworks.vercel.sh/framework-logos/svelte.svg",
@@ -22679,9 +22679,9 @@ var require_fs2 = __commonJS({
22679
22679
  }
22680
22680
  });
22681
22681
 
22682
- // ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js
22682
+ // ../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js
22683
22683
  var require_path = __commonJS({
22684
- "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports2, module2) {
22684
+ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports2, module2) {
22685
22685
  var isWindows = typeof process === "object" && process && process.platform === "win32";
22686
22686
  module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
22687
22687
  }
@@ -22838,9 +22838,9 @@ var require_brace_expansion2 = __commonJS({
22838
22838
  }
22839
22839
  });
22840
22840
 
22841
- // ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js
22841
+ // ../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js
22842
22842
  var require_minimatch2 = __commonJS({
22843
- "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports2, module2) {
22843
+ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js"(exports2, module2) {
22844
22844
  var minimatch = module2.exports = (p, pattern, options = {}) => {
22845
22845
  assertValidPattern(pattern);
22846
22846
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -22926,9 +22926,7 @@ var require_minimatch2 = __commonJS({
22926
22926
  return list;
22927
22927
  };
22928
22928
  var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
22929
- var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
22930
22929
  var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
22931
- var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&");
22932
22930
  var Minimatch = class {
22933
22931
  constructor(pattern, options) {
22934
22932
  assertValidPattern(pattern);
@@ -22937,10 +22935,6 @@ var require_minimatch2 = __commonJS({
22937
22935
  this.options = options;
22938
22936
  this.set = [];
22939
22937
  this.pattern = pattern;
22940
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
22941
- if (this.windowsPathsNoEscape) {
22942
- this.pattern = this.pattern.replace(/\\/g, "/");
22943
- }
22944
22938
  this.regexp = null;
22945
22939
  this.negate = false;
22946
22940
  this.comment = false;
@@ -22985,7 +22979,7 @@ var require_minimatch2 = __commonJS({
22985
22979
  negateOffset++;
22986
22980
  }
22987
22981
  if (negateOffset)
22988
- this.pattern = pattern.slice(negateOffset);
22982
+ this.pattern = pattern.substr(negateOffset);
22989
22983
  this.negate = negate;
22990
22984
  }
22991
22985
  // set partial to true to test if, for example,
@@ -23076,7 +23070,7 @@ var require_minimatch2 = __commonJS({
23076
23070
  if (pattern === "")
23077
23071
  return "";
23078
23072
  let re = "";
23079
- let hasMagic = false;
23073
+ let hasMagic = !!options.nocase;
23080
23074
  let escaping = false;
23081
23075
  const patternListStack = [];
23082
23076
  const negativeLists = [];
@@ -23087,10 +23081,7 @@ var require_minimatch2 = __commonJS({
23087
23081
  let cs;
23088
23082
  let pl;
23089
23083
  let sp;
23090
- let dotTravAllowed = pattern.charAt(0) === ".";
23091
- let dotFileAllowed = options.dot || dotTravAllowed;
23092
- const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
23093
- const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
23084
+ const patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
23094
23085
  const clearStateChar = () => {
23095
23086
  if (stateChar) {
23096
23087
  switch (stateChar) {
@@ -23128,10 +23119,6 @@ var require_minimatch2 = __commonJS({
23128
23119
  return false;
23129
23120
  }
23130
23121
  case "\\":
23131
- if (inClass && pattern.charAt(i + 1) === "-") {
23132
- re += c;
23133
- continue;
23134
- }
23135
23122
  clearStateChar();
23136
23123
  escaping = true;
23137
23124
  continue;
@@ -23154,7 +23141,7 @@ var require_minimatch2 = __commonJS({
23154
23141
  if (options.noext)
23155
23142
  clearStateChar();
23156
23143
  continue;
23157
- case "(": {
23144
+ case "(":
23158
23145
  if (inClass) {
23159
23146
  re += "(";
23160
23147
  continue;
@@ -23163,54 +23150,39 @@ var require_minimatch2 = __commonJS({
23163
23150
  re += "\\(";
23164
23151
  continue;
23165
23152
  }
23166
- const plEntry = {
23153
+ patternListStack.push({
23167
23154
  type: stateChar,
23168
23155
  start: i - 1,
23169
23156
  reStart: re.length,
23170
23157
  open: plTypes[stateChar].open,
23171
23158
  close: plTypes[stateChar].close
23172
- };
23173
- this.debug(this.pattern, " ", plEntry);
23174
- patternListStack.push(plEntry);
23175
- re += plEntry.open;
23176
- if (plEntry.start === 0 && plEntry.type !== "!") {
23177
- dotTravAllowed = true;
23178
- re += subPatternStart(pattern.slice(i + 1));
23179
- }
23159
+ });
23160
+ re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
23180
23161
  this.debug("plType %j %j", stateChar, re);
23181
23162
  stateChar = false;
23182
23163
  continue;
23183
- }
23184
- case ")": {
23185
- const plEntry = patternListStack[patternListStack.length - 1];
23186
- if (inClass || !plEntry) {
23164
+ case ")":
23165
+ if (inClass || !patternListStack.length) {
23187
23166
  re += "\\)";
23188
23167
  continue;
23189
23168
  }
23190
- patternListStack.pop();
23191
23169
  clearStateChar();
23192
23170
  hasMagic = true;
23193
- pl = plEntry;
23171
+ pl = patternListStack.pop();
23194
23172
  re += pl.close;
23195
23173
  if (pl.type === "!") {
23196
- negativeLists.push(Object.assign(pl, { reEnd: re.length }));
23174
+ negativeLists.push(pl);
23197
23175
  }
23176
+ pl.reEnd = re.length;
23198
23177
  continue;
23199
- }
23200
- case "|": {
23201
- const plEntry = patternListStack[patternListStack.length - 1];
23202
- if (inClass || !plEntry) {
23178
+ case "|":
23179
+ if (inClass || !patternListStack.length) {
23203
23180
  re += "\\|";
23204
23181
  continue;
23205
23182
  }
23206
23183
  clearStateChar();
23207
23184
  re += "|";
23208
- if (plEntry.start === 0 && plEntry.type !== "!") {
23209
- dotTravAllowed = true;
23210
- re += subPatternStart(pattern.slice(i + 1));
23211
- }
23212
23185
  continue;
23213
- }
23214
23186
  case "[":
23215
23187
  clearStateChar();
23216
23188
  if (inClass) {
@@ -23229,13 +23201,17 @@ var require_minimatch2 = __commonJS({
23229
23201
  }
23230
23202
  cs = pattern.substring(classStart + 1, i);
23231
23203
  try {
23232
- RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
23233
- re += c;
23204
+ RegExp("[" + cs + "]");
23234
23205
  } catch (er) {
23235
- re = re.substring(0, reClassStart) + "(?:$.)";
23206
+ sp = this.parse(cs, SUBPARSE);
23207
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
23208
+ hasMagic = hasMagic || sp[1];
23209
+ inClass = false;
23210
+ continue;
23236
23211
  }
23237
23212
  hasMagic = true;
23238
23213
  inClass = false;
23214
+ re += c;
23239
23215
  continue;
23240
23216
  default:
23241
23217
  clearStateChar();
@@ -23247,9 +23223,9 @@ var require_minimatch2 = __commonJS({
23247
23223
  }
23248
23224
  }
23249
23225
  if (inClass) {
23250
- cs = pattern.slice(classStart + 1);
23226
+ cs = pattern.substr(classStart + 1);
23251
23227
  sp = this.parse(cs, SUBPARSE);
23252
- re = re.substring(0, reClassStart) + "\\[" + sp[0];
23228
+ re = re.substr(0, reClassStart) + "\\[" + sp[0];
23253
23229
  hasMagic = hasMagic || sp[1];
23254
23230
  }
23255
23231
  for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
@@ -23278,28 +23254,24 @@ var require_minimatch2 = __commonJS({
23278
23254
  const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
23279
23255
  let nlAfter = re.slice(nl.reEnd);
23280
23256
  const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
23281
- const closeParensBefore = nlBefore.split(")").length;
23282
- const openParensBefore = nlBefore.split("(").length - closeParensBefore;
23257
+ const openParensBefore = nlBefore.split("(").length - 1;
23283
23258
  let cleanAfter = nlAfter;
23284
23259
  for (let i = 0; i < openParensBefore; i++) {
23285
23260
  cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
23286
23261
  }
23287
23262
  nlAfter = cleanAfter;
23288
- const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
23263
+ const dollar = nlAfter === "" && isSub !== SUBPARSE ? "$" : "";
23289
23264
  re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
23290
23265
  }
23291
23266
  if (re !== "" && hasMagic) {
23292
23267
  re = "(?=.)" + re;
23293
23268
  }
23294
23269
  if (addPatternStart) {
23295
- re = patternStart() + re;
23270
+ re = patternStart + re;
23296
23271
  }
23297
23272
  if (isSub === SUBPARSE) {
23298
23273
  return [re, hasMagic];
23299
23274
  }
23300
- if (options.nocase && !hasMagic) {
23301
- hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
23302
- }
23303
23275
  if (!hasMagic) {
23304
23276
  return globUnescape(pattern);
23305
23277
  }
@@ -26426,6 +26398,84 @@ var require_get_monorepo_default_settings = __commonJS({
26426
26398
  }
26427
26399
  });
26428
26400
 
26401
+ // ../fs-detectors/dist/detect-instrumentation.js
26402
+ var require_detect_instrumentation = __commonJS({
26403
+ "../fs-detectors/dist/detect-instrumentation.js"(exports2, module2) {
26404
+ "use strict";
26405
+ var __create2 = Object.create;
26406
+ var __defProp2 = Object.defineProperty;
26407
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
26408
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
26409
+ var __getProtoOf2 = Object.getPrototypeOf;
26410
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
26411
+ var __export2 = (target, all) => {
26412
+ for (var name in all)
26413
+ __defProp2(target, name, { get: all[name], enumerable: true });
26414
+ };
26415
+ var __copyProps2 = (to, from, except, desc) => {
26416
+ if (from && typeof from === "object" || typeof from === "function") {
26417
+ for (let key of __getOwnPropNames2(from))
26418
+ if (!__hasOwnProp2.call(to, key) && key !== except)
26419
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
26420
+ }
26421
+ return to;
26422
+ };
26423
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
26424
+ // If the importer is in node compatibility mode or this is not an ESM
26425
+ // file that has been converted to a CommonJS file using a Babel-
26426
+ // compatible transform (i.e. "__esModule" has not been set), then set
26427
+ // "default" to the CommonJS "module.exports" for node compatibility.
26428
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
26429
+ mod
26430
+ ));
26431
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
26432
+ var detect_instrumentation_exports = {};
26433
+ __export2(detect_instrumentation_exports, {
26434
+ detectInstrumentation: () => detectInstrumentation2
26435
+ });
26436
+ module2.exports = __toCommonJS2(detect_instrumentation_exports);
26437
+ var import_semver2 = __toESM2(require_semver3());
26438
+ var VERCEL_OTEL = "@vercel/otel";
26439
+ var OPENTELEMETRY_SDK_TRACE_NODE = "@opentelemetry/sdk-trace-node";
26440
+ var OPENTELEMETRY_API = "@opentelemetry/api";
26441
+ var tracingDependencies = [
26442
+ { name: VERCEL_OTEL, minVersion: "1.11.0" },
26443
+ { name: OPENTELEMETRY_SDK_TRACE_NODE, minVersion: "1.19.0" },
26444
+ { name: OPENTELEMETRY_API, minVersion: "1.7.0" }
26445
+ ];
26446
+ async function detectInstrumentation2(fs5) {
26447
+ if (await fs5.hasPath("package.json") === false) {
26448
+ return false;
26449
+ }
26450
+ if (await fs5.isFile("package.json") === false) {
26451
+ return false;
26452
+ }
26453
+ const content = await fs5.readFile("package.json");
26454
+ const packageJsonContent = content.toString();
26455
+ let hasInstrumentation = false;
26456
+ for (const dependency of tracingDependencies) {
26457
+ const regex = new RegExp(
26458
+ `"(dev)?(d|D)ependencies":\\s*{[^}]*"${dependency.name}":\\s*"(.+?)"[^}]*}`,
26459
+ "m"
26460
+ );
26461
+ const match = packageJsonContent.match(regex);
26462
+ if (match && match[3]) {
26463
+ const detectedVersion = match[3];
26464
+ const cleanVersion = detectedVersion.replace(/[\^~]/, "");
26465
+ if (import_semver2.default.valid(cleanVersion) && import_semver2.default.gte(cleanVersion, dependency.minVersion)) {
26466
+ console.log(
26467
+ `Detected OpenTelemetry dependency: ${dependency.name}@${cleanVersion}, which meets the minimum version requirement of ${dependency.minVersion}`
26468
+ );
26469
+ hasInstrumentation = true;
26470
+ break;
26471
+ }
26472
+ }
26473
+ }
26474
+ return hasInstrumentation;
26475
+ }
26476
+ }
26477
+ });
26478
+
26429
26479
  // ../fs-detectors/dist/index.js
26430
26480
  var require_dist4 = __commonJS({
26431
26481
  "../fs-detectors/dist/index.js"(exports2, module2) {
@@ -26465,6 +26515,7 @@ var require_dist4 = __commonJS({
26465
26515
  detectFrameworkRecord: () => import_detect_framework.detectFrameworkRecord,
26466
26516
  detectFrameworkVersion: () => import_detect_framework.detectFrameworkVersion,
26467
26517
  detectFrameworks: () => import_detect_framework.detectFrameworks,
26518
+ detectInstrumentation: () => import_detect_instrumentation.detectInstrumentation,
26468
26519
  detectOutputDirectory: () => import_detect_builders.detectOutputDirectory,
26469
26520
  getProjectPaths: () => import_get_project_paths.getProjectPaths,
26470
26521
  getWorkspacePackagePaths: () => import_get_workspace_package_paths.getWorkspacePackagePaths,
@@ -26490,6 +26541,7 @@ var require_dist4 = __commonJS({
26490
26541
  var import_package_managers = require_package_managers();
26491
26542
  __reExport(src_exports2, require_get_monorepo_default_settings(), module2.exports);
26492
26543
  var import_detect_builders2 = require_detect_builders();
26544
+ var import_detect_instrumentation = require_detect_instrumentation();
26493
26545
  }
26494
26546
  });
26495
26547
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "2.7.6",
3
+ "version": "2.7.8",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
17
- "@vercel/gatsby-plugin-vercel-builder": "2.0.80",
18
- "@vercel/static-config": "3.0.0",
17
+ "@vercel/gatsby-plugin-vercel-builder": "2.0.82",
18
+ "@vercel/static-config": "3.1.0",
19
19
  "ts-morph": "12.0.0"
20
20
  },
21
21
  "devDependencies": {
@@ -28,10 +28,10 @@
28
28
  "@types/node-fetch": "2.5.4",
29
29
  "@types/promise-timeout": "1.3.0",
30
30
  "@types/semver": "7.3.13",
31
- "@vercel/build-utils": "10.5.1",
31
+ "@vercel/build-utils": "10.6.0",
32
32
  "@vercel/error-utils": "2.0.3",
33
- "@vercel/frameworks": "3.6.2",
34
- "@vercel/fs-detectors": "5.3.10",
33
+ "@vercel/frameworks": "3.6.4",
34
+ "@vercel/fs-detectors": "5.4.1",
35
35
  "@vercel/routing-utils": "5.0.4",
36
36
  "execa": "3.2.0",
37
37
  "fs-extra": "10.0.0",