diff --git a/.changeset/jira-base-url.md b/.changeset/jira-base-url.md deleted file mode 100644 index f385a2d03..000000000 --- a/.changeset/jira-base-url.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@alauda/doom": minor ---- - -Make the Jira that release notes are fetched from configurable, with `JIRA_BASE_URL`. - -A `release-notes-for-bugs` placeholder is filled from Jira's search API, and the -address of that API was written into the code — `https://jira.alauda.cn/rest/api/2/search` -— while only the credentials, `JIRA_USERNAME` and `JIRA_PASSWORD`, came from the -environment. A build that can reach Jira only through another host or port had no -way to say so, and a production build fails when it cannot fetch its release notes. - -`JIRA_BASE_URL` is the Jira base URL: the scheme, the host, an optional port and an -optional context path, without `/rest/...`. doom appends `/rest/api/2/search` to it. -A trailing `/` is ignored, and an empty value counts as unset, which is the shape an -unset variable often arrives in. It is read for each request rather than when the -module loads, so it does not matter when the plugin was first imported. - -Unset, the request is byte for byte the one doom sent before, so nothing changes for -a build that does not set it. diff --git a/.changeset/skip-non-language-dirs.md b/.changeset/skip-non-language-dirs.md deleted file mode 100644 index 3fa7ef511..000000000 --- a/.changeset/skip-non-language-dirs.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -"@alauda/doom": patch ---- - -Only a supported language's directory is a language. Any other directory under -the docs root is now skipped with a warning instead of failing the build. - -Every directory directly under the docs root used to become a language, apart -from `dist`, `node_modules`, `public` and `shared`. Each language gets a -`//products` page whose heading comes from doom's word list, and the word -list only has `en`, `zh` and `ru`. So when `tektoncd-operator` added a shell -script under `docs/scripts/`, `scripts` became a language, and every docs build -of both its branches failed from then on (65 runs over two days, none green) -with an error that says nothing about the directory: - -```text -Page "/scripts/products" SSG rendering failed. -TypeError: Cannot read properties of undefined (reading 'all_product_documentation') -``` - -Nor could a site work around it: there is no option to name the languages, and -a `themeConfig.locales` list in the config is appended to the detected one -rather than replacing it. - -A directory is now a language only if its name is one of -`SUPPORTED_LANGUAGES`, the list `doom lint` and `doom translate` already use. -Any other directory is left out of the site the way `shared/` is — none of its -files becomes a page — and the build says which one it skipped: - -```text -Skipped `docs/scripts`: not a language directory (doom builds en, zh, ru), so no pages are built from it, like `shared` -``` - -`-I` / `-E` still pick the languages first; a directory they leave out is -skipped silently, as before. The same rule covers a directory of pages in a -language doom does not support, such as `docs/ja/`: its pages are not built, and -the warning is the only sign of it. diff --git a/packages/doom/CHANGELOG.md b/packages/doom/CHANGELOG.md index bfd5fae06..ece8f2a93 100644 --- a/packages/doom/CHANGELOG.md +++ b/packages/doom/CHANGELOG.md @@ -1,5 +1,62 @@ # @alauda/doom +## 2.9.0 + +### Minor Changes + +- [#364](https://github.com/alauda/doom/pull/364) [`d02c46f`](https://github.com/alauda/doom/commit/d02c46f3bdaf79860fcc798f5ba56353f989634b) Thanks [@youyongsong](https://github.com/youyongsong)! - Make the Jira that release notes are fetched from configurable, with `JIRA_BASE_URL`. + + A `release-notes-for-bugs` placeholder is filled from Jira's search API, and the + address of that API was written into the code — `https://jira.alauda.cn/rest/api/2/search` + — while only the credentials, `JIRA_USERNAME` and `JIRA_PASSWORD`, came from the + environment. A build that can reach Jira only through another host or port had no + way to say so, and a production build fails when it cannot fetch its release notes. + + `JIRA_BASE_URL` is the Jira base URL: the scheme, the host, an optional port and an + optional context path, without `/rest/...`. doom appends `/rest/api/2/search` to it. + A trailing `/` is ignored, and an empty value counts as unset, which is the shape an + unset variable often arrives in. It is read for each request rather than when the + module loads, so it does not matter when the plugin was first imported. + + Unset, the request is byte for byte the one doom sent before, so nothing changes for + a build that does not set it. + +### Patch Changes + +- [#365](https://github.com/alauda/doom/pull/365) [`26b6b4f`](https://github.com/alauda/doom/commit/26b6b4f41902ac9714aa941b6f0c567637949b0f) Thanks [@youyongsong](https://github.com/youyongsong)! - Only a supported language's directory is a language. Any other directory under + the docs root is now skipped with a warning instead of failing the build. + + Every directory directly under the docs root used to become a language, apart + from `dist`, `node_modules`, `public` and `shared`. Each language gets a + `//products` page whose heading comes from doom's word list, and the word + list only has `en`, `zh` and `ru`. So when `tektoncd-operator` added a shell + script under `docs/scripts/`, `scripts` became a language, and every docs build + of both its branches failed from then on (65 runs over two days, none green) + with an error that says nothing about the directory: + + ```text + Page "/scripts/products" SSG rendering failed. + TypeError: Cannot read properties of undefined (reading 'all_product_documentation') + ``` + + Nor could a site work around it: there is no option to name the languages, and + a `themeConfig.locales` list in the config is appended to the detected one + rather than replacing it. + + A directory is now a language only if its name is one of + `SUPPORTED_LANGUAGES`, the list `doom lint` and `doom translate` already use. + Any other directory is left out of the site the way `shared/` is — none of its + files becomes a page — and the build says which one it skipped: + + ```text + Skipped `docs/scripts`: not a language directory (doom builds en, zh, ru), so no pages are built from it, like `shared` + ``` + + `-I` / `-E` still pick the languages first; a directory they leave out is + skipped silently, as before. The same rule covers a directory of pages in a + language doom does not support, such as `docs/ja/`: its pages are not built, and + the warning is the only sign of it. + ## 2.8.2 ### Patch Changes diff --git a/packages/doom/package.json b/packages/doom/package.json index fd46d0d3b..9ca026fca 100644 --- a/packages/doom/package.json +++ b/packages/doom/package.json @@ -1,6 +1,6 @@ { "name": "@alauda/doom", - "version": "2.8.2", + "version": "2.9.0", "type": "module", "description": "Doctor Doom making docs.", "repository": {