Skip to content

Commit

Permalink
Merge branch 'main' into search-add-char-mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed May 20, 2024
2 parents dc8887c + b4bc689 commit 5a34d0e
Show file tree
Hide file tree
Showing 490 changed files with 22,715 additions and 12,219 deletions.
4 changes: 3 additions & 1 deletion .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ REACT_APP_AUTOCOMPLETE_SEARCH_WIDGET=true

# These are set to fake values just to make sure the paths that
# injects the relevant script tags actually run in end-to-end testing.
BUILD_GOOGLE_ANALYTICS_ACCOUNT=UA-00000000-0
BUILD_GOOGLE_ANALYTICS_MEASUREMENT_ID=G-XXXXXXXX

# The functional tests are done in a production'y way as if it had
# to go into full production mode.
Expand All @@ -34,3 +34,5 @@ BUILD_ALWAYS_ALLOW_ROBOTS=true
REACT_APP_ENABLE_PLUS=true

REACT_APP_FXA_SIGNIN_URL=/users/fxa/login/authenticate/

BASE_URL="https://developer.mozilla.org"
9 changes: 6 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ module.exports = {
{
files: ["**/*.ts", "**/*.tsx"],
parser: "@typescript-eslint/parser",
extends: ["plugin:@typescript-eslint/recommended"],
extends: [
"plugin:@typescript-eslint/recommended",
//"plugin:@typescript-eslint/stylistic",
],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ ignoreRestSiblings: true },
],
"n/no-deprecated-api": "off",
"n/no-extraneous-import": [
"error",
{
Expand All @@ -65,7 +68,7 @@ module.exports = {
],
"n/no-missing-import": "off",
"n/no-unpublished-import": "off",
"n/shebang": "off",
"n/hashbang": "off",
},
},
{
Expand Down
17 changes: 17 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ----------------------------------------------------------------------------
# MDN Yari CODEOWNERS
# ----------------------------------------------------------------------------
# Order is important. The last matching pattern takes precedence.
# For more detailed information, see:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# DEFAULT OWNERS
# ----------------------------------------------------------------------------
* @mdn/core-dev

# These are @mdn-bot because the auto-merge GHA workflow uses the PAT of this account.
# If another reviewer is specified, update the PAT token or auto-merge will cease to be automatic.
/package.json @mdn-bot
/yarn.lock @mdn-bot
91 changes: 79 additions & 12 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,89 @@
blog:
- changed-files:
- any-glob-to-any-file: "**/blog/**/*"

browser-compat:
- "client/src/document/ingredients/browser-compatability-table/**/*"
- changed-files:
- any-glob-to-any-file: "**/browser-compatability-table/**/*"

macros:
- "kumascript/**/*"
- changed-files:
- any-glob-to-any-file: "kumascript/**/*"

cloud-function:
- changed-files:
- any-glob-to-any-file: "cloud-function/**/*"

copy:
- changed-files:
- any-glob-to-any-file: "copy/**/*"

dependencies:
- "**/poetry.lock"
- "**/yarn.lock"
- changed-files:
- any-glob-to-any-file:
- "**/poetry.lock"
- "**/yarn.lock"

deployer:
- "deployer/**/*"
- changed-files:
- any-glob-to-any-file: "deployer/**/*"

filecheck:
- changed-files:
- any-glob-to-any-file: "filecheck/**/*"

flaw-system:
- "build/flaws/**/*"
- changed-files:
- any-glob-to-any-file: "build/flaws/**/*"

github-actions:
- ".github/workflows/**/*"
- changed-files:
- any-glob-to-any-file: ".github/workflows/**/*"

markdown:
- "markdown/**/*"
- changed-files:
- any-glob-to-any-file: "markdown/**/*"

metrics:
- changed-files:
- any-glob-to-any-file: "**/telemetry/**/*"

placement:
- changed-files:
- any-glob-to-any-file:
- "**/placement/**/*"
- "**/pong/**/*"

plus:
- "client/src/plus/**/*"
- changed-files:
- any-glob-to-any-file:
- "**/plus/**/*"
- "**/plus-docs/**/*"

plus:ai-help:
- changed-files:
- any-glob-to-any-file: "**/ai-help/**/*"

plus:offline:
- "client/pwa/src/**/*"
- "client/src/offline-settings/**/*"
- changed-files:
- any-glob-to-any-file:
- "client/pwa/src/**/*"
- "client/src/offline-settings/**/*"

plus:playground:
- changed-files:
- any-glob-to-any-file: "**/playground/**/*"

plus:updates:
- changed-files:
- any-glob-to-any-file: "client/src/plus/updates/**/*"

python:
- "**/*.py"
- changed-files:
- any-glob-to-any-file: "**/*.py"

redirects:
- changed-files:
- any-glob-to-any-file:
- "cloud-function/src/middlewares/redirect-*"
- "libs/fundamental-redirects/**/*"
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.AUTOMERGE_TOKEN }}

Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ jobs:
path: mdn/mdn-contributor-spotlight

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: yarn

