Skip to content

Commit d230ee0

Browse files
authored
Merge docs into main prior to v10 release (#1335)
* switch typedoc to using patched branch to fix anchors * try again * try again * Update imports.md * move website-only deps to website/package.json * update main<->docs merge instructions in CONTRIBUTING.md * fix potential confusion about docs<->main merge strategy
1 parent 1db1031 commit d230ee0

File tree

6 files changed

+16
-7
lines changed

6 files changed

+16
-7
lines changed

.github/workflows/website.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
with:
1818
node-version: 14
1919
# Render typedoc
20-
- run: npm install && ./node_modules/.bin/typedoc
20+
# Using custom branch to workaround: https://github.com/TypeStrong/typedoc/issues/1585
21+
- run: npm install && git clone --depth 1 https://github.com/cspotcode/typedoc --branch patch-2 && pushd typedoc && npm install && npm run build || true && popd && ./typedoc/bin/typedoc
2122
# Render docusaurus and deploy website
2223
- run: |
2324
set -euo pipefail

CONTRIBUTING.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Docs for the latest stable release live in a `docs` branch. The "Edit this page
2929
branch so that the website can be improved in parallel with new feature work.
3030

3131
Docs changes for unreleased features are merged to `main` in the same PR which implements the feature, adds tests, etc.
32-
When we release a new version, we merge `main` into `docs` and `docs` into `main`, unifying the two.
32+
When we release a new version, we merge `main` with `docs`, unifying the two.
3333

3434
```shell
3535
cd ./website
@@ -44,11 +44,14 @@ This site was used to generate the favicon from a high-res PNG export of the SVG
4444

4545
We publish using `np`: https://npm.im/np
4646

47-
1. Merge `docs` into `main`
47+
1. Merge `docs` into `main` using a pull request, ensuring a consistent squash-merge
4848
2. Rebuild the README (see instructions above, necessary because npmjs.com renders the readme)
4949
3. Publish with `np`
5050
4. Add changelog to the Github Release; match formatting from previous releases
51-
5. Merge `main` into `docs` (this automatically rebuilds the website)
51+
5. Move `docs` branch to head of `main`
52+
- this rebuilds the website
53+
- `git push --force origin main:docs`
54+
- avoids merge messiness due to earlier squash-merge from `docs` to `main`
5255
6. If tsconfig schema has changed, send a pull request to schemastore. [Example](https://github.com/SchemaStore/schemastore/pull/1208)
5356

5457
## APIExtractor

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@
161161
"@tsconfig/node12": "^1.0.7",
162162
"@tsconfig/node14": "^1.0.0",
163163
"@tsconfig/node16": "^1.0.1",
164-
"@types/js-yaml": "^4.0.0",
165164
"arg": "^4.1.0",
166165
"create-require": "^1.1.0",
167166
"diff": "^4.0.1",
168-
"js-yaml": "^4.0.0",
169167
"make-error": "^1.1.1",
170168
"source-map-support": "^0.5.17",
171169
"yn": "3.1.1"

website/docs/imports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Here is a brief comparison of the two.
1515

1616
## CommonJS
1717

18-
Transforming to CommonJS is typically simpler and more widely supported because it is older. You must remove or set [`"type": "commonjs"`](https://nodejs.org/api/packages.html#packages_type) in `package.json` and [`"module": "CommonJS"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`.
18+
Transforming to CommonJS is typically simpler and more widely supported because it is older. You must remove [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) from `package.json` and set [`"module": "CommonJS"`](https://www.typescriptlang.org/tsconfig/#module) in `tsconfig.json`.
1919

2020
```json title="package.json"
2121
{

website/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"@docusaurus/preset-classic": "2.0.0-alpha.75",
1818
"@docusaurus/theme-search-algolia": "^2.0.0-alpha.75",
1919
"@mdx-js/react": "^1.6.21",
20+
"@types/js-yaml": "^4.0.0",
2021
"clsx": "^1.1.1",
22+
"js-yaml": "^4.0.0",
2123
"react": "^16.8.4",
2224
"react-dom": "^16.8.4",
2325
"remark": "^13.0.0",

website/yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2609,6 +2609,11 @@
26092609
resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#3c9ee980f1a10d6021ae6632ca3e79ca2ec4fb50"
26102610
integrity sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==
26112611

2612+
"@types/js-yaml@^4.0.0":
2613+
version "4.0.1"
2614+
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.1.tgz#5544730b65a480b18ace6b6ce914e519cec2d43b"
2615+
integrity sha512-xdOvNmXmrZqqPy3kuCQ+fz6wA0xU5pji9cd1nDrflWaAWtYLLGk5ykW0H6yg5TVyehHP1pfmuuSaZkhP+kspVA==
2616+
26122617
"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6":
26132618
version "7.0.7"
26142619
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"

0 commit comments

Comments
 (0)