Skip to content

Commit 764bc8b

Browse files
committed
Merge remote-tracking branch 'origin/main' into trace-rework
2 parents 322abd3 + 8159acd commit 764bc8b

File tree

242 files changed

+24158
-8809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+24158
-8809
lines changed

.cspell.jsonc

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,105 @@
77
"language": "en-US",
88
"dictionaryDefinitions": [
99
{
10+
// Allowed words
1011
"name": "main-list",
1112
"path": "resources/dictionaries/custom.txt",
1213
"addWords": true,
1314
},
15+
{
16+
// Banned words with no clear or correct replacements
17+
// For a few words with those, see the flagWords property later in this file
18+
"name": "deny-list",
19+
"path": "resources/dictionaries/ban.txt"
20+
},
21+
{
22+
"name": "2lw-deny-list",
23+
"path": "resources/dictionaries/two-letter-words-ban.txt"
24+
},
1425
{
1526
"name": "tvm-instructions",
1627
"path": "resources/dictionaries/tvm-instructions.txt"
1728
}
1829
],
1930
"dictionaries": [
2031
"main-list",
21-
"tvm-instructions"
32+
"deny-list",
33+
"2lw-deny-list",
34+
"tvm-instructions",
2235
],
2336
"useGitignore": true,
2437
"files": [
2538
"**/*.{md,mdx}",
26-
"**/*.{js,jsx}",
39+
"**/*.{js,jsx,mjs}",
40+
],
41+
"minWordLength": 3,
42+
"overrides": [
43+
// Enable case sensitivity for Markdown and MDX files only
44+
{
45+
"filename": "**/*.{md,mdx}",
46+
"caseSensitive": true,
47+
// Known incorrect spellings and correct suggestions
48+
"flagWords": [
49+
"AccountChain->accountchain",
50+
"BaseChain->basechain",
51+
"boc->BoC",
52+
"BOC->BoC",
53+
"Github->GitHub",
54+
"MasterChain->masterchain",
55+
"ShardChain->shardchain",
56+
"Toncenter->TON Center",
57+
"toncoins->Toncoin",
58+
"Toncoins->Toncoin",
59+
"WorkChain->workchain",
60+
"zkProof->ZK-proof",
61+
"zkProofs->ZK-proofs",
62+
],
63+
},
64+
// Do not check for banned words (denylists or flagWords) in certain files
65+
{
66+
"filename": "contribute/style-guide*.mdx",
67+
"ignoreWords": [
68+
"tos",
69+
"DOI",
70+
"boc",
71+
"BOC",
72+
],
73+
"ignoreRegExpList": [
74+
"\\b[tT]on[a-zA-Z]+\\b", // ton or Ton-prefixed words
75+
"\\b[a-zA-Z]+Chain\\b", // Chain-suffixed words
76+
],
77+
"dictionaries": [
78+
"!deny-list", // turns off the dictionary
79+
"!2lw-deny-list", // turns off the dictionary
80+
]
81+
},
82+
{
83+
"filename": "**/api/**/*.{json,yml,yaml}",
84+
"ignoreWords": [
85+
"smc",
86+
],
87+
"dictionaries": [
88+
"!deny-list", // turns off the dictionary
89+
"!2lw-deny-list", // turns off the dictionary
90+
]
91+
},
92+
{
93+
"filename": "**/*.{js,jsx,mjs}",
94+
"ignoreWords": [
95+
"Dests",
96+
],
97+
"dictionaries": [
98+
"!deny-list", // turns off the dictionary
99+
"!2lw-deny-list", // turns off the dictionary
100+
]
101+
}
27102
],
28103
"ignorePaths": [
29104
// Some whitepapers
30105
"foundations/whitepapers/tblkch.mdx",
31106
"foundations/whitepapers/ton.mdx",
107+
"foundations/whitepapers/tvm.mdx",
108+
"languages/fift/whitepaper.mdx",
32109
// Generated files
33110
"tvm/instructions.mdx",
34111
// Binaries
@@ -44,12 +121,14 @@
44121
"**/*.tolk",
45122
"**/*.py*",
46123
"**/*.{ts,tsx}",
124+
"**/*.css",
47125
// Miscellaneous
48126
"**/*.git*",
49127
"**/*.svg",
50128
"**/*.txt",
51129
"CODEOWNERS",
52-
"**/*http-api*",
130+
"LICENSE-*",
131+
"snippets/tvm-instruction-table.jsx",
53132
],
54133
"ignoreRegExpList": [
55134
//
@@ -78,12 +157,12 @@
78157
//
79158
"=\\s*\".*?\"", // ="..."
80159
"(?<!\\\\)\\$(?:\\\\.|[^$\\\\])*?\\$", // inline math
81-
"/(?<!\\\\)\\$\\$\\r?\\n.*?(?<=\\n)\\$\\$/gms", // block math
160+
"/(?<!\\\\)\\$\\$[\\s\\S]*?\\$\\$/g", // block math
161+
"(?<!\\\\)``.*?``", // inline code with double backticks
82162
"(?<!\\\\)`.*?`", // inline code
83163
"/^([ \\t]*```).*([\\s\\S]*?)^\\1$/gmx", // block code
84164
"^import[ \\t].+$", // import ...
85165
"/^export[ \\t].+?(?=\\r?\\n\\r?\\n)/gms", // export ...
86166
"(?<!\\\\)\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\}", // jsx expressions in {}
87-
"/\\bton-?[a-z]+/gi", // ton-prefixed product names
88167
],
89168
}

.github/workflows/linter.yml

Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 💅 Linting suite
22

33
env:
44
HUSKY: 0
5+
NODE_VERSION: 20
56

