浏览代码

:sparkles: Upgrade to Anchor 0.30.1 (#62)

# Upgrade to Anchor 0.30.1

| Status  | Type  | ⚠️ Core Change | Issue |
| :---: | :---: | :---: | :--: |
| Ready | Feature | No | - |

## Description

Upgrade Anchor dependency to 0.30.1
Gabriele Picco 1 年之前
父节点
当前提交
3d6d7276f9
共有 6 个文件被更改,包括 202 次插入179 次删除
  1. 169 157
      Cargo.lock
  2. 6 6
      Cargo.toml
  3. 9 4
      cli/src/lib.rs
  4. 1 1
      crates/types/Cargo.toml
  5. 1 1
      package.json
  6. 16 10
      yarn.lock

文件差异内容过多而无法显示
+ 169 - 157
Cargo.lock


+ 6 - 6
Cargo.toml

@@ -32,14 +32,14 @@ bolt-system = { path = "programs/bolt-system", features = ["cpi"], version = "=0
 bolt-component = { path = "programs/bolt-component", features = ["cpi"], version = "=0.1.6"}
 
 ## External crates
-anchor-lang = { version = "=0.30.0", features = ["init-if-needed"] }
-anchor-cli = { version = "=0.30.0" }
-anchor-client = { version = "=0.30.0" }
-anchor-syn = { version = "=0.30.0" }
-anchor-lang-idl = { version = "=0.1.0" }
+anchor-lang = { version = "=0.30.1", features = ["init-if-needed"] }
+anchor-cli = { version = "=0.30.1" }
+anchor-client = { version = "=0.30.1" }
+anchor-syn = { version = "=0.30.1" }
+anchor-spl = { version = "=0.30.1" }
+anchor-lang-idl = { version = "=0.1.1" }
 solana-program = { version = "=1.18" }
 solana-client = { version = "=1.16" }
-anchor-spl = { version = "=0.30.0" }
 solana-security-txt = "1.1.1"
 tuple-conv = "1.0.1"
 syn = { version = "1.0.60", features = ["full"] }

+ 9 - 4
cli/src/lib.rs

@@ -69,6 +69,7 @@ pub fn entry(opts: Opts) -> Result<()> {
                 name,
                 javascript,
                 solidity,
+                no_install,
                 no_git,
                 template,
                 test_template,
@@ -78,6 +79,7 @@ pub fn entry(opts: Opts) -> Result<()> {
                 name,
                 javascript,
                 solidity,
+                no_install,
                 no_git,
                 template,
                 test_template,
@@ -137,6 +139,7 @@ fn init(
     name: String,
     javascript: bool,
     solidity: bool,
+    no_install: bool,
     no_git: bool,
     template: anchor_cli::rust_template::ProgramTemplate,
     test_template: anchor_cli::rust_template::TestTemplate,
@@ -386,10 +389,12 @@ fn init(
         }
     }
 
-    let yarn_result = install_node_modules("yarn")?;
-    if !yarn_result.status.success() {
-        println!("Failed yarn install will attempt to npm install");
-        install_node_modules("npm")?;
+    if !no_install {
+        let yarn_result = install_node_modules("yarn")?;
+        if !yarn_result.status.success() {
+            println!("Failed yarn install will attempt to npm install");
+            install_node_modules("npm")?;
+        }
     }
 
     if !no_git {

+ 1 - 1
crates/types/Cargo.toml

@@ -10,4 +10,4 @@ name = "bolt_types"
 
 [dependencies]
 bolt-lang = { path = "../../crates/bolt-lang" }
-anchor-lang = { version = "0.30.0" }
+anchor-lang = { version = "0.30.1" }

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
         "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check"
     },
     "dependencies": {
-        "@coral-xyz/anchor": "0.30.0"
+        "@coral-xyz/anchor": "0.30.1"
     },
     "devDependencies": {
         "chai": "^4.3.4",

+ 16 - 10
yarn.lock

@@ -21,12 +21,18 @@
   dependencies:
     regenerator-runtime "^0.14.0"
 
-"@coral-xyz/anchor@0.30.0":
-  version "0.30.0"
-  resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.0.tgz#52acdba504b0008f1026d3a4bbbcb2d4feb5c69e"
-  integrity sha512-qreDh5ztiRHVnCbJ+RS70NJ6aSTPBYDAgFeQ7Z5QvaT5DcDIhNyt4onOciVz2ieIE1XWePOJDDu9SbNvPGBkvQ==
-  dependencies:
-    "@coral-xyz/borsh" "^0.30.0"
+"@coral-xyz/anchor-errors@^0.30.1":
+  version "0.30.1"
+  resolved "https://registry.yarnpkg.com/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz#bdfd3a353131345244546876eb4afc0e125bec30"
+  integrity sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ==
+
+"@coral-xyz/anchor@0.30.1":
+  version "0.30.1"
+  resolved "https://registry.yarnpkg.com/@coral-xyz/anchor/-/anchor-0.30.1.tgz#17f3e9134c28cd0ea83574c6bab4e410bcecec5d"
+  integrity sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ==
+  dependencies:
+    "@coral-xyz/anchor-errors" "^0.30.1"
+    "@coral-xyz/borsh" "^0.30.1"
     "@noble/hashes" "^1.3.1"
     "@solana/web3.js" "^1.68.0"
     bn.js "^5.1.2"
@@ -41,10 +47,10 @@
     superstruct "^0.15.4"
     toml "^3.0.0"
 
-"@coral-xyz/borsh@^0.30.0":
-  version "0.30.0"
-  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.0.tgz#3e6f23e944ef6c89f2c9cbead383358752ac5e73"
-  integrity sha512-OrcV+7N10cChhgDRUxM4iEIuwxUHHs52XD85R8cFCUqE0vbLYrcoPPPs+VF6kZ9DhdJGVW2I6DHJOp5TykyZog==
+"@coral-xyz/borsh@^0.30.1":
+  version "0.30.1"
+  resolved "https://registry.yarnpkg.com/@coral-xyz/borsh/-/borsh-0.30.1.tgz#869d8833abe65685c72e9199b8688477a4f6b0e3"
+  integrity sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ==
   dependencies:
     bn.js "^5.1.2"
     buffer-layout "^1.2.0"

部分文件因为文件数量过多而无法显示