Skip to content

Commit

Permalink
Lock web3.js to version 1.x for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Nov 5, 2024
1 parent a30da83 commit d565c33
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions content/courses/intro-to-solana/intro-to-cryptography.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ You can use the Solana blockchain from either the browser or node.js with the
to install `@solana/web3.js`

```shell
npm i @solana/web3.js
npm i @solana/web3.js@1
```

We'll cover a lot of
Expand Down Expand Up @@ -171,7 +171,7 @@ Make a new directory, install TypeScript, Solana web3.js and esrun:
mkdir generate-keypair
cd generate-keypair
npm init -y
npm install typescript @solana/web3.js esrun @solana-developers/helpers
npm install typescript @solana/web3.js@1 esrun @solana-developers/helpers@2
```

Make a new file called `generate-keypair.ts`
Expand Down
2 changes: 1 addition & 1 deletion content/courses/intro-to-solana/intro-to-reading-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Solana. We'll also install TypeScript and `esrun`, so we can run `.ts` files on
the command line:

```bash
npm install typescript @solana/web3.js esrun
npm install typescript @solana/web3.js@1 esrun
```

### Connect to the Network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ npm init -y
Install all the required dependencies.

```bash
npm i @solana/web3.js @solana-developers/[email protected]
npm i @solana/web3.js@1 @solana-developers/[email protected]
npm i --save-dev esrun
```
Expand Down
2 changes: 1 addition & 1 deletion content/courses/state-compression/compressed-nfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ cd cnft-demo
Install all the required dependencies

```bash
npm i @solana/web3.js @solana-developers/[email protected] @metaplex-foundation/mpl-token-metadata @metaplex-foundation/mpl-bubblegum @metaplex-foundation/digital-asset-standard-api @metaplex-foundation/umi-bundle-defaults
npm i @solana/web3.js@1 @solana-developers/[email protected] @metaplex-foundation/mpl-token-metadata @metaplex-foundation/mpl-bubblegum @metaplex-foundation/digital-asset-standard-api @metaplex-foundation/umi-bundle-defaults

npm i --save-dev esrun
```
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/close-mint.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/default-account-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/immutable-owner.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/interest-bearing-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/non-transferable-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/permanent-delegate.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/required-memo.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/token-extensions/transfer-fee.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ Next, we'll need to add our dependencies. Run the following to install the
required packages:

```bash
npm i @solana-developers/helpers @solana/spl-token @solana/web3.js esrun dotenv typescript
npm i @solana-developers/helpers@2 @solana/spl-token @solana/web3.js@1 esrun dotenv typescript
```

Create a directory named `src`. In this directory, create a file named
Expand Down
2 changes: 1 addition & 1 deletion content/courses/tokens-and-nfts/nfts-with-metaplex.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ Solana.
To begin, make a new folder and install the relevant dependencies:

```bash
npm i @solana/web3.js npm i @solana/web3.js npm i @solana-developers/helpers npm i @metaplex-foundation/mpl-token-metadata npm i @metaplex-foundation/umi-bundle-defaults npm i @metaplex-foundation/umi-uploader-irys npm i --save-dev esrun
npm i @solana/web3.js@1 @solana-developers/helpers@2 @metaplex-foundation/mpl-token-metadata @metaplex-foundation/umi-bundle-defaults @metaplex-foundation/umi-uploader-irys esrun
```

Then create a file called `create-metaplex-collection.ts`, and add our imports:
Expand Down
2 changes: 1 addition & 1 deletion content/courses/tokens-and-nfts/token-program.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ Assuming you already have a `.env` file with a `SECRET_KEY` setup per
[Cryptography fundamentals](/content/courses/intro-to-solana/intro-to-cryptography.md).

```bash
npm i @solana/web3.js @solana/spl-token @solana-developers/helpers esrun
npm i @solana/web3.js@1 @solana/spl-token @solana-developers/helpers@2 esrun
```

#### Create the Token Mint
Expand Down
2 changes: 1 addition & 1 deletion content/guides/getstarted/full-stack-solana-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ Throw this command into your terminal to install all the `wallet-adapter` stuff
we need:
```shell
yarn add react @solana/web3.js \
yarn add react @solana/web3.js@1 \
@solana/wallet-adapter-base @solana/wallet-adapter-react \
@solana/wallet-adapter-react-ui @solana/wallet-adapter-wallets
```
Expand Down
2 changes: 1 addition & 1 deletion content/guides/getstarted/local-rust-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ For macOS you can
Install the Solana web3.js library and the Solana helpers library:

```shell
npm install @solana/web3.js @solana-developers/helpers
npm install @solana/web3.js@1 @solana-developers/helpers@2
```

Create a new file called `client.mjs` and add the following code:
Expand Down
2 changes: 1 addition & 1 deletion content/guides/javascript/compressed-nfts.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Using your preferred package manager (e.g. npm, yarn, pnpm, etc), install these
packages into your project:

```shell
yarn add @solana/web3.js @solana/spl-token @solana/spl-account-compression
yarn add @solana/web3.js@1 @solana/spl-token @solana/spl-account-compression
```

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Install these packages to your Next.js project using your preferred node package
manager:

```shell
npm install @solana/web3.js \
npm install @solana/web3.js@1 \
@solana/wallet-adapter-base \
@solana/wallet-adapter-react \
@solana/wallet-adapter-react-ui \
Expand Down
4 changes: 2 additions & 2 deletions docs/clients/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ For the full list of terms, see
#### yarn

```shell
yarn add @solana/web3.js
yarn add @solana/web3.js@1
```

#### npm

```shell
npm install --save @solana/web3.js
npm install --save @solana/web3.js@1
```

#### Bundle
Expand Down

0 comments on commit d565c33

Please sign in to comment.