Skip to content

Commit 7ec99c9

Browse files
authored
Update from template (#36)
1 parent 7562c92 commit 7ec99c9

File tree

9 files changed

+45
-55
lines changed

9 files changed

+45
-55
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ runs:
6363

6464
- name: Install Solana
6565
if: ${{ inputs.solana == 'true' }}
66-
uses: metaplex-foundation/actions/install-solana@v1
66+
uses: solana-program/actions/install-solana@v1
6767
with:
6868
version: ${{ env.SOLANA_VERSION }}
6969
cache: true

clients/js/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@
3232
"access": "public",
3333
"registry": "https://registry.npmjs.org"
3434
},
35-
"repository": "https://github.com/solana-program/address-lookup-table.git",
3635
"license": "Apache-2.0",
36+
"repository": {
37+
"type": "git",
38+
"url": "git+https://github.com/solana-program/address-lookup-table.git"
39+
},
40+
"bugs": {
41+
"url": "https://github.com/solana-program/address-lookup-table/issues"
42+
},
43+
"homepage": "https://github.com/solana-program/address-lookup-table#readme",
3744
"peerDependencies": {
3845
"@solana/web3.js": "2.0.0-rc.1"
3946
},
@@ -50,7 +57,6 @@
5057
"rimraf": "^5.0.5",
5158
"tsup": "^8.1.2",
5259
"typedoc": "^0.25.12",
53-
"typedoc-plugin-missing-exports": "^2.2.0",
5460
"typescript": "^5.5.3"
5561
},
5662
"ava": {

clients/js/pnpm-lock.yaml

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
"template:upgrade": "zx ./scripts/upgrade-template.mjs"
2525
},
2626
"devDependencies": {
27-
"@iarna/toml": "^2.2.5",
2827
"@codama/renderers-js": "^1.0.0",
2928
"@codama/renderers-rust": "^1.0.0",
29+
"@iarna/toml": "^2.2.5",
3030
"codama": "^1.0.0",
3131
"typescript": "^5.5.2",
3232
"zx": "^7.2.3"
3333
},
34+
"engines": {
35+
"node": ">=v20.0.0"
36+
},
3437
"packageManager": "[email protected]"
3538
}

scripts/client/test-rust.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import { cliArguments, workingDirectory } from '../utils.mjs';
77
const testArgs = cliArguments();
88

99
const hasSolfmt = await which('solfmt', { nothrow: true });
10+
const sbfOutDir = path.join(workingDirectory, 'target', 'deploy');
1011

1112
// Run the tests.
1213
cd(path.join(workingDirectory, 'clients', 'rust'));
1314
if (hasSolfmt) {
14-
await $`cargo test-sbf ${testArgs} 2>&1 | solfmt`;
15+
await $`SBF_OUT_DIR=${sbfOutDir} cargo test --features "test-sbf" ${testArgs} 2>&1 | solfmt`;
1516
} else {
16-
await $`cargo test-sbf ${testArgs}`;
17+
await $`SBF_OUT_DIR=${sbfOutDir} cargo test --features "test-sbf" ${testArgs}`;
1718
}

scripts/program/build.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ import './dump.mjs';
1313
const buildArgs = ['--features', 'bpf-entrypoint', ...cliArguments()];
1414

1515
// Build the programs.
16-
await Promise.all(
17-
getProgramFolders().map(async (folder) => {
18-
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
16+
for (const folder of getProgramFolders()) {
17+
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
1918

20-
await $`cargo-build-sbf --manifest-path ${manifestPath} ${buildArgs}`;
21-
})
22-
);
19+
await $`cargo-build-sbf --manifest-path ${manifestPath} ${buildArgs}`;
20+
}

scripts/program/format.mjs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ const [cargoArgs, fmtArgs] = partitionArguments(formatArgs, '--');
1818
const toolchain = getToolchainArgument('format');
1919

2020
// Format the programs.
21-
await Promise.all(
22-
getProgramFolders().map(async (folder) => {
23-
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
21+
for (const folder of getProgramFolders()) {
22+
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
2423

25-
if (fix) {
26-
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- ${fmtArgs}`;
27-
} else {
28-
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- --check ${fmtArgs}`;
29-
}
30-
})
31-
);
24+
if (fix) {
25+
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- ${fmtArgs}`;
26+
} else {
27+
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- --check ${fmtArgs}`;
28+
}
29+
}

scripts/program/lint.mjs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ const lintArgs = [
2020
];
2121

2222
const fix = popArgument(lintArgs, '--fix');
23-
const toolchain = getToolchainArgument('format');
23+
const toolchain = getToolchainArgument('lint');
2424

2525
// Lint the programs using clippy.
26-
await Promise.all(
27-
getProgramFolders().map(async (folder) => {
28-
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
26+
for (const folder of getProgramFolders()) {
27+
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
2928

30-
if (fix) {
31-
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} --fix ${lintArgs}`;
32-
} else {
33-
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} ${lintArgs}`;
34-
}
35-
})
36-
);
29+
if (fix) {
30+
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} --fix ${lintArgs}`;
31+
} else {
32+
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} ${lintArgs}`;
33+
}
34+
}

scripts/program/test.mjs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ const testArgs = ['--features', 'bpf-entrypoint', ...cliArguments()];
1515
const hasSolfmt = await which('solfmt', { nothrow: true });
1616

1717
// Test the programs.
18-
await Promise.all(
19-
getProgramFolders().map(async (folder) => {
20-
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
18+
for (const folder of getProgramFolders()) {
19+
const manifestPath = path.join(workingDirectory, folder, 'Cargo.toml');
2120

22-
if (hasSolfmt) {
23-
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs} 2>&1 | solfmt`;
24-
} else {
25-
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs}`;
26-
}
27-
})
28-
);
21+
if (hasSolfmt) {
22+
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs} 2>&1 | solfmt`;
23+
} else {
24+
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs}`;
25+
}
26+
}

0 commit comments

Comments
 (0)