Skip to content

Commit

Permalink
Update to Anchor v0.24 (#103)
Browse files Browse the repository at this point in the history
* Update to Anchor v0.24

* 12
  • Loading branch information
macalinao authored Apr 17, 2022
1 parent 382a832 commit 4b453d4
Show file tree
Hide file tree
Showing 17 changed files with 1,416 additions and 905 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/programs-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always
SOLANA_VERSION: "1.9.9"
SOLANA_VERSION: "1.9.12"

jobs:
sdk:
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "8.11.0-sdk",
"version": "8.13.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "2.5.1-sdk",
"version": "2.6.2-sdk",
"main": "./index.js",
"type": "commonjs"
}
20 changes: 16 additions & 4 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,26 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Update 2021-10-08: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;

case `vscode`: {
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;

case `vscode`: {
str = `^/zip${str}`;
} break;

// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
Expand Down Expand Up @@ -160,8 +168,12 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
}
}

Expand Down
20 changes: 16 additions & 4 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,26 @@ const moduleWrapper = tsserver => {
//
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
//
// Update Oct 8 2021: VSCode changed their format in 1.61.
// Update 2021-10-08: VSCode changed their format in 1.61.
// Before | ^zip:/c:/foo/bar.zip/package.json
// After | ^/zip//c:/foo/bar.zip/package.json
//
// Update 2022-04-06: VSCode changed the format in 1.66.
// Before | ^/zip//c:/foo/bar.zip/package.json
// After | ^/zip/c:/foo/bar.zip/package.json
//
case `vscode <1.61`: {
str = `^zip:${str}`;
} break;

case `vscode`: {
case `vscode <1.66`: {
str = `^/zip/${str}`;
} break;

case `vscode`: {
str = `^/zip${str}`;
} break;

// To make "go to definition" work,
// We have to resolve the actual file system path from virtual path
// and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip)
Expand Down Expand Up @@ -160,8 +168,12 @@ const moduleWrapper = tsserver => {
typeof parsedMessage.arguments.hostInfo === `string`
) {
hostInfo = parsedMessage.arguments.hostInfo;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
hostInfo += ` <1.61`;
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.61`;
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
hostInfo += ` <1.66`;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "4.6.2-sdk",
"version": "4.6.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs"
}
4 changes: 2 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
anchor_version = "0.22.1"
solana_version = "1.9.9"
anchor_version = "0.24.2"
solana_version = "1.9.12"

[features]
seeds = true
Expand Down
Loading

0 comments on commit 4b453d4

Please sign in to comment.