Skip to content

Commit

Permalink
Move pageinfo into src/article-api (#54620)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorsector authored Feb 28, 2025
1 parent 235946b commit bf209e9
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
# - links
- observability
# - open-source
- pageinfo
# - pages
- products
- redirects
Expand Down Expand Up @@ -176,7 +175,7 @@ jobs:

- uses: ./.github/actions/precompute-pageinfo
# Only the 'pageinfo' tests include end-to-end tests about this.
if: ${{ matrix.name == 'pageinfo' }}
if: ${{ matrix.name == 'article-api' }}
env:
ROOT: src/fixtures/fixtures

Expand All @@ -194,6 +193,6 @@ jobs:
# tests run only in English. The exception is the
# `languages` suite which needs all languages to be set up.
ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }}
ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }}
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo') && 'src/fixtures/fixtures/translations' || '' }}
ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }}
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api') && 'src/fixtures/fixtures/translations' || '' }}
run: npm test -- src/${{ matrix.name }}/tests/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"playwright-test": "playwright test --config src/fixtures/playwright.config.ts --project=\"Google Chrome\"",
"post-lints": "tsx src/content-linter/scripts/post-lints.js",
"postinstall": "cp package-lock.json .installed.package-lock.json && echo \"Updated .installed.package-lock.json\" # see husky/post-checkout and husky/post-merge",
"precompute-pageinfo": "tsx src/pageinfo/scripts/precompute-pageinfo.ts",
"precompute-pageinfo": "tsx src/article-api/scripts/precompute-pageinfo.ts",
"prepare": "husky src/workflows/husky",
"prettier": "prettier -w \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
"prettier-check": "prettier -c \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { program, Option } from 'commander'

import { languageKeys } from 'src/languages/lib/languages.js'
import { loadPages, loadUnversionedTree } from 'src/frame/lib/page-data.js'
import { CACHE_FILE_PATH, getPageInfo } from '../middleware'
import { CACHE_FILE_PATH, getPageInfo } from '../middleware/pageinfo'

program
.description('Generates a JSON file with precompute pageinfo data by pathname')
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/frame/middleware/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import events from '@/events/middleware.js'
import anchorRedirect from '@/rest/api/anchor-redirect.js'
import aiSearch from '@/search/middleware/ai-search'
import search from '@/search/middleware/search-routes.js'
import pageInfo from '@/pageinfo/middleware'
import pageInfo from '#src/article-api/middleware/pageinfo.ts'
import pageList from '@/article-api/middleware/pagelist'
import webhooks from '@/webhooks/middleware/webhooks.js'
import { ExtendedRequest } from '@/types'
Expand Down

0 comments on commit bf209e9

Please sign in to comment.