@mdn/fred 2.9.0 → 2.9.1

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 (92) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/components/blog/utils.js +1 -1
  4. package/components/compat-table/element.js +2 -2
  5. package/components/latest-news/server.js +1 -1
  6. package/components/live-sample-result/element.js +1 -1
  7. package/components/navigation/hook.js +1 -1
  8. package/components/observatory-form/element.js +3 -3
  9. package/components/placement-bottom/element.js +1 -1
  10. package/components/placement-hp-main/element.js +1 -1
  11. package/components/placement-sidebar/element.js +1 -1
  12. package/components/placement-top/element.js +1 -1
  13. package/components/play-console/utils.js +2 -2
  14. package/components/recent-contributions/server.js +1 -1
  15. package/components/recently-visited/index.js +1 -2
  16. package/components/sidebar-filter/sidebar-filterer.js +1 -1
  17. package/components/survey/element.js +3 -1
  18. package/components/translation-banner/server.js +1 -1
  19. package/components/writer-reload/element.js +1 -1
  20. package/out/service-worker.js +1 -1
  21. package/out/service-worker.js.map +1 -1
  22. package/out/static/client/{1672.aef594997e95d362.js → 1672.d66704179bcd69ee.js} +2 -2
  23. package/out/static/client/{1672.aef594997e95d362.js.map → 1672.d66704179bcd69ee.js.map} +1 -1
  24. package/out/static/client/{169.71c8bb45e4bcc0b1.js → 169.ab4227448e206e0d.js} +2 -2
  25. package/out/static/client/169.ab4227448e206e0d.js.map +1 -0
  26. package/out/static/client/{2173.a812d7b499aeb899.js → 2173.a1ead47e2d458f50.js} +2 -2
  27. package/out/static/client/{2173.a812d7b499aeb899.js.map → 2173.a1ead47e2d458f50.js.map} +1 -1
  28. package/out/static/client/3818.8819a9d779da3429.js.map +1 -1
  29. package/out/static/client/{4060.b5edd2eca5be7d2b.js → 4060.687b98e9db2bc493.js} +2 -2
  30. package/out/static/client/{4060.b5edd2eca5be7d2b.js.map → 4060.687b98e9db2bc493.js.map} +1 -1
  31. package/out/static/client/4366.80589277ea3ce36d.js +4 -0
  32. package/out/static/client/4366.80589277ea3ce36d.js.map +1 -0
  33. package/out/static/client/{4759.5c1f42f6042d6457.js → 4759.f58bb90e314ae9c1.js} +2 -2
  34. package/out/static/client/{4759.5c1f42f6042d6457.js.map → 4759.f58bb90e314ae9c1.js.map} +1 -1
  35. package/out/static/client/{5196.a890e2f848933898.js → 5196.635f7f8d7984bead.js} +2 -2
  36. package/out/static/client/{5196.a890e2f848933898.js.map → 5196.635f7f8d7984bead.js.map} +1 -1
  37. package/out/static/client/5562.3cfad67583264655.js +2 -0
  38. package/out/static/client/5562.3cfad67583264655.js.map +1 -0
  39. package/out/static/client/{8067.2861f05611862516.js → 8067.e21835e06833480e.js} +2 -2
  40. package/out/static/client/{8067.2861f05611862516.js.map → 8067.e21835e06833480e.js.map} +1 -1
  41. package/out/static/client/8233.1b63aaa17c6d19cd.js +2 -0
  42. package/out/static/client/8233.1b63aaa17c6d19cd.js.map +1 -0
  43. package/out/static/client/{8401.adf96abc27ac7387.js → 8401.c754c2baea3818c1.js} +7 -7
  44. package/out/static/client/8401.c754c2baea3818c1.js.map +1 -0
  45. package/out/static/client/{9204.30fc8791c7c95e43.js → 9204.6b8c65e2852a256e.js} +2 -2
  46. package/out/static/client/{9204.30fc8791c7c95e43.js.map → 9204.6b8c65e2852a256e.js.map} +1 -1
  47. package/out/static/client/{index.65c98247c2b54259.js → index.f16f7d58914f3c7b.js} +3 -3
  48. package/out/static/client/index.f16f7d58914f3c7b.js.map +1 -0
  49. package/out/static/client/{runtime.9057bb25edbe1b53.js → runtime.000fbab5674b8a62.js} +2 -2
  50. package/out/static/client/{runtime.9057bb25edbe1b53.js.map → runtime.000fbab5674b8a62.js.map} +1 -1
  51. package/out/static/client/stats.json +432 -432
  52. package/out/static/client/watify_bg.9e17afb2a5a4c03f.wasm +0 -0
  53. package/out/static/legacy/7555.d2dbf4d88e2a043e.js +2 -0
  54. package/out/static/legacy/7555.d2dbf4d88e2a043e.js.map +1 -0
  55. package/out/static/legacy/8233.1b63aaa17c6d19cd.js +2 -0
  56. package/out/static/legacy/8233.1b63aaa17c6d19cd.js.map +1 -0
  57. package/out/static/legacy/asset-manifest.json +46 -46
  58. package/out/static/legacy/{index.a19bd45b9f39af81.html → index.0842dd30e67d6569.html} +1 -1
  59. package/out/static/legacy/{index.66c601d9bee5c979.js → index.3076cec4f319e633.js} +4 -4
  60. package/out/static/legacy/{index.66c601d9bee5c979.js.map → index.3076cec4f319e633.js.map} +1 -1
  61. package/out/static/legacy/stats.json +16 -16
  62. package/out/static/legacy/watify_bg.9e17afb2a5a4c03f.wasm +0 -0
  63. package/out/static/legacy/{yari.fabca254fad42bcc.js → yari.c83d87c429dcda1f.js} +4 -4
  64. package/out/static/legacy/{yari.fabca254fad42bcc.js.map → yari.c83d87c429dcda1f.js.map} +1 -1
  65. package/out/static/ssr/8233.js +1 -1
  66. package/out/static/ssr/8233.js.map +1 -1
  67. package/out/static/ssr/index.js +14 -14
  68. package/out/static/ssr/index.js.map +1 -1
  69. package/out/static/ssr/stats.json +4 -4
  70. package/out/static/ssr/watify_bg.9e17afb2a5a4c03f.wasm +0 -0
  71. package/package.json +31 -18
  72. package/utils/mdn-url2breadcrumb.js +1 -1
  73. package/out/static/client/169.71c8bb45e4bcc0b1.js.map +0 -1
  74. package/out/static/client/4366.c631051400430846.js +0 -4
  75. package/out/static/client/4366.c631051400430846.js.map +0 -1
  76. package/out/static/client/5562.6cc078ec59eb355d.js +0 -2
  77. package/out/static/client/5562.6cc078ec59eb355d.js.map +0 -1
  78. package/out/static/client/8233.270639ccdecf7be1.js +0 -2
  79. package/out/static/client/8233.270639ccdecf7be1.js.map +0 -1
  80. package/out/static/client/8401.adf96abc27ac7387.js.map +0 -1
  81. package/out/static/client/index.65c98247c2b54259.js.map +0 -1
  82. package/out/static/client/watify_bg.e3ab88fab7f71ec6.wasm +0 -0
  83. package/out/static/legacy/7555.332ebfc3a6b0147d.js +0 -2
  84. package/out/static/legacy/7555.332ebfc3a6b0147d.js.map +0 -1
  85. package/out/static/legacy/8233.270639ccdecf7be1.js +0 -2
  86. package/out/static/legacy/8233.270639ccdecf7be1.js.map +0 -1
  87. package/out/static/legacy/watify_bg.e3ab88fab7f71ec6.wasm +0 -0
  88. package/out/static/ssr/watify_bg.e3ab88fab7f71ec6.wasm +0 -0
  89. /package/out/static/client/{8401.adf96abc27ac7387.js.LICENSE.txt → 8401.c754c2baea3818c1.js.LICENSE.txt} +0 -0
  90. /package/out/static/client/{index.65c98247c2b54259.js.LICENSE.txt → index.f16f7d58914f3c7b.js.LICENSE.txt} +0 -0
  91. /package/out/static/legacy/{index.66c601d9bee5c979.js.LICENSE.txt → index.3076cec4f319e633.js.LICENSE.txt} +0 -0
  92. /package/out/static/legacy/{yari.fabca254fad42bcc.js.LICENSE.txt → yari.c83d87c429dcda1f.js.LICENSE.txt} +0 -0
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v24.15.0
1
+ v24.20.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.9.1](https://github.com/mdn/fred/compare/v2.9.0...v2.9.1) (2026-09-11)
4
+
5
+
6
+ ### Miscellaneous
7
+
8
+ * **deps-dev:** bump eslint-plugin-unicorn from 65.0.1 to 74.0.0 ([#1900](https://github.com/mdn/fred/issues/1900)) ([1f7587a](https://github.com/mdn/fred/commit/1f7587a77bbff0c8402ad1c96ba368fb0c29d5ff))
9
+ * **deps:** bump @mdn/watify from 1.1.9 to 1.1.10 ([#1894](https://github.com/mdn/fred/issues/1894)) ([6967512](https://github.com/mdn/fred/commit/6967512b6738737284c2e8bd910678a5ddf69aa2))
10
+ * **deps:** bump brace-expansion ([#1884](https://github.com/mdn/fred/issues/1884)) ([4d02eaa](https://github.com/mdn/fred/commit/4d02eaa0158953a94bd1aca4b22109c08eb65e9b))
11
+ * **deps:** bump compression from 1.8.1 to 1.8.2 in the npm-prod group ([#1899](https://github.com/mdn/fred/issues/1899)) ([b8a8ff5](https://github.com/mdn/fred/commit/b8a8ff52877819841fa2ba3c2845f8c380670e74))
12
+ * **deps:** bump qs from 6.15.2 to 6.16.0 ([#1902](https://github.com/mdn/fred/issues/1902)) ([842427f](https://github.com/mdn/fred/commit/842427f983d94341c18adb1f28b88b12e1f83388))
13
+ * **deps:** bump svgo ([ba69f51](https://github.com/mdn/fred/commit/ba69f5159eb837ee75ef322ca68f2d09aae561df))
14
+ * **deps:** bump svgo to 3.3.5/4.1.0 ([#1878](https://github.com/mdn/fred/issues/1878)) ([ba69f51](https://github.com/mdn/fred/commit/ba69f5159eb837ee75ef322ca68f2d09aae561df))
15
+ * **deps:** bump ws and socket.io-adapter ([#1883](https://github.com/mdn/fred/issues/1883)) ([a6204ef](https://github.com/mdn/fred/commit/a6204ef17c6f22394ca8e711096b6650e4fe58c7))
16
+
3
17
  ## [2.9.0](https://github.com/mdn/fred/compare/v2.8.0...v2.9.0) (2026-09-07)
4
18
 
5
19
 
@@ -37,7 +37,7 @@ export function PublishDate(_context, { date }) {
37
37
  }
38
38
  return html`
39
39
  <time class="date">
40
- ${Intl.DateTimeFormat(undefined, { dateStyle: "long" }).format(
40
+ ${new Intl.DateTimeFormat(undefined, { dateStyle: "long" }).format(
41
41
  new Date(date),
42
42
  )}
43
43
  </time>
@@ -711,8 +711,8 @@ export class MDNCompatTable extends L10nMixin(LitElement) {
711
711
 
712
712
  if (
713
713
  item.version_removed &&
714
- !asList(support).some(
715
- (otherItem) => otherItem.version_added === item.version_removed,
714
+ asList(support).every(
715
+ (otherItem) => otherItem.version_added !== item.version_removed,
716
716
  )
717
717
  ) {
718
718
  supportNotes.push({
@@ -63,7 +63,7 @@ function getRelativeTime(seconds) {
63
63
  { amount: 7, unit: "day" },
64
64
  { amount: 4.34524, unit: "week" }, // 365/12/7
65
65
  { amount: 12, unit: "month" },
66
- { amount: Number.POSITIVE_INFINITY, unit: "year" },
66
+ { amount: Infinity, unit: "year" },
67
67
  ];
68
68
 
69
69
  let duration = seconds;
@@ -47,7 +47,7 @@ export class MDNLiveSampleResult extends L10nMixin(LitElement) {
47
47
  if (replace || this._fullscreenReplace) {
48
48
  location.replace(this._runnerSrc);
49
49
  } else {
50
- location.href = this._runnerSrc;
50
+ location.assign(this._runnerSrc);
51
51
  }
52
52
  } else {
53
53
  this._fullscreenPending = true;
@@ -2,7 +2,7 @@ const button = document.querySelector(`[aria-controls="navigation__popup"]`);
2
2
  const navigation = document.querySelector(".navigation");
3
3
  if (button instanceof HTMLElement && navigation instanceof HTMLElement) {
4
4
  button.addEventListener("click", () => {
5
- const open = (!(navigation.dataset.open === "true")).toString();
5
+ const open = (navigation.dataset.open !== "true").toString();
6
6
  navigation.dataset.open = open;
7
7
  button.setAttribute("aria-expanded", open);
8
8
  });
@@ -75,9 +75,9 @@ export class MDNObservatoryForm extends LitElement {
75
75
  const json = await response.json();
76
76
  throw new Error(`Request failed: ${json.message}`);
77
77
  }
78
- globalThis.location.href = `/en-US/observatory/analyze?host=${encodeURIComponent(
79
- this._hostname,
80
- )}`;
78
+ globalThis.location.assign(
79
+ `/en-US/observatory/analyze?host=${encodeURIComponent(this._hostname)}`,
80
+ );
81
81
  } catch (error) {
82
82
  // @ts-expect-error
83
83
  this._errorMessage = `${ERROR_MAP[error.name] || "message" in error ? error["message"] : error}`;
@@ -39,7 +39,7 @@ export class MDNPlacementBottom extends PlacementMixin(LitElement) {
39
39
  [
40
40
  ["--bottom-background", backgroundColor],
41
41
  ["--bottom-color", textColor],
42
- ].filter(([_, v]) => Boolean(v)),
42
+ ].filter(([_, v]) => v),
43
43
  );
44
44
  const type = placementContext?.hpFooter ? "hp-footer" : "bottom-banner";
45
45
 
@@ -39,7 +39,7 @@ export class MDNPlacementHpMain extends PlacementMixin(LitElement) {
39
39
  [
40
40
  ["--hp-main-background", backgroundColor],
41
41
  ["--hp-main-color", textColor],
42
- ].filter(([_, v]) => Boolean(v)),
42
+ ].filter(([_, v]) => v),
43
43
  );
44
44
  const type = "hp-main";
45
45
 
@@ -65,7 +65,7 @@ export class MDNPlacementSidebar extends PlacementMixin(LitElement) {
65
65
  ["--side-color-light", textColor],
66
66
  ["--side-background-dark", backgroundColorDark || backgroundColor],
67
67
  ["--side-color-dark", textColorDark || textColor],
68
- ].filter(([_, v]) => Boolean(v)),
68
+ ].filter(([_, v]) => v),
69
69
  );
70
70
  const type = "side";
71
71
 
@@ -111,7 +111,7 @@ export class MDNPlacementTop extends PlacementMixin(LitElement) {
111
111
  ctaBackgroundColorDark || ctaBackgroundColor,
112
112
  ],
113
113
  ["--place-top-cta-color-dark", ctaTextColorDark || ctaBackgroundColor],
114
- ].filter(([_, v]) => Boolean(v)),
114
+ ].filter(([_, v]) => v),
115
115
  );
116
116
  const type = "top-banner";
117
117
 
@@ -93,7 +93,7 @@ export function formatObject(input) {
93
93
  if (start) {
94
94
  start = false;
95
95
  } else {
96
- formattedChild = formattedChild + ", ";
96
+ formattedChild += ", ";
97
97
  }
98
98
  formattedChild = formattedChild + key + ": " + formatOutput(input[key]);
99
99
  }
@@ -111,7 +111,7 @@ export function formatObject(input) {
111
111
  if (start) {
112
112
  start = false;
113
113
  } else {
114
- formattedChild = formattedChild + ", ";
114
+ formattedChild += ", ";
115
115
  }
116
116
  formattedChild = formattedChild + key + ": " + formatOutput(input[key]);
117
117
  }
@@ -60,7 +60,7 @@ function getRelativeTime(seconds) {
60
60
  { amount: 7, unit: "day" },
61
61
  { amount: 4.34524, unit: "week" }, // 365/12/7
62
62
  { amount: 12, unit: "month" },
63
- { amount: Number.POSITIVE_INFINITY, unit: "year" },
63
+ { amount: Infinity, unit: "year" },
64
64
  ];
65
65
 
66
66
  let duration = seconds;
@@ -9,9 +9,8 @@ export class RecentlyVisitedPages {
9
9
  #getFromStorage() {
10
10
  const storage = localStorage.getItem(RecentlyVisitedPages.#key);
11
11
  if (storage) {
12
- let pages;
13
12
  try {
14
- pages = JSON.parse(storage);
13
+ const pages = JSON.parse(storage);
15
14
  if (Array.isArray(pages)) {
16
15
  return pages.map((page) => new RecentlyVisitedPage(page));
17
16
  }
@@ -247,7 +247,7 @@ export class SidebarFilterer {
247
247
  ranges.set(index, index + needle.length);
248
248
  }
249
249
  }
250
- const sortedRanges = [...ranges.entries()].sort(
250
+ const sortedRanges = [...ranges].sort(
251
251
  ([x1, y1], [x2, y2]) => x1 - x2 || y1 - y2,
252
252
  );
253
253
 
@@ -170,7 +170,9 @@ export class MDNSurvey extends L10nMixin(LitElement) {
170
170
  this.#onSubmitted();
171
171
  }
172
172
  };
173
- window.addEventListener("message", this._messageListener, false);
173
+ window.addEventListener("message", this._messageListener, {
174
+ capture: false,
175
+ });
174
176
  }
175
177
 
176
178
  #removeMessageListener() {
@@ -89,7 +89,7 @@ export class TranslationBanner extends ServerComponent {
89
89
  const { locale } = context;
90
90
  if (
91
91
  locale === "en-US" ||
92
- !context.doc.other_translations.some(({ locale }) => locale === "en-US")
92
+ context.doc.other_translations.every(({ locale }) => locale !== "en-US")
93
93
  ) {
94
94
  return nothing;
95
95
  }
@@ -60,7 +60,7 @@ export default class MDNWriterReload extends L10nMixin(LitElement) {
60
60
  // eslint-disable-next-line unicorn/no-negated-condition
61
61
  if (this._state !== state) {
62
62
  if (this._comparisons <= 1) {
63
- this._interval = this._interval * 2;
63
+ this._interval *= 2;
64
64
  }
65
65
  location.reload();
66
66
  this._reloading = true;