From 6950e334aa3d4250c9f019dc0874ad1040292e17 Mon Sep 17 00:00:00 2001
From: Sarah Schwartz <58856580+sarahschwartz@users.noreply.github.com>
Date: Tue, 28 May 2024 15:49:01 -0600
Subject: [PATCH] chore: bump intro-to-sway guide (#282)
---
docs/builds/sway | 2 +-
docs/fuels-ts | 2 +-
docs/fuels-wallet | 2 +-
.../guides/docs/contract-quickstart/index.mdx | 10 ---
.../docs/counter-dapp/building-a-frontend.mdx | 6 +-
.../building-a-smart-contract.mdx | 20 ++---
.../guides/docs/frontend-quickstart/index.mdx | 14 ++-
docs/guides/docs/intro-to-sway/checkpoint.mdx | 2 +-
.../docs/intro-to-sway/contract-functions.mdx | 14 +--
docs/guides/docs/intro-to-sway/index.mdx | 2 -
.../docs/intro-to-sway/prerequisites.mdx | 16 +++-
docs/guides/docs/intro-to-sway/rust-sdk.mdx | 12 ++-
.../docs/intro-to-sway/typescript-sdk.mdx | 89 +++++++++----------
.../docs/migration-guide/breaking-change-log | 2 +-
docs/guides/examples/intro-to-sway | 2 +-
docs/nightly/builds/sway | 2 +-
docs/nightly/fuel-specs | 2 +-
docs/nightly/fuels-ts | 2 +-
docs/nightly/fuels-wallet | 2 +-
docs/nightly/sway | 2 +-
docs/nightly/sway-libs | 2 +-
docs/sway | 2 +-
docs/sway-libs | 2 +-
scripts/wallet-patch-fixes/download-link.mjs | 2 +-
src/config/constants.ts | 2 +-
src/config/versions.json | 6 +-
src/lib/md-doc.ts | 9 +-
src/lib/plugins/rust-versions.ts | 5 +-
src/lib/versions.ts | 5 +-
src/pages/[...slug].tsx | 2 +-
30 files changed, 116 insertions(+), 126 deletions(-)
diff --git a/docs/builds/sway b/docs/builds/sway
index 5cc814a84..f000b1359 160000
--- a/docs/builds/sway
+++ b/docs/builds/sway
@@ -1 +1 @@
-Subproject commit 5cc814a84edf1d13dc5dcb12f782e4f997250109
+Subproject commit f000b135996c18de8d753fdacc154d877818ac83
diff --git a/docs/fuels-ts b/docs/fuels-ts
index f978acc1f..cb5ce1594 160000
--- a/docs/fuels-ts
+++ b/docs/fuels-ts
@@ -1 +1 @@
-Subproject commit f978acc1ffb7a609676b41329340fd25457a83f3
+Subproject commit cb5ce1594d4c35ee342cf80b3e24c61537b16add
diff --git a/docs/fuels-wallet b/docs/fuels-wallet
index dfd945c56..ca83b8c3b 160000
--- a/docs/fuels-wallet
+++ b/docs/fuels-wallet
@@ -1 +1 @@
-Subproject commit dfd945c5695148467ce692968fabcaefea730783
+Subproject commit ca83b8c3bb84d6791120279f042ed5866bddbbcc
diff --git a/docs/guides/docs/contract-quickstart/index.mdx b/docs/guides/docs/contract-quickstart/index.mdx
index 6c33375e4..249626908 100644
--- a/docs/guides/docs/contract-quickstart/index.mdx
+++ b/docs/guides/docs/contract-quickstart/index.mdx
@@ -42,16 +42,6 @@ Getting started with Fuel as a smart contract developer is as simple as:
commentType="{/*"
/>
-### Testnet toolchain
-
-To use the `testnet` toolchain, run the commands below:
-
-```sh
-fuelup self update
-fuelup toolchain install testnet
-fuelup default testnet
-```
-
## Generating a counter contract
Run the command below to generate a counter contract in Sway:
diff --git a/docs/guides/docs/counter-dapp/building-a-frontend.mdx b/docs/guides/docs/counter-dapp/building-a-frontend.mdx
index 3f5ab5040..c93234e1f 100644
--- a/docs/guides/docs/counter-dapp/building-a-frontend.mdx
+++ b/docs/guides/docs/counter-dapp/building-a-frontend.mdx
@@ -19,11 +19,13 @@ To build a frontend application for the counter contract, we'll do the following
## Install the Fuel Browser Wallet
+{/*install_wallet:example:start*/}
Our frontend application will allow users to connect with a wallet, so you'll need to have a browser wallet installed.
-The current Fuel Wallet release can only be used with the `beta-5` network. To use the new testnet, you must use the [Fuel Development Wallet](https://chromewebstore.google.com/detail/fuel-wallet-development/hcgmehahnlbhpilepakbdinkhhaackmc).
+Before going to the next steps, install the [Fuel Wallet](https://chromewebstore.google.com/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok) extension.
-You can get test funds for the testnet by visiting the [Testnet Faucet](https://faucet-testnet.fuel.network/).
+Once you've setup your wallet, click the "Faucet" button in the wallet to get some testnet tokens.
+{/*install_wallet:example:end*/}
## Initialize a React project
diff --git a/docs/guides/docs/counter-dapp/building-a-smart-contract.mdx b/docs/guides/docs/counter-dapp/building-a-smart-contract.mdx
index 73fe8f6b7..6e689fb9f 100644
--- a/docs/guides/docs/counter-dapp/building-a-smart-contract.mdx
+++ b/docs/guides/docs/counter-dapp/building-a-smart-contract.mdx
@@ -34,25 +34,18 @@ parent:
commentType="{/*"
/>
-### Testnet toolchain
-
-To use the `testnet` toolchain, run the commands below:
-
-```sh
-fuelup self update
-fuelup toolchain install testnet
-fuelup default testnet
-```
-
-{/* ### Already have `fuelup` installed?
+### Already have `fuelup` installed?
+{/*already_installed:example:start*/}
If you already have `fuelup` installed, run the commands below to make sure you are on the most up-to-date toolchain.
```sh
fuelup self update
fuelup update
fuelup default latest
-``` */}
+```
+
+{/*already_installed:example:end*/}
## Your First Sway Project
@@ -381,6 +374,7 @@ tree .
4 directories, 8 files
```
+{/*rust_harness:example:start*/}
We have two new files!
- The `Cargo.toml` is the manifest for our new test harness and specifies the required dependencies including `fuels` (the Fuel Rust SDK).
@@ -394,6 +388,8 @@ fuels = { version = "0.62.0", features = ["fuel-core-lib"] }
tokio = { version = "1.12", features = ["rt", "macros"] }
```
+{/*rust_harness:example:end*/}
+
Now that we have our default test harness, let's add a useful test to it.
At the bottom of `test/harness.rs` below the `can_get_contract_id()` test, add the `test_increment` test function below to verify that the value of the counter gets incremented:
diff --git a/docs/guides/docs/frontend-quickstart/index.mdx b/docs/guides/docs/frontend-quickstart/index.mdx
index 59033ad51..a7433eb93 100644
--- a/docs/guides/docs/frontend-quickstart/index.mdx
+++ b/docs/guides/docs/frontend-quickstart/index.mdx
@@ -42,15 +42,13 @@ Getting started with Fuel as a frontend or fullstack developer is as simple as:
commentType="{/*"
/>
-### Testnet toolchain
+### Already have `fuelup` installed?
-To use the `testnet` toolchain, run the commands below:
-
-```sh
-fuelup self update
-fuelup toolchain install testnet
-fuelup default testnet
-```
+
## Generating a counter dapp
diff --git a/docs/guides/docs/intro-to-sway/checkpoint.mdx b/docs/guides/docs/intro-to-sway/checkpoint.mdx
index 6d45062da..8fecb2637 100644
--- a/docs/guides/docs/intro-to-sway/checkpoint.mdx
+++ b/docs/guides/docs/intro-to-sway/checkpoint.mdx
@@ -70,4 +70,4 @@ To deploy, use the following command if you've already set up the forc-wallet an
forc deploy --testnet
```
-After deploying, remember to save your contract ID. You'll need it for frontend integration.
+After deploying, you'll be able to find your contract ID in the `contract/out/deployments` folder. You'll need this for frontend integration.
diff --git a/docs/guides/docs/intro-to-sway/contract-functions.mdx b/docs/guides/docs/intro-to-sway/contract-functions.mdx
index ebb26b1a2..4302bae49 100644
--- a/docs/guides/docs/intro-to-sway/contract-functions.mdx
+++ b/docs/guides/docs/intro-to-sway/contract-functions.mdx
@@ -124,7 +124,7 @@ Next, we'll utilize the `require` statement to ensure the sent asset is the corr
The `require` statement accepts two arguments: a condition, and a value that's logged when the condition is false. Should the condition evaluate as false, the entire transaction is rolled back, leaving no changes.
-In this case, the condition checks if the `asset_id` matches the `BASE_ASSET_ID`βthe default asset associated with the base blockchain, imported from the standard library. For example, if the base blockchain is Ethereum, the base asset would be ETH.
+In this case, the condition checks if the `asset_id` matches the base asset ID β the default asset associated with the base blockchain - using `AssetId::base()`. For example, if the base blockchain is Ethereum, the base asset would be ETH.
If there's a mismatch in the asset, for instance, if someone attempts to purchase an item using a different coin, we'll trigger the custom error previously defined, passing along the `asset_id`.
@@ -207,14 +207,16 @@ To get the details for an item, we can create a read-only function that returns
lang="sway"
/>
-To return a value in a function, you can use the `return` keyword, similar to JavaScript. Alternatively, you can omit the semicolon in the last line to return that value like in Rust. Although both methods are effective.
+To return a value in a function, you can use the `return` keyword, similar to JavaScript. Alternatively, you can omit the semicolon in the last line to return that value like in Rust.
```sway
-fn my_function(num: u64) -> u64{
- // returning the num variable
+fn my_function_1(num: u64) -> u64{
+ // returns the num variable
return num;
-
- // this would also work:
+}
+
+fn my_function_2(num: u64) -> u64{
+ // returns the num variable
num
}
```
diff --git a/docs/guides/docs/intro-to-sway/index.mdx b/docs/guides/docs/intro-to-sway/index.mdx
index bda6c38f5..d4bec2846 100644
--- a/docs/guides/docs/intro-to-sway/index.mdx
+++ b/docs/guides/docs/intro-to-sway/index.mdx
@@ -8,8 +8,6 @@ parent:
# Introduction to Sway Language for JavaScript Developers
-> **Note:** This guide has not yet been updated for the new `testnet` network.
-
If you're familiar with JavaScript and have a basic understanding of blockchain fundamentals, you can swiftly grasp how to build full-stack decentralized applications on Fuel using Sway. Once you get a handle on Sway's essentials, you'll be able to begin building your own dapp.
Within this tutorial, we will be crafting a Sway contract for an online marketplace similar to Amazon, where:
diff --git a/docs/guides/docs/intro-to-sway/prerequisites.mdx b/docs/guides/docs/intro-to-sway/prerequisites.mdx
index a3621821a..c5464531a 100644
--- a/docs/guides/docs/intro-to-sway/prerequisites.mdx
+++ b/docs/guides/docs/intro-to-sway/prerequisites.mdx
@@ -36,7 +36,21 @@ parent:
commentType="{/*"
/>
-Make sure you have the latest version of the [Fuel Wallet](https://chrome.google.com/webstore/detail/fuel-wallet/dldjpboieedgcmpkchcjcbijingjcgok) installed.
+### Already have `fuelup` installed?
+
+
+
+### Fuel Wallet
+
+
Additionally for this guide, ensure you're using Node.js/npm version {props.nodeVersion}.
You can check your Node.js version with:
diff --git a/docs/guides/docs/intro-to-sway/rust-sdk.mdx b/docs/guides/docs/intro-to-sway/rust-sdk.mdx
index 5b6c5b59d..be5414f9c 100644
--- a/docs/guides/docs/intro-to-sway/rust-sdk.mdx
+++ b/docs/guides/docs/intro-to-sway/rust-sdk.mdx
@@ -31,9 +31,15 @@ action={{
/>
```bash
-cargo generate --init fuellabs/sway templates/sway-test-rs --name sway-store --tag v0.49.3
+cargo generate --init fuellabs/sway templates/sway-test-rs --name sway-store
```
+
+
## Imports
We will be changing the existing `harness.rs` test file that has been generated. Firstly we need to change the imports. By importing the Fuel Rust SDK you will get majority of the functionalities housed within the prelude.
@@ -96,7 +102,7 @@ action={{
## Test Cases
Given the immutable nature of smart contracts, it's important to cover all potential edge cases in your tests.
-Let's write the test cases at the bottom of our `harness.rs` file.
+Let's delete the example `can_get_contract_id` test case and start writing some test cases at the bottom of our `harness.rs` file.
### Setting Owner
@@ -194,7 +200,7 @@ If you have followed the previous steps correctly your `harness.rs` test file sh
## Running the Tests
-To run the test located in `tests/harness.rs`, use:
+To run the test located in `tests/harness.rs`, run the command below inside your `contract` folder:
```sh
-npm install fuels@0.82.0 @fuels/react@0.18.0 @fuels/connectors@0.2.2 @tanstack/react-query@5.28.9
+npm install fuels @fuels/react @fuels/connectors @tanstack/react-query
```
## Generate contract types
@@ -60,7 +60,7 @@ action={{
/>
```sh
-npx fuels@0.82.0 init --contracts ../contract/ --output ./src/contracts
+npx fuels init --contracts ../contract/ --output ./src/contracts
```
Now that you have a `fuels.config.ts` file, you can use the `fuels build` command to rebuild your contract and generate types.
@@ -88,7 +88,7 @@ action={{
/>
```sh
-npx fuels@0.82.0 build
+npx fuels build
```
A successful process should print and output like the following:
@@ -100,70 +100,53 @@ Generating types..
π Build completed successfully!
```
-> If you're having any issues with this part, try adding `useBuiltinForc: false` to your `fuels.config.ts` config file to make sure it's using the same version of `forc` as your default toolchain.
-
Now you should be able to find a new folder `fuel-project/frontend/src/contracts`.
-Open the `src/App.tsx` file, and replace the boilerplate code with the template below:
+## Wallet Providers
+
+In your `index.tsx` file, wrap your `App` component with the `FuelProvider` and `QueryClientProvider` components to enable Fuel's custom React hooks for wallet functionalities.
+
+This is where you can pass in custom wallet connectors to customize which wallets your users can use to connect to your app.
-At the top of the file, change the `CONTRACT_ID` to the contract ID that you deployed earlier and set as a constant.
-
-
+## Connecting to the contract
-Copy and paste the CSS code below in your `App.css` file to add some simple styling.
+Next, open the `src/App.tsx` file, and replace the boilerplate code with the template below:
-### Connecting to the contract
-
-Wrap your components with the `FuelProvider` and `QueryClientProvider` components to enable Fuel's custom React hooks for wallet functionalities in `index.tsx`.
-
-This is where you can pass in custom wallet connectors to customize which wallets your users can use to connect to your app.
-
-
+At the top of the file, change the `CONTRACT_ID` to the contract ID that you deployed earlier and set as a constant.
@@ -197,16 +180,26 @@ The `useMemo` hook is used to connect to our contract with the connected wallet.
lang="tsx"
/>
+## Styling
+
+Copy and paste the CSS code below in your `App.css` file to add some simple styling.
+
+
+
-Now we have our contract connection ready. You can console log the contract here to make sure this is working correctly.
-
-### UI
+## UI
In our app we're going to have two tabs: one to see all of the items listed for sale, and one to list a new item for sale.
@@ -221,7 +214,7 @@ We use another state variable called `active` that we can use to toggle between
Next we can create our components to show and list items.
-### Listing an Item
+## Listing an Item
Create a new folder in the `src` folder called `components`.
@@ -358,7 +351,7 @@ action={{
Now, try listing an item to make sure this works.
You should see the message `Item successfully listed!`.
-### Show All Items
+## Show All Items
Next, let's create a new file called `AllItems.tsx` in the `components` folder.
@@ -447,7 +440,7 @@ action={{
lang="tsx"
/>
-### Item Card
+## Item Card
Now let's create the item card component.
Create a new file called `ItemCard.tsx` in the components folder.
@@ -539,7 +532,7 @@ action={{
Now you should be able to see and buy all of the items listed in your contract.
-### Checkpoint
+## Checkpoint
Ensure that all your files are correctly configured by examining the code below. If you require additional assistance, refer to the repository [here](https://github.com/FuelLabs/intro-to-sway/tree/main/frontend)
@@ -579,7 +572,7 @@ Ensure that all your files are correctly configured by examining the code below.
lang="tsx"
/>
-### Run your project
+## Run your project
Inside the `fuel-project/frontend` directory run:
diff --git a/docs/guides/docs/migration-guide/breaking-change-log b/docs/guides/docs/migration-guide/breaking-change-log
index d03ec14c7..72f4d5812 160000
--- a/docs/guides/docs/migration-guide/breaking-change-log
+++ b/docs/guides/docs/migration-guide/breaking-change-log
@@ -1 +1 @@
-Subproject commit d03ec14c7b5c1d92935681dd180ced28d794ca3c
+Subproject commit 72f4d58126793c0f6d19a4ab65ce0742503485d6
diff --git a/docs/guides/examples/intro-to-sway b/docs/guides/examples/intro-to-sway
index 5664d549c..b176f3433 160000
--- a/docs/guides/examples/intro-to-sway
+++ b/docs/guides/examples/intro-to-sway
@@ -1 +1 @@
-Subproject commit 5664d549c1b750c56f9ee9872dd9e95447608235
+Subproject commit b176f3433e5af521bb75f4f4aedd34bc908207a8
diff --git a/docs/nightly/builds/sway b/docs/nightly/builds/sway
index 5cc814a84..ef8738e27 160000
--- a/docs/nightly/builds/sway
+++ b/docs/nightly/builds/sway
@@ -1 +1 @@
-Subproject commit 5cc814a84edf1d13dc5dcb12f782e4f997250109
+Subproject commit ef8738e27a49f41b91c4a7a01bb63ad40776a007
diff --git a/docs/nightly/fuel-specs b/docs/nightly/fuel-specs
index 9788fffb4..dc3623c46 160000
--- a/docs/nightly/fuel-specs
+++ b/docs/nightly/fuel-specs
@@ -1 +1 @@
-Subproject commit 9788fffb48119a4a8f1915aef6e2583b67f5f083
+Subproject commit dc3623c461ae1ecc66317a3cbe7786c63a0b1f2a
diff --git a/docs/nightly/fuels-ts b/docs/nightly/fuels-ts
index f978acc1f..cb5ce1594 160000
--- a/docs/nightly/fuels-ts
+++ b/docs/nightly/fuels-ts
@@ -1 +1 @@
-Subproject commit f978acc1ffb7a609676b41329340fd25457a83f3
+Subproject commit cb5ce1594d4c35ee342cf80b3e24c61537b16add
diff --git a/docs/nightly/fuels-wallet b/docs/nightly/fuels-wallet
index dfd945c56..ca83b8c3b 160000
--- a/docs/nightly/fuels-wallet
+++ b/docs/nightly/fuels-wallet
@@ -1 +1 @@
-Subproject commit dfd945c5695148467ce692968fabcaefea730783
+Subproject commit ca83b8c3bb84d6791120279f042ed5866bddbbcc
diff --git a/docs/nightly/sway b/docs/nightly/sway
index d9985d811..2f0392ee3 160000
--- a/docs/nightly/sway
+++ b/docs/nightly/sway
@@ -1 +1 @@
-Subproject commit d9985d8111f94235edba9a08fc71a9513ec2a95c
+Subproject commit 2f0392ee35a1e4dd80bd8034962d5b4083dfb8b6
diff --git a/docs/nightly/sway-libs b/docs/nightly/sway-libs
index 8045a19e3..4048cb54e 160000
--- a/docs/nightly/sway-libs
+++ b/docs/nightly/sway-libs
@@ -1 +1 @@
-Subproject commit 8045a19e3297599750abdf6300c11e9927a29d40
+Subproject commit 4048cb54e3e68ec8d568419d38b60174d737a3bb
diff --git a/docs/sway b/docs/sway
index d9985d811..2f0392ee3 160000
--- a/docs/sway
+++ b/docs/sway
@@ -1 +1 @@
-Subproject commit d9985d8111f94235edba9a08fc71a9513ec2a95c
+Subproject commit 2f0392ee35a1e4dd80bd8034962d5b4083dfb8b6
diff --git a/docs/sway-libs b/docs/sway-libs
index 8045a19e3..4048cb54e 160000
--- a/docs/sway-libs
+++ b/docs/sway-libs
@@ -1 +1 @@
-Subproject commit 8045a19e3297599750abdf6300c11e9927a29d40
+Subproject commit 4048cb54e3e68ec8d568419d38b60174d737a3bb
diff --git a/scripts/wallet-patch-fixes/download-link.mjs b/scripts/wallet-patch-fixes/download-link.mjs
index 5a8876053..12b7f7dc1 100644
--- a/scripts/wallet-patch-fixes/download-link.mjs
+++ b/scripts/wallet-patch-fixes/download-link.mjs
@@ -32,7 +32,7 @@ function handleConstantsFile(filePath, version) {
if (start !== undefined && end !== undefined) {
const downloadLink =
- 'https://github.com/FuelLabs/fuels-wallet/releases/download/v0.16.6/fuel-wallet-0.16.6.zip';
+ 'https://github.com/FuelLabs/fuels-wallet/releases/download/v0.19.0/fuel-wallet-0.19.0.zip';
const modifiedContent = `export const DOWNLOAD_LINK = '${downloadLink}';`;
lines.splice(start, end - start + 1, modifiedContent);
const newFileContent = lines.join(EOL);
diff --git a/src/config/constants.ts b/src/config/constants.ts
index 5b9ba16b8..89c357fdb 100644
--- a/src/config/constants.ts
+++ b/src/config/constants.ts
@@ -37,7 +37,7 @@ export const EXTERNAL_NAVIGATION_LINKS: LinkObject[] = [
},
{
name: 'Faucet',
- link: FAUCET_LINK,
+ link: FAUCET_LINK,
},
{
name: 'Contributing',
diff --git a/src/config/versions.json b/src/config/versions.json
index 4faea7e69..420032550 100644
--- a/src/config/versions.json
+++ b/src/config/versions.json
@@ -1,8 +1,8 @@
{
"default": {
- "forc": "0.59.0",
+ "forc": "0.60.0",
"rust": "0.62.0",
- "ts": "0.88.0",
- "wallet": "0.18.1"
+ "ts": "0.88.1",
+ "wallet": "0.19.0"
}
}
diff --git a/src/lib/md-doc.ts b/src/lib/md-doc.ts
index 34ee0b8d2..7624a94ef 100644
--- a/src/lib/md-doc.ts
+++ b/src/lib/md-doc.ts
@@ -97,8 +97,7 @@ export class Doc {
const split = item.slug.split('/');
let category = item.category;
if (!category && item.slug.includes('docs/')) {
- const isNotDefault =
- item.slug.includes('/nightly/');
+ const isNotDefault = item.slug.includes('/nightly/');
const index = isNotDefault ? 3 : 2;
const isIndex = split.length === index;
category = split[isIndex ? index - 1 : index].replaceAll('-', ' ');
@@ -130,8 +129,7 @@ export class Doc {
}
#getConfig(slug: string): Config {
- let newSlug = slug
- .replace('docs/nightly/', 'docs/');
+ let newSlug = slug.replace('docs/nightly/', 'docs/');
try {
if (newSlug.startsWith('docs/')) {
newSlug = newSlug.replace('docs/', '');
@@ -200,8 +198,7 @@ export class Doc {
);
const links = JSON.parse(readFileSync(linksPath, 'utf8'));
if (
- (configSlug === 'guides' ||
- configSlug === 'nightly-guides') &&
+ (configSlug === 'guides' || configSlug === 'nightly-guides') &&
guideName
) {
if (configSlug === 'nightly-guides') {
diff --git a/src/lib/plugins/rust-versions.ts b/src/lib/plugins/rust-versions.ts
index ba60c6649..2d97cd9b0 100644
--- a/src/lib/plugins/rust-versions.ts
+++ b/src/lib/plugins/rust-versions.ts
@@ -1,7 +1,4 @@
-import {
- DOCS_DIRECTORY,
- NIGHTLY_DOCS_DIRECTORY,
-} from '~/src/config/constants';
+import { DOCS_DIRECTORY, NIGHTLY_DOCS_DIRECTORY } from '~/src/config/constants';
import { getRustSDKVersion } from '../versions';
diff --git a/src/lib/versions.ts b/src/lib/versions.ts
index 7d1cfbd77..2f6c47aa8 100644
--- a/src/lib/versions.ts
+++ b/src/lib/versions.ts
@@ -2,10 +2,7 @@ import fs from 'fs';
import { join } from 'path';
import toml from 'toml';
-import {
- DOCS_DIRECTORY,
- NIGHTLY_DOCS_DIRECTORY,
-} from '../config/constants';
+import { DOCS_DIRECTORY, NIGHTLY_DOCS_DIRECTORY } from '../config/constants';
import type { VersionSet } from '../types';
function itemFromPackageJson(docsDir: string, filename: string) {
diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx
index df1518968..8b68e3b13 100644
--- a/src/pages/[...slug].tsx
+++ b/src/pages/[...slug].tsx
@@ -1,7 +1,7 @@
import { join } from 'path';
import type { GetStaticProps } from 'next';
-import { existsSync, readFileSync, writeFileSync } from 'fs';
+import { readFileSync } from 'fs';
import type { MdDoc } from '../../.contentlayer/generated';
import { allMdDocs } from '../../.contentlayer/generated';
import { DOCS_DIRECTORY } from '../config/constants';