Skip to content

Commit

Permalink
[antlir2][docs] yarn upgrade
Browse files Browse the repository at this point in the history
Summary: Upgrade to docusaurus 3.0 and all transitive deps

Test Plan:
```
❯ ~/fbsource/xplat/third-party/yarn/yarn start-fb
yarn run v1.18.0
$ /data/users/vmagro/fbsource/fbcode/antlir/antlir2/docs/node_modules/.bin/start-fb
$ docusaurus start --port 9094 --host devvm11640.ftw0.facebook.com
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: https://devvm11640.ftw0.facebook.com:9094/intern/staticdocs/antlir2/

✔ Client
  Compiled successfully in 18.69s

client (webpack 5.89.0) compiled successfully
```
Site looks fine

Reviewed By: snarkmaster

Differential Revision: D51528907

fbshipit-source-id: 6e655f450d327f47f3d198a7d2589a9b01431cca
  • Loading branch information
vmagro authored and facebook-github-bot committed Nov 28, 2023
1 parent 2b12c4d commit 44fa254
Show file tree
Hide file tree
Showing 6 changed files with 5,081 additions and 6,052 deletions.
4 changes: 2 additions & 2 deletions antlir/antlir2/docs/docs/features/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ Remove RPMs by name or nevra if they are installed.

Add a new user/group to `/etc/passwd` and friends.

<InternalOnly>
<FbInternalOnly>
There are also some <a href="./fb">Meta-only internal features</a>
</InternalOnly>
</FbInternalOnly>
29 changes: 14 additions & 15 deletions antlir/antlir2/docs/docs/internals/rpms.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ sidebar_position: 3

We take full snapshots of all available yum repositories and periodically update
the in-repo copy.
<InternalOnly>
See <a href="../fb/fast-snapshot">fast-snapshot</a> for how this works internally.
</InternalOnly>

<FbInternalOnly>
See <a href="../fb/fast-snapshot">fast-snapshot</a> for how this works internally.
</FbInternalOnly>

### Buck targets

Expand All @@ -33,9 +33,7 @@ metadata.

The `repo_set` rule contains zero or more `repo` dependencies, and serves as a
convenient grouping to refer to all repos that are part of a distribution with a
single buck target label.
This rule does not build anything on its own.

single buck target label. This rule does not build anything on its own.

## Installation

Expand Down Expand Up @@ -72,11 +70,11 @@ guaranteeing [reproducibility](../../reproducibility) almost impossible.
But, we need to get these `.rpm`s materialized onto disk somehow so that `dnf`
can install them.

Luckily, `buck2` has [dynamic
dependencies](https://buck2.build/docs/rule_authors/dynamic_dependencies/) which
let an `image.layer` take a "dep" on every single rpm that's made available to
it, but only selectively materialize the ones that are actually going to be
installed in a transaction.
Luckily, `buck2` has
[dynamic dependencies](https://buck2.build/docs/rule_authors/dynamic_dependencies/)
which let an `image.layer` take a "dep" on every single rpm that's made
available to it, but only selectively materialize the ones that are actually
going to be installed in a transaction.

### Installation

Expand All @@ -90,7 +88,8 @@ otherwise our safety guarantee of explicitly-installed rpms never being
implicitly removed later on cannot be upheld.

For example:
* `foobarbaz` depends on `foobar` which depends on `foo`
* child layer installs `foobar` for its own needs, and removes `foobarbaz`
* later `image.layer` tries to remove `foo`
* this must fail

- `foobarbaz` depends on `foobar` which depends on `foo`
- child layer installs `foobar` for its own needs, and removes `foobarbaz`
- later `image.layer` tries to remove `foo`
- this must fail
4 changes: 2 additions & 2 deletions antlir/antlir2/docs/docs/recipes/multi-os-images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ set_default_os_for_package(
)
```

<InternalOnly>
<FbInternalOnly>
<Admonition type="tip" title="This is often unnecessary">
<p>
<code>fbcode</code> ships with a <code>PACKAGE</code> file that selects an
appropriate <code>default_os</code> that the Antlir team maintains. If you don't
specifically need a certain OS release, prefer to leave it unspecified.
</p>
</Admonition>
</InternalOnly>
</FbInternalOnly>

### (In)Compatibility

Expand Down
9 changes: 4 additions & 5 deletions antlir/antlir2/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

const {fbContent} = require('docusaurus-plugin-internaldocs-fb/internal');
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import {fbContent} from 'docusaurus-plugin-internaldocs-fb/internal';
import {themes} from 'prism-react-renderer';

// With JSDoc @type annotations, IDEs can provide config autocompletion
/** @type {import('@docusaurus/types').DocusaurusConfig} */
Expand Down Expand Up @@ -121,8 +120,8 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
copyright: `Copyright © ${new Date().getFullYear()} Meta Platforms, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: themes.github,
darkTheme: themes.darcula,
},
}),
});
18 changes: 9 additions & 9 deletions antlir/antlir2/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.1.0",
"@docusaurus/preset-classic": "2.1.0",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
"docusaurus-plugin-internaldocs-fb": "1.8.0",
"prism-react-renderer": "^1.3.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@docusaurus/core": "3.0.0",
"@docusaurus/preset-classic": "3.0.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-internaldocs-fb": "1.16.2",
"prism-react-renderer": "^2.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"browserslist": {
"production": [
Expand All @@ -42,6 +42,6 @@
"yarn": "^1.5"
},
"devDependencies": {
"yarn-audit-fix": "^9.3.10"
"yarn-audit-fix": "^10.0.5"
}
}
Loading

0 comments on commit 44fa254

Please sign in to comment.