Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'pnpm'

- name: Install Dependencies
Expand Down Expand Up @@ -63,7 +63,7 @@ runs:

- name: Install Solana
if: ${{ inputs.solana == 'true' }}
uses: metaplex-foundation/actions/install-solana@v1
uses: solana-program/actions/install-solana@v1
with:
version: ${{ env.SOLANA_VERSION }}
cache: true
Expand Down
17 changes: 10 additions & 7 deletions clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,22 @@
"access": "public",
"registry": "https://registry.npmjs.org"
},
"repository": {
"type": "git",
"url": "git+https://github.com/solana-program/config.git"
},
"bugs": {
"url": "https://github.com/solana-program/config/issues"
},
"homepage": "https://github.com/solana-program/config#readme",
"license": "MIT",
"peerDependencies": {
"@solana/web3.js": "2.0.0-preview.4"
"@solana/web3.js": "2.0.0-rc.1"
},
"devDependencies": {
"@ava/typescript": "^4.1.0",
"@solana/eslint-config-solana": "^3.0.3",
"@solana/web3.js": "2.0.0-preview.4",
"@solana/webcrypto-ed25519-polyfill": "2.0.0-preview.4",
"@solana/web3.js": "2.0.0-rc.1",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
Expand All @@ -50,16 +57,12 @@
"rimraf": "^5.0.5",
"tsup": "^8.1.2",
"typedoc": "^0.25.12",
"typedoc-plugin-missing-exports": "^2.2.0",
"typescript": "^5.5.3"
},
"ava": {
"nodeArguments": [
"--no-warnings"
],
"require": [
"@solana/webcrypto-ed25519-polyfill"
],
"typescript": {
"compile": false,
"rewritePaths": {
Expand Down
537 changes: 259 additions & 278 deletions clients/js/pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
"template:upgrade": "zx ./scripts/upgrade-template.mjs"
},
"devDependencies": {
"@iarna/toml": "^2.2.5",
"@codama/renderers-js": "^1.0.0",
"@codama/renderers-rust": "^1.0.1",
"@iarna/toml": "^2.2.5",
"codama": "^1.0.0",
"typescript": "^5.5.2",
"zx": "^7.2.3"
},
"engines": {
"node": ">=v20.0.0"
},
"packageManager": "[email protected]"
}
5 changes: 3 additions & 2 deletions scripts/client/test-rust.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { cliArguments, workingDirectory } from '../utils.mjs';
const testArgs = cliArguments();

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

// Run the tests.
cd(path.join(workingDirectory, 'clients', 'rust'));
if (hasSolfmt) {
await $`cargo test-sbf ${testArgs} 2>&1 | solfmt`;
await $`SBF_OUT_DIR=${sbfOutDir} cargo test --features "test-sbf" ${testArgs} 2>&1 | solfmt`;
} else {
await $`cargo test-sbf ${testArgs}`;
await $`SBF_OUT_DIR=${sbfOutDir} cargo test --features "test-sbf" ${testArgs}`;
}
10 changes: 4 additions & 6 deletions scripts/program/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ const buildArgs = [
];

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

await $`cargo-build-sbf --manifest-path ${manifestPath} ${buildArgs}`;
})
);
await $`cargo-build-sbf --manifest-path ${manifestPath} ${buildArgs}`;
}
18 changes: 8 additions & 10 deletions scripts/program/format.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ const [cargoArgs, fmtArgs] = partitionArguments(formatArgs, '--');
const toolchain = getToolchainArgument('format');

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

if (fix) {
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- ${fmtArgs}`;
} else {
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- --check ${fmtArgs}`;
}
})
);
if (fix) {
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- ${fmtArgs}`;
} else {
await $`cargo ${toolchain} fmt --manifest-path ${manifestPath} ${cargoArgs} -- --check ${fmtArgs}`;
}
}
18 changes: 8 additions & 10 deletions scripts/program/lint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ const fix = popArgument(lintArgs, '--fix');
const toolchain = getToolchainArgument('lint');

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

if (fix) {
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} --fix ${lintArgs}`;
} else {
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} ${lintArgs}`;
}
})
);
if (fix) {
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} --fix ${lintArgs}`;
} else {
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} ${lintArgs}`;
}
}
18 changes: 8 additions & 10 deletions scripts/program/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ const testArgs = [
const hasSolfmt = await which('solfmt', { nothrow: true });

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

if (hasSolfmt) {
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs} 2>&1 | solfmt`;
} else {
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs}`;
}
})
);
if (hasSolfmt) {
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs} 2>&1 | solfmt`;
} else {
await $`RUST_LOG=error cargo test-sbf --manifest-path ${manifestPath} ${testArgs}`;
}
}