Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add Breaking Change Book #326

Merged
merged 6 commits into from
Jun 24, 2024
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
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@
[submodule "docs/chain-configuration"]
path = docs/chain-configuration
url = https://github.com/FuelLabs/chain-configuration
[submodule "docs/breaking-change-log"]
path = docs/breaking-change-log
url = https://github.com/FuelLabs/breaking-change-log.git
[submodule "docs/nightly/breaking-change-log"]
path = docs/nightly/breaking-change-log
url = https://github.com/FuelLabs/breaking-change-log.git
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"**/fuels-ts": true,
"**/fuels-wallet": true,
"**/fuelup": true,
"**/guides/examples": true
"**/guides/examples": true,
"**/breaking-change-log": true
},
"git.ignoreLimitWarning": true,
"[typescriptreact]": {
Expand Down
4 changes: 4 additions & 0 deletions contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const includeDirs = [
'docs/contributing',
'docs/sway-libs/docs/book/src',
'docs/sway-standards/docs/src',
'docs/breaking-change-log/docs/src',
// NIGHTLY DOCS
'docs/nightly/sway/docs/book/src',
'docs/nightly/fuels-rs/docs/src',
Expand All @@ -72,6 +73,7 @@ const includeDirs = [
'docs/nightly/fuels-wallet/packages/docs/docs',
'docs/nightly/sway-libs/docs/book/src',
'docs/nightly/sway-standards/docs/src',
'docs/nightly/breaking-change-log/docs/src',
];

const excludeDirs = [
Expand All @@ -90,12 +92,14 @@ const excludeDirs = [
'docs/sway-libs/docs/book/src/SUMMARY.md',
'docs/sway-standards/docs/src/SUMMARY.md',
'docs/guides/docs/migration-guide/breaking-change-log/node_modules',
'docs/breaking-change-log/docs/src/SUMMARY.md',
// NIGHTLY DOCS
'docs/nightly/sway/docs/book/src/SUMMARY.md',
'docs/nightly/fuels-rs/docs/src/SUMMARY.md',
'docs/nightly/fuel-specs/src/SUMMARY.md',
'docs/nightly/sway-libs/docs/book/src/SUMMARY.md',
'docs/nightly/sway-standards/docs/src/SUMMARY.md',
'docs/nightly/breaking-change-log/docs/src/SUMMARY.md',
];

export default makeSource({
Expand Down
1 change: 1 addition & 0 deletions docs/breaking-change-log
Submodule breaking-change-log added at 915326
6 changes: 0 additions & 6 deletions docs/guides/docs/guides.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,5 @@
"description": "Install the Fuel toolchain and binaries.",
"featured": false,
"tags": ["Getting Started"]
},
"migration_guide": {
"title": "Migration Guide",
"description": "Sway and SDK's breaking changes reference.",
"featured": false,
"tags": []
}
}
1 change: 0 additions & 1 deletion docs/guides/docs/migration-guide/breaking-change-log
Submodule breaking-change-log deleted from 72f4d5
16 changes: 0 additions & 16 deletions docs/guides/docs/migration-guide/index.mdx

This file was deleted.

40 changes: 36 additions & 4 deletions docs/guides/docs/nav.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
{
"menu": ["Contract Quickstart", "Frontend Quickstart", "Counter Dapp", "Running a Node", "Installation", "Migration Guide", "Intro to Sway"],
"menu": [
"Contract Quickstart",
"Frontend Quickstart",
"Counter Dapp",
"Running a Node",
"Installation",
"Intro to Sway"
],
"installation": ["Fuel Github Codespace"],
"counter-dapp": ["Building a Smart Contract", "Building a Frontend"],
"contract-quickstart": [],
"frontend-quickstart": [],
"running_a_node": ["Running a Local Node", "Running a Testnet Node"],
"migration_guide": ["Breaking Changes Log"],
"intro_to_sway": ["Introduction to Sway", "Prerequisites", "Imports", "Structs", "ABI", "Storage", "Errors", "Functions", "Checkpoint", "Rust Testing", "Typescript Frontend", "Explore Fuel"],
"intro_to_predicates": ["Introduction to Sway", "Prerequisites", "Predicate Root", "Predicate Limitations", "Imports", "Configurables", "Signature Verification", "Main", "Checkpoint", "Debugging with Scripts", "Logging in Rust tests", "Rust Testing"]
"intro_to_sway": [
"Introduction to Sway",
"Prerequisites",
"Imports",
"Structs",
"ABI",
"Storage",
"Errors",
"Functions",
"Checkpoint",
"Rust Testing",
"Typescript Frontend",
"Explore Fuel"
],
"intro_to_predicates": [
"Introduction to Sway",
"Prerequisites",
"Predicate Root",
"Predicate Limitations",
"Imports",
"Configurables",
"Signature Verification",
"Main",
"Checkpoint",
"Debugging with Scripts",
"Logging in Rust tests",
"Rust Testing"
]
}
1 change: 1 addition & 0 deletions docs/nightly/breaking-change-log
Submodule breaking-change-log added at 915326
5 changes: 5 additions & 0 deletions scripts/clean-build-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const targetDirs = [
'./docs/nightly/sway-libs',
'./docs/sway-standards',
'./docs/nightly/sway-standards',
'./docs/breaking-change-log',
'./docs/nightly/breaking-change-log',
];

// Exclusions for each type of directory
Expand Down Expand Up @@ -60,6 +62,9 @@ const exclusions = {
'fuel-graphql-docs/examples',
'fuel-graphql-docs/src',
],
breaking_change_log: [
'breaking-change-log/docs',
],
};

function main() {
Expand Down
18 changes: 18 additions & 0 deletions scripts/generate-links/getDocs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,24 @@ export async function getDocs(key, order) {
'!**/SUMMARY.md',
];
break;
case 'breaking-change-log':
paths = [
// BREAKING CHANGE LOG DOCS
'./breaking-change-log/docs/src/*.md',
'./breaking-change-log/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'nightly-breaking-change-log':
paths = [
// BREAKING CHANGE LOG DOCS
'./nightly/breaking-change-log/docs/src/*.md',
'./nightly/breaking-change-log/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'forc':
paths = [
// FORC DOCS
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate-links/getOrders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import processSummary from './processSummary.mjs';
import { processVPConfig } from './processVPConfig.mjs';

const CONFIG = {
'breaking-change-log': {
type: 'mdbook',
path: './breaking-change-log/docs/src/SUMMARY.md',
},
sway: {
type: 'mdbook',
path: './sway/docs/book/src/SUMMARY.md',
Expand Down
4 changes: 4 additions & 0 deletions scripts/generate-links/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ function getSidebarName(key) {
case 'sway-standards':
newKey = 'Sway Standards';
break;
case 'breaking-change-log':
newKey = 'Breaking Change Notices';
break;
default:
}

Expand All @@ -108,6 +111,7 @@ function getSidebarName(key) {

function handleAllOrders(allOrders, folderPath, filename) {
const correctOrder = [
'breaking-change-log',
'intro',
'sway',
'sway-libs',
Expand Down
3 changes: 3 additions & 0 deletions src/components/SidebarSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export function SidebarSection({
case 'Sway-standards':
githubLink = 'https://github.com/FuelLabs/sway-standards';
break;
case 'Breaking-change-log':
githubLink = 'https://github.com/FuelLabs/breaking-change-log';
break;
default:
break;
}
Expand Down
9 changes: 9 additions & 0 deletions src/config/docs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"breaking-change-log": {
"title": "Breaking Change Notices",
"slug": "breaking-change-log",
"repository": "https://github.com/FuelLabs/breaking-change-log",
"ogTags": {
"description": "Fuel Network Breaking Change Log",
"image": ""
}
},
"intro": {
"title": "Intro",
"slug": "intro",
Expand Down
6 changes: 5 additions & 1 deletion src/lib/md-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class Doc {
.replace('docs/fuel-graphql-docs/', '')
.replace('docs/sway/', '')
.replace('docs/sway-standards/', '')
.replace('docs/breaking-change-log/', '')
.replace('docs/fuel-specs/', '')}`;

let pageLink = `${config.repository}${actualPath.replace(
Expand All @@ -89,7 +90,10 @@ export class Doc {
}
const version = getDocVersion(pageLink, versionSet);
// TODO: remove the exception for sway-standards once version is bumped past 0.5.0
if (version !== 'master' && !pageLink.includes("/FuelLabs/sway-standards")) {
if (
version !== 'master' &&
!pageLink.includes('/FuelLabs/sway-standards')
) {
pageLink = pageLink
.replace('/tree/master/', `/tree/${version}/`)
.replace('/blob/master/', `/blob/${version}/`);
Expand Down
Loading