67
on:
78
pull_request:
@@ -30,7 +31,7 @@ jobs:
3031
- name: Setup Node.js
3132
uses: actions/setup-node@v4
3233
with:
33-
node-version: 20
34+
node-version: ${{ env.NODE_VERSION }}
3435
cache: "npm"
3536

3637
- name: Install dependencies
@@ -55,20 +56,20 @@ jobs:
5556
echo -e '\nNo such files affected!'
5657
exit 0
5758
fi
58-
echo -e '\nChecking formatting on the following MDX and Markdown files affected by this PR:\n'
59+
echo -e '\nChecking formatting of the following MDX and Markdown files affected by this PR:\n'
5960
for file in ${ALL_CHANGED_FILES}; do
6061
echo "- $file"
6162
done
6263
echo
6364
npx remark --no-stdout --quiet --frail --silently-ignore $(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')
6465
65-
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀' }} How to fix the formatting? See these suggestions!
66+
- name: ${{ steps.check-fmt.conclusion == 'failure' && '👀 How to fix the formatting? See these suggestions!' || '...' }}
6667
env:
6768
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
6869
if: failure()
6970
run: |
7071
# Preparations
71-
FILES="$(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ')"
72+
FILES="$(echo -e "${ALL_CHANGED_FILES[@]}" | tr '\n' ' ' | sed 's/.*/\"&\"/')"
7273
BODY="{\"body\":\"To fix the **formatting** issues:\n\n1. Install necessary dependencies: \`npm ci\`\n2. Then, run this command:\n\`\`\`shell\nnpx remark -o --silent --silently-ignore ${FILES}\n\`\`\`\"}"
7374
# Comment on the PR
7475
curl -s -o /dev/null -L -X POST \
@@ -87,13 +88,13 @@ jobs:
8788
steps:
8889
- name: Checkout repository
8990
uses: actions/checkout@v4
90-
with:
91-
fetch-depth: 0
91+
# The fetch-depth is not set to 0 to prevent the cspell-action
92+
# from misfiring on files that are in main but not on this PR branch
9293

9394
- name: Setup Node.js
9495
uses: actions/setup-node@v4
9596
with:
96-
node-version: 20
97+
node-version: ${{ env.NODE_VERSION }}
9798
cache: "npm"
9899

99100
- name: Install dependencies
@@ -107,3 +108,74 @@ jobs:
107108
with:
108109
check_dot_files: explicit
109110
suggestions: true
111+
config: ".cspell.jsonc"
112+
113+
redirects-check:
114+
name: "Redirects"
115+
runs-on: ubuntu-latest
116+
steps:
117+
- name: Checkout repository
118+
uses: actions/checkout@v4
119+
with:
120+
fetch-depth: 0
121+
122+
- name: Setup Node.js
123+
uses: actions/setup-node@v4
124+
with:
125+
node-version: ${{ env.NODE_VERSION }}
126+
cache: "npm"
127+
128+
- name: Install dependencies
129+
run: |
130+
corepack enable
131+
npm ci
132+
133+
- name: Check uniqueness of redirect sources in docs.json
134+
if: ${{ !cancelled() }}
135+
run: node scripts/check-redirects.mjs unique
136+
137+
- name: Check existence of redirect destinations in docs.json
138+
if: ${{ !cancelled() }}
139+
run: node scripts/check-redirects.mjs exist
140+
141+
- name: Check redirects against the previous TON Documentation
142+
if: ${{ !cancelled() }}
143+
run: node scripts/check-redirects.mjs previous
144+
145+
# NOTE: Re-enable before the release,
146+
# see: https://github.com/ton-org/docs/issues/39
147+
# - name: Check redirects against the upstream docs.json structure
148+
# if: ${{ !cancelled() }}
149+
# run: node scripts/check-redirects.mjs upstream
150+
151+
navigation-check:
152+
name: "Navigation"
153+
runs-on: ubuntu-latest
154+
steps:
155+
- name: Checkout repository
156+
uses: actions/checkout@v4
157+
with:
158+
fetch-depth: 0
159+
160+
- name: Setup Node.js
161+
uses: actions/setup-node@v4
162+
with:
163+
node-version: ${{ env.NODE_VERSION }}
164+
cache: "npm"
165+
166+
- name: Install dependencies
167+
run: |
168+
corepack enable
169+
npm ci
170+
171+
- name: Check uniqueness of navigation paths in docs.json
172+
if: ${{ !cancelled() }}
173+
run: node scripts/check-navigation.mjs unique
174+
175+
- name: Check existence of navigation .mdx pages in docs.json
176+
if: ${{ !cancelled() }}
177+
run: node scripts/check-navigation.mjs exist
178+
179+
- name: Check coverage of .mdx pages by docs.json
180+
if: ${{ !cancelled() }}
181+
run: node scripts/check-navigation.mjs cover

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
*.mdx
22
/ecosystem/api/toncenter/v2/
33
/ecosystem/api/toncenter/v3/
4+
/ecosystem/api/toncenter/smc-index/
5+
/LICENSE*

.remarkignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ node_modules/
88
/foundations/whitepapers/ton.mdx
99
/foundations/whitepapers/tvm.mdx
1010

11-
# Ignore root index.mdx file
11+
# Ignore some root files
1212
/index.mdx
13+
/LICENSE*
1314

1415
# Ignore generated files and directories
1516
/tvm/instructions.mdx
1617
/ecosystem/api/toncenter/v2/
1718
/ecosystem/api/toncenter/v3/
19+
/ecosystem/api/toncenter/smc-index/

LICENSE-code

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 TON Studio and others
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)