Skip to content

Commit

Permalink
Merge branch 'main' into rm-screen-and
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed May 20, 2024
2 parents 3babae3 + b4bc689 commit e9b607f
Show file tree
Hide file tree
Showing 14 changed files with 675 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.52.0"
".": "2.52.1"
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [2.52.1](https://github.com/mdn/yari/compare/v2.52.0...v2.52.1) (2024-05-17)


### Bug Fixes

* **build:** sort build.json content ([#11124](https://github.com/mdn/yari/issues/11124)) ([77ec929](https://github.com/mdn/yari/commit/77ec929f7d80f845f31d5822eb5e4cc8c9b1cef9))
* **css-syntax:** explicitly order specs ([#11101](https://github.com/mdn/yari/issues/11101)) ([8e8cd78](https://github.com/mdn/yari/commit/8e8cd7892e4737dc82122cc55ea46e4366da6a0d))
* **l10n:** improve style of en-US links ([#11052](https://github.com/mdn/yari/issues/11052)) ([378dd13](https://github.com/mdn/yari/commit/378dd13aeccf81e2e7d3404528e453ca5064f1d0))
* **layout:** avoid column breaks in index ([#11053](https://github.com/mdn/yari/issues/11053)) ([710685e](https://github.com/mdn/yari/commit/710685ea6e1acb3f56aaeebdaa7199a99492efd2))
* **layout:** avoid column-breaks in index ([710685e](https://github.com/mdn/yari/commit/710685ea6e1acb3f56aaeebdaa7199a99492efd2))
* **spas:** index AI Help + Updates ([#11138](https://github.com/mdn/yari/issues/11138)) ([f4c2388](https://github.com/mdn/yari/commit/f4c2388032a76fa4e09b84d46475f43f55e25004))
* **ssr:** remove unnecessary robots tags ([#11139](https://github.com/mdn/yari/issues/11139)) ([1207158](https://github.com/mdn/yari/commit/12071588ec64d125cc39c15c1f3cf068d96f204c))


### Miscellaneous

* **deps-dev:** bump @swc/core from 1.5.5 to 1.5.7 ([#11132](https://github.com/mdn/yari/issues/11132)) ([b5f43c9](https://github.com/mdn/yari/commit/b5f43c977f286e747f4003e45cd2982dd74fe3c7))
* **deps-dev:** bump @types/mdast from 4.0.3 to 4.0.4 in the types group ([#11128](https://github.com/mdn/yari/issues/11128)) ([aef184e](https://github.com/mdn/yari/commit/aef184e4054b6a8ba7bfc0a73dc12f12ff333a48))
* **deps-dev:** bump eslint-plugin-unicorn from 52.0.0 to 53.0.0 ([#11103](https://github.com/mdn/yari/issues/11103)) ([0b263d0](https://github.com/mdn/yari/commit/0b263d0e6822ef7f9812760a14b6e3b4a1b879fe))
* **deps-dev:** bump postcss-preset-env from 9.5.12 to 9.5.13 ([#11131](https://github.com/mdn/yari/issues/11131)) ([1423ca4](https://github.com/mdn/yari/commit/1423ca4c7c1904c49ac2d002aad8b8d5ce498691))
* **deps-dev:** bump sass from 1.77.1 to 1.77.2 ([#11146](https://github.com/mdn/yari/issues/11146)) ([fb95669](https://github.com/mdn/yari/commit/fb9566992ba4454e7a7e336e649ab36018b83cf4))
* **deps-dev:** bump typescript-eslint from 7.8.0 to 7.9.0 ([#11129](https://github.com/mdn/yari/issues/11129)) ([a5d0ac3](https://github.com/mdn/yari/commit/a5d0ac3cc59bee18b908c47c4f2da73e1c6379b0))
* **deps:** bump @mdn/browser-compat-data from 5.5.27 to 5.5.28 ([#11135](https://github.com/mdn/yari/issues/11135)) ([1329cd4](https://github.com/mdn/yari/commit/1329cd4855448e8a642f3d3583fb4f50d5df60af))
* **deps:** bump @webref/css from 6.12.10 to 6.12.11 ([#11147](https://github.com/mdn/yari/issues/11147)) ([163aa9e](https://github.com/mdn/yari/commit/163aa9ef00a45fb03d154a3000d5fa8eece931a6))
* **deps:** bump inquirer from 9.2.20 to 9.2.21 ([#11134](https://github.com/mdn/yari/issues/11134)) ([6025c0e](https://github.com/mdn/yari/commit/6025c0efde55d5682c371227a3199b19b97da2c1))
* **deps:** bump is-svg from 5.0.0 to 5.0.1 ([#11130](https://github.com/mdn/yari/issues/11130)) ([cfb93df](https://github.com/mdn/yari/commit/cfb93df0d952593f3cd86c0cf7ded58e1dde7d84))
* **deps:** bump openai from 4.45.0 to 4.47.1 ([#11133](https://github.com/mdn/yari/issues/11133)) ([85aec2d](https://github.com/mdn/yari/commit/85aec2d4c7f623b796a30dba0ea251fce97cd0ce))
* **deps:** bump web-features from 0.8.1 to 0.8.2 ([#11144](https://github.com/mdn/yari/issues/11144)) ([f8c0a29](https://github.com/mdn/yari/commit/f8c0a29b5acb6e03ff0237a15f69342ea32625bf))

## [2.52.0](https://github.com/mdn/yari/compare/v2.51.0...v2.52.0) (2024-05-14)


Expand Down
11 changes: 6 additions & 5 deletions build/sentry.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import Sentry from "@sentry/node";
import { CaptureConsole } from "@sentry/integrations";
import { init, captureConsoleIntegration, NodeOptions } from "@sentry/node";

export function initSentry(
dsn: string,
options?: Omit<Sentry.NodeOptions, "dsn" | "environment" | "integrations">
options?: Omit<NodeOptions, "dsn" | "environment" | "integrations">
) {
Sentry.init({
init({
dsn,
environment: process.env.SENTRY_ENVIRONMENT || "dev",
integrations: [new CaptureConsole({ levels: ["warn", "error", "assert"] })],
integrations: [
captureConsoleIntegration({ levels: ["warn", "error", "assert"] }),
],
tracesSampleRate: 1.0,
...options,
});
Expand Down
2 changes: 0 additions & 2 deletions build/spas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export async function buildSPAs(options: {
{
prefix: "plus/ai-help",
pageTitle: `AI Help | ${MDN_PLUS_TITLE}`,
noIndexing: true,
},
{
prefix: "plus/collections",
Expand All @@ -160,7 +159,6 @@ export async function buildSPAs(options: {
{
prefix: "plus/updates",
pageTitle: `Updates | ${MDN_PLUS_TITLE}`,
noIndexing: true,
},
{
prefix: "plus/settings",
Expand Down
5 changes: 5 additions & 0 deletions client/src/document/organisms/article-footer/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
margin-top: 0;
}

@media (max-width: $screen-sm) {
margin-left: 1rem;
margin-right: 1rem;
}

.article-footer-inner {
margin: 0 auto;
max-width: 1440px;
Expand Down
22 changes: 11 additions & 11 deletions deployer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deployer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
click = "^8.1.7"
boto3 = "^1.34.103"
boto3 = "^1.34.108"
python-decouple = "^3.8"
requests = {extras = ["security"], version = "^2.31.0"}
elasticsearch-dsl = "^7.4.1"
Expand All @@ -21,7 +21,7 @@ unidiff = "^0.7.5"
[tool.poetry.dev-dependencies]
black = "^24.4"
flake8 = "^7.0.0"
pytest = "^8.2.0"
pytest = "^8.2.1"

[tool.poetry.scripts]
deployer = "deployer.main:cli"
Expand Down
2 changes: 2 additions & 0 deletions kumascript/macros/LearnSidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ const l10nStrings = mdn.localStringMap({
'Accessibility_—_Make_the_web_usable_by_everyone' : 'Accessibility — Make the web usable by everyone',
'Accessibility_guides' : 'Accessibility guides',
'Accessibility_assessment' : 'Accessibility assessment',
'Games_Developing_for_web' : 'ゲーム — ウェブ用ゲームの開発',
'Guides_and_tutorials': 'ガイドとチュートリアル',
'Tools_and_testing' : 'ツールとテスト',
'Cross_browser_testing' : 'ブラウザー横断テスト',
'Git_and_GitHub' : 'Git と GitHub',
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mdn/yari",
"version": "2.52.0",
"version": "2.52.1",
"repository": "https://github.com/mdn/yari",
"license": "MPL-2.0",
"author": "MDN Web Docs",
Expand Down Expand Up @@ -70,14 +70,13 @@
"@codemirror/theme-one-dark": "^6.1.2",
"@fast-csv/parse": "^5.0.0",
"@mdn/bcd-utils-api": "^0.0.7",
"@mdn/browser-compat-data": "^5.5.28",
"@mdn/browser-compat-data": "^5.5.29",
"@mozilla/glean": "5.0.1",
"@sentry/integrations": "^7.114.0",
"@sentry/node": "^7.114.0",
"@sentry/node": "^8.2.1",
"@stripe/stripe-js": "^3.4.0",
"@use-it/interval": "^1.0.0",
"@vscode/ripgrep": "^1.15.9",
"@webref/css": "^6.12.10",
"@webref/css": "^6.12.11",
"accept-language-parser": "^1.5.0",
"async": "^3.2.5",
"chalk": "^5.3.0",
Expand Down Expand Up @@ -107,7 +106,7 @@
"imagemin-mozjpeg": "^10.0.0",
"imagemin-pngquant": "^10.0.0",
"imagemin-svgo": "^11.0.0",
"inquirer": "^9.2.21",
"inquirer": "^9.2.22",
"is-svg": "^5.0.1",
"js-yaml": "^4.1.0",
"loglevel": "^1.9.1",
Expand Down Expand Up @@ -144,7 +143,7 @@
"unified": "^11.0.4",
"unist-builder": "^4.0.0",
"unist-util-visit": "^5.0.0",
"web-features": "^0.8.1",
"web-features": "^0.8.3",
"web-specs": "^3.9.0"
},
"devDependencies": {
Expand Down Expand Up @@ -199,7 +198,7 @@
"foreman": "^3.0.1",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"history": "^5.2.0",
"html-validate": "^8.18.2",
"html-validate": "^8.19.0",
"html-webpack-plugin": "^5.6.0",
"husky": "^9.0.11",
"identity-obj-proxy": "^3.0.0",
Expand Down Expand Up @@ -234,7 +233,7 @@
"resolve": "^1.22.8",
"resolve-url-loader": "^5.0.0",
"rough-notation": "^0.5.1",
"sass": "^1.77.1",
"sass": "^1.77.2",
"sass-loader": "^14.2.1",
"source-map-explorer": "^2.5.3",
"source-map-loader": "^5.0.0",
Expand Down
11 changes: 5 additions & 6 deletions ssr/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,12 @@ export default function render(
}</script>`;

const robotsContent =
!ALWAYS_ALLOW_ROBOTS ||
(doc && doc.noIndexing) ||
pageNotFound ||
noIndexing
!ALWAYS_ALLOW_ROBOTS || (doc && doc.noIndexing) || noIndexing
? "noindex, nofollow"
: "index, follow";
const robotsMeta = `<meta name="robots" content="${robotsContent}">`;
: "";
const robotsMeta = robotsContent
? `<meta name="robots" content="${robotsContent}">`
: "";
const rssLink = `<link rel="alternate" type="application/rss+xml" title="MDN Blog RSS Feed" href="${BASE_URL}/${DEFAULT_LOCALE}/blog/rss.xml" hreflang="en" />`;
const ssr_data = [...translations, ...WEBFONT_TAGS, rssLink, robotsMeta];
let html = buildHtml;
Expand Down
8 changes: 4 additions & 4 deletions testing/integration/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion testing/integration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
pytest = "^8.2.0"
pytest = "^8.2.1"
pytest-base-url = "^2.1.0"
pytest-rerunfailures = "^14.0"
requests = "^2.31.0"
Expand Down
6 changes: 3 additions & 3 deletions testing/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ test("content built foo page", () => {
`https://developer.mozilla.org${doc.mdn_url}`
);

expect($('meta[name="robots"]').attr("content")).toBe("index, follow");
expect($('meta[name="robots"]')).toHaveLength(0);

// The HTML should contain the Google Analytics snippet.
// The ID should match what's set in `.env.testing`.
Expand Down Expand Up @@ -1179,7 +1179,7 @@ test("404 page", () => {
const $ = cheerio.load(html);
expect($("title").text()).toContain("Page not found");
expect($("h1").text()).toContain("Page not found");
expect($('meta[name="robots"]').attr("content")).toBe("noindex, nofollow");
expect($('meta[name="robots"]')).toHaveLength(0);
expect($('meta[property="og:locale"]').attr("content")).toBe("en_US");
});

Expand All @@ -1190,7 +1190,7 @@ test("plus page", () => {
const html = fs.readFileSync(htmlFile, "utf-8");
const $ = cheerio.load(html);
expect($("title").text()).toContain("Plus");
expect($('meta[name="robots"]').attr("content")).toBe("index, follow");
expect($('meta[name="robots"]')).toHaveLength(0);
});

test("plus collections page", () => {
Expand Down
Loading

0 comments on commit e9b607f

Please sign in to comment.