Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
86 lines (86 loc) · 6.05 KB
/
Copy pathpackage.json
File metadata and controls
86 lines (86 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"name": "dd-docs-astro",
"type": "module",
"packageManager": "yarn@4.10.3",
"engines": {
"node": ">=24.0.0"
},
"scripts": {
"//deps": "Everything `astro dev` and `astro build` need in place before they run, chained explicitly because Yarn Berry ignores arbitrary pre* hooks. Every dev and build script starts with this or its :dev variant, so adding a prerequisite means editing one line rather than six. The Astro CI job runs `yarn build:preview` (DataDog/documentation-ci, ci-templates/base.yml), so CI picks these up too.",
"deps": "yarn build:ask-ai && yarn fetch:spec && yarn fetch:examples",
"//deps:dev": "The dev-server variant. Only difference is --best-effort, which downgrades an unreachable network to a warning so the dev server still starts; no build:* script may use it, or a build could ship API pages with missing code-example tabs.",
"deps:dev": "yarn build:ask-ai && yarn fetch:spec --best-effort && yarn fetch:examples --best-effort",
"//build:ask-ai": "Part of `deps`, and called directly by scripts that need dist/ but not the code examples (typecheck).",
"build:ask-ai": "yarn install:ask-ai && yarn --cwd ../shared/packages/ask-ai build",
"//install:ask-ai": "The Ask AI package is a separate Yarn project with its own lockfile, so its dependencies are not installed by `yarn install` here. Building it without this step fails on a fresh checkout.",
"install:ask-ai": "yarn --cwd ../shared/packages/ask-ai install --immutable",
"//fetch:examples": "Stages the SDK code examples the API docs render; part of `deps`. No-ops when api-code-examples/ is already staged for the current branch, so the repeat cost in dev is nil; run `yarn fetch:examples --force` to re-fetch, or pass --pins <path> to read a local sdk_versions.json instead of the network.",
"fetch:examples": "node scripts/fetchApiCodeExamples.ts",
"//fetch:spec": "Stages the API spec bundle (full_spec.yaml, CodeExamples.json, translate_*.json) into api-spec/, which the @api-spec alias reads; part of `deps`. Typecheck and the headless tests read it too, so they run it with --best-effort: they ship nothing, so a stale tree is acceptable there, whereas no build:* script may use the flag. Reads production by default, or the prefix FF_API_DOCS_S3_PATH names. A repeat run is one conditional request that S3 answers 304 when nothing changed; run `yarn fetch:spec --force` to re-download, or pass --bundle <path> to stage a local tarball instead of the network.",
"fetch:spec": "node scripts/fetchApiSpec.ts",
"dev": "yarn deps:dev && astro dev --port 4321",
"dev:proxied": "yarn deps:dev && PROXIED=1 astro dev --port 4321",
"build": "yarn deps && DOCS_SITE_URL=http://localhost:4322 astro build",
"build:en": "yarn deps && SKIP_TRANSLATIONS=true DOCS_SITE_URL=http://localhost:4322 astro build",
"build:preview": "yarn deps && CI_ENVIRONMENT_NAME=preview astro build",
"build:live": "yarn deps && CI_ENVIRONMENT_NAME=live astro build",
"verify:dist": "node scripts/verifyDist.mjs",
"//format": "Uses astro/.prettierrc, not the repo-root prettier.config.js — Prettier picks the nearest config and uses it wholesale, so never run this from the repo root or pass the root config.",
"format": "prettier --write .",
"format:check": "prettier --check .",
"typecheck": "yarn build:ask-ai && yarn fetch:spec --best-effort && astro check",
"preview": "astro preview --port 4322",
"preview:proxied": "PROXIED=1 astro preview --port 4321",
"pretest": "node -e \"const [major] = process.versions.node.split('.').map(Number); if (major < 24) { console.error('Error: Node >=24 required (current: ' + process.version + '). Run: nvm use'); process.exit(1); }\"",
"test": "yarn typecheck && yarn test:headless && yarn test:browser",
"test:headless": "yarn fetch:spec --best-effort && vitest run",
"test:browser": "USE_DEV_SERVER=true playwright test",
"//test:ci": "Typecheck plus the Vitest suites. Skips Playwright, whose screenshot baselines are captured on macOS and won't match a Linux runner. Fetches the spec without --best-effort first, so an unreachable bundle fails here with a clear error rather than as unresolved @api-spec imports; the --best-effort fetches inside typecheck and test:headless then answer 304.",
"test:ci": "yarn fetch:spec && yarn typecheck && yarn test:headless",
"test-ai": "yarn typecheck && yarn test:headless-ai && yarn test:browser-ai",
"test:headless-ai": "yarn fetch:spec --best-effort && vitest run --reporter=dot --silent=true",
"test:browser-ai": "USE_DEV_SERVER=true playwright test --reporter=dot",
"kill-dev": "lsof -ti :4321 | xargs kill -9 2>/dev/null || true"
},
"dependencies": {
"@astrojs/check": "^0.9.10",
"@astrojs/markdoc": "^2.0.6",
"@astrojs/node": "^11.0.3",
"@astrojs/preact": "^6.0.2",
"@astrojs/sitemap": "^3.7.3",
"@datadog/browser-logs": "^7.11.0",
"@datadog/browser-rum": "^7.11.0",
"@datadog/openfeature-browser": "^2.2.0",
"@dd/ask-ai": "link:../shared/packages/ask-ai",
"@openfeature/core": "^1.12.0",
"@openfeature/web-sdk": "^1.10.0",
"astro": "^7.1.5",
"astro-adapter-aws-lambda": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/astro-adapter-aws-lambda-v1.0.0.tgz",
"cdocs-data": "https://s3.amazonaws.com/origin-static-assets/corp-node-packages/master/cdocs-data-v2.0.0.tgz",
"marked": "^18.0.7",
"picomatch": "^4.0.5",
"preact": "^10.29.7",
"shiki": "^4.3.1",
"yaml": "^2.9.0",
"zod": "^4.4.3"
},
"devDependencies": {
"@astrojs/ts-plugin": "^1.10.10",
"@datadog/datadog-ci": "^5.23.0",
"@playwright/test": "^1.62.0",
"@testing-library/preact": "^3.2.4",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^24.9.2",
"@types/picomatch": "^4.0.3",
"cheerio": "^1.2.0",
"happy-dom": "^20.11.1",
"openapi-types": "^12.1.3",
"prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1",
"rollup-plugin-visualizer": "^7.0.1",
"tar": "^7.5.4",
"typescript": "^5.9.3",
"typesense": "^3.0.6",
"vitest": "^4.1.10"
}
}