- name: Install all yarn packages
Expand All @@ -76,7 +76,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:

# This just makes sure the Google Analytics script gets used even if
# it goes nowhere.
BUILD_GOOGLE_ANALYTICS_ACCOUNT: UA-00000000-0
BUILD_GOOGLE_ANALYTICS_MEASUREMENT_ID: G-XXXXXXXX

# This removes the ability to sign in
REACT_APP_DISABLE_AUTH: true
Expand All @@ -136,11 +136,6 @@ jobs:
echo "CONTENT_TRANSLATED_ROOT=$CONTENT_TRANSLATED_ROOT"
yarn build:prepare
# (July 15, 2021) This is a temporary solution. This should become an
# integrated part of 'build:prepare'.
# See https://github.com/mdn/yari/issues/4217
yarn tool popularities
yarn tool sync-translated-content
# Spread the work across 2 processes. Why 2? Because that's what you
Expand Down Expand Up @@ -205,7 +200,7 @@ jobs:
poetry run deployer search-index ../client/build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2.2.0
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-access-key-id: ${{ secrets.DEPLOYER_STAGE_AND_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOYER_STAGE_AND_DEV_AWS_SECRET_ACCESS_KEY }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/developing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ jobs:
path: mdn/content

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: yarn

- name: Cache @vscode/ripgrep bin
uses: actions/cache@v4
with:
key: vscode-ripgrep-bin-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}
path: node_modules/@vscode/ripgrep/bin/

- name: Install all yarn packages
run: yarn --frozen-lockfile
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4.3.0
- uses: actions/labeler@v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
23 changes: 10 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,28 @@ jobs:

steps:
- name: Release
uses: google-github-actions/release-please-action@v3
uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: release-please-action
changelog-types: |
[
{"type": "feat", "section": "Features", "hidden": false},
{"type": "fix", "section": "Bug Fixes", "hidden": false},
{"type": "enhance", "section": "Enhancements", "hidden": false},
{"type": "chore", "section": "Miscellaneous", "hidden": false}
]

- name: Checkout
uses: actions/checkout@v4
if: steps.release.outputs.release_created

- name: Setup
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: steps.release.outputs.release_created
with:
node-version: 18
node-version-file: ".nvmrc"
cache: yarn
registry-url: "https://registry.npmjs.org"

- name: Cache @vscode/ripgrep bin
uses: actions/cache@v4
if: steps.release.outputs.release_created
with:
key: vscode-ripgrep-bin-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}
path: node_modules/@vscode/ripgrep/bin/

- name: Install
if: steps.release.outputs.release_created
run: yarn --frozen-lockfile
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/npm-published-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ jobs:
path: mdn/content

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: "yarn"

- name: Cache @vscode/ripgrep bin
uses: actions/cache@v4
with:
key: vscode-ripgrep-bin-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}
path: node_modules/@vscode/ripgrep/bin/

- name: Install all yarn packages
run: yarn --frozen-lockfile
env:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ jobs:
path: mdn/content

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: yarn

- name: Cache @vscode/ripgrep bin
uses: actions/cache@v4
with:
key: vscode-ripgrep-bin-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}
path: node_modules/@vscode/ripgrep/bin/

- name: Install all yarn packages
run: yarn --frozen-lockfile
env:
Expand All @@ -44,7 +50,7 @@ jobs:

# Make sure it's set to something so that the build uses the
# Google Analytics tag which is most realistic.
BUILD_GOOGLE_ANALYTICS_ACCOUNT: UA-00000000-0
BUILD_GOOGLE_ANALYTICS_MEASUREMENT_ID: G-XXXXXXXX
run: |
yarn build:prepare
# BUILD_FOLDERSEARCH=mdn/kitchensink yarn build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-deployer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:

- name: Install Python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: deployer/.venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/pr-deployer.yml') }}-${{ steps.setup-python.outputs.python-version }}

- name: Load cached .local
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.local
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/pr-deployer.yml') }}-${{ steps.setup-python.outputs.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: "yarn"

- name: Lint markdown files
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pr-kumascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: ".nvmrc"
cache: yarn

- name: Cache @vscode/ripgrep bin
uses: actions/cache@v4
with:
key: vscode-ripgrep-bin-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('yarn.lock') }}
path: node_modules/@vscode/ripgrep/bin/

- name: Install all yarn packages
run: yarn --frozen-lockfile
env:
Expand Down
Loading

0 comments on commit 5a34d0e

Please sign in to comment.