Skip to content

Commit

Permalink
fix: update versions to latest compatible (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahschwartz authored Aug 9, 2023
1 parent 67ee545 commit 943395d
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 53 deletions.
2 changes: 1 addition & 1 deletion docs/builds/sway
Submodule sway updated 3693 files
2 changes: 1 addition & 1 deletion docs/fuel-indexer
Submodule fuel-indexer updated 164 files
2 changes: 1 addition & 1 deletion docs/fuels-rs
Submodule fuels-rs updated 48 files
+23 −19 docs/src/SUMMARY.md
+1 −1 docs/src/calling-contracts/call-params.md
+2 −2 docs/src/calling-contracts/tx-dependency-estimation.md
+0 −0 docs/src/contracts/configurable-constants.md
+0 −0 docs/src/contracts/interacting-with-contracts.md
+0 −0 docs/src/contracts/the-fuelvm-binary-file.md
+0 −0 docs/src/cookbook/cookbook.md
+1 −0 docs/src/debugging/abigen.md
+1 −0 docs/src/debugging/contract-calls.md
+0 −0 docs/src/debugging/debugging.md
+1 −0 docs/src/debugging/network.md
+0 −0 docs/src/getting-started/abigen.md
+8 −8 docs/src/getting-started/account.md
+0 −0 docs/src/getting-started/api.md
+0 −0 docs/src/getting-started/calling-contracts.md
+0 −0 docs/src/getting-started/connecting.md
+0 −0 docs/src/getting-started/contracts.md
+4 −0 docs/src/getting-started/index.md
+0 −0 docs/src/getting-started/managing-wallets.md
+1 −1 docs/src/getting-started/predicates.md
+7 −7 docs/src/getting-started/running-scripts.md
+1 −1 docs/src/getting-started/setup.md
+3 −1 docs/src/getting-started/terminology.md
+1 −1 docs/src/predicates/send-spend-predicate.md
+0 −0 docs/src/providers/external-node.md
+6 −5 docs/src/providers/querying.md
+0 −0 docs/src/providers/short-lived.md
+2 −4 examples/contracts/src/lib.rs
+28 −16 packages/fuels-accounts/src/lib.rs
+4 −0 packages/fuels-accounts/src/predicate.rs
+2 −2 packages/fuels-accounts/src/provider.rs
+9 −0 packages/fuels-accounts/src/wallet.rs
+0 −9 packages/fuels-core/src/types/core/native.rs
+1 −1 packages/fuels-core/src/types/wrappers/coin.rs
+1 −10 packages/fuels-core/src/types/wrappers/input.rs
+8 −105 packages/fuels-programs/src/call_utils.rs
+148 −58 packages/fuels-programs/src/contract.rs
+3 −62 packages/fuels-programs/src/script_calls.rs
+2 −2 packages/fuels-test-helpers/src/lib.rs
+0 −2 packages/fuels/Forc.toml
+0 −1 packages/fuels/src/lib.rs
+0 −7 packages/fuels/tests/contracts/block_timestamp/Forc.toml
+0 −13 packages/fuels/tests/contracts/block_timestamp/src/main.sw
+10 −89 packages/fuels/tests/providers.rs
+2 −39 packages/fuels/tests/scripts.rs
+0 −7 packages/fuels/tests/scripts/transfer_script/Forc.toml
+0 −7 packages/fuels/tests/scripts/transfer_script/src/main.sw
+1 −1 rustfmt.toml
2 changes: 1 addition & 1 deletion docs/fuels-ts
Submodule fuels-ts updated 258 files
2 changes: 1 addition & 1 deletion docs/sway
Submodule sway updated 576 files
2 changes: 1 addition & 1 deletion scripts/clean-build-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ rm -rf ./docs/builds/sway/v*
rm -rf ./docs/builds/sway/latest

# generate sidebar links
pnpm generate:links
pnpm generate:links
4 changes: 4 additions & 0 deletions scripts/sync-repos.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash

git submodule update --init

# TODO: Remove after fuels-rs version updated past 43
cd docs/fuels-rs
git cherry-pick 989026923b7cca989bf93a7aae481b04e7be915a
4 changes: 0 additions & 4 deletions src/components/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,5 @@ const styles = {
pl: '$1',
lineHeight: '1.7',
},

'& li > p': {
display: 'inline',
},
}),
};
6 changes: 5 additions & 1 deletion src/lib/md-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ export class Doc {
}

const config = this.#getConfig(item.slug);
const pageLink = join(config.repository, item._raw.flattenedPath);
const splitPath = item._raw.flattenedPath.split('/');
splitPath.splice(0, 2);
splitPath.pop();
const actualPath = 'tree/master/' + splitPath.join('/');
const pageLink = join(config.repository, actualPath);

this.md = item;
this.config = config;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/md-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export class DocParser {
}

slug = slug.replace('README', 'index');
// TODO: Remove after fixed
if (slug === 'docs/fuels-rs/contributing/contributing') {
slug = 'docs/fuels-rs/contributing';
}
return slug;
}
}
8 changes: 7 additions & 1 deletion src/lib/plugins/mdbook-example-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function handleExampleImports(
}

const bookPath = dirname.split('/')[1];
const fileAbsPath = path.resolve(
let fileAbsPath = path.resolve(
path.join(rootDir, `docs/${bookPath}/`),
filePath
);
Expand All @@ -118,6 +118,12 @@ export function handleExampleImports(
}

try {
if (fileAbsPath.includes('docs/fuels-ts/demo-typegen/')) {
fileAbsPath = fileAbsPath.replace(
'fuels-ts/demo-typegen',
'fuels-ts/apps/demo-typegen'
);
}
const fileContent = fs.readFileSync(fileAbsPath, 'utf8');
const cachedFile = getFilesOnCache(fileAbsPath);

Expand Down
3 changes: 1 addition & 2 deletions src/lib/plugins/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { join } from 'path';
import type { Root } from 'remark-gfm';
import { visit } from 'unist-util-visit';
import type { Parent } from 'unist-util-visit/lib';
import { versions } from '~/docs/fuels-ts/packages/versions/src';

import { handleForcGenDocs } from './forc-gen-docs';
import { handleLinks } from './links';
import { handleExampleImports } from './mdbook-example-import';
import { handleScriptLink } from './ts-docs';
import { loadTSVersions } from './ts-versions';
import {
handleDemoComp,
handlePlayerComp,
Expand Down Expand Up @@ -150,7 +150,6 @@ export function handlePlugins() {
}

if (filepath.includes('/fuels-ts/')) {
const versions = loadTSVersions(rootDir);
// handle injected link urls
if (hasScriptLink(tree.children[0])) {
tree = handleScriptLink(tree, versions);
Expand Down
39 changes: 0 additions & 39 deletions src/lib/plugins/ts-versions.ts

This file was deleted.

0 comments on commit 943395d

Please sign in to comment.