From 4da0c80585432aa8e5e80d72465bf12f21173339 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:01:42 +0100 Subject: [PATCH 1/2] chore(docs): remove the book/programmatic --- docs/astro.config.mjs | 1 - docs/src/content/docs/book/programmatic.mdx | 48 --------------------- 2 files changed, 49 deletions(-) delete mode 100644 docs/src/content/docs/book/programmatic.mdx diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index b286f45c7..61d5bd0c6 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -188,7 +188,6 @@ export default defineConfig({ { slug: 'book/config' }, { slug: 'book/masterchain' }, { slug: 'book/func' }, - { slug: 'book/programmatic' }, { slug: 'book/security-best-practices' }, ], }, diff --git a/docs/src/content/docs/book/programmatic.mdx b/docs/src/content/docs/book/programmatic.mdx deleted file mode 100644 index aebe8016b..000000000 --- a/docs/src/content/docs/book/programmatic.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Programmatic API -description: "Ways to use the Tact compiler as a library in Node.js and browser projects" ---- - -You can invoke the Tact compiler from your code in node and browser environments. - -:::caution - - This API has not been released yet. It will be released in the 1.0.0 version. - -::: - -## Run compiler in browser - -```ts -import { run } from "@tact-lang/compiler"; - -// Virtual FS -const fs = { - ["main.tact"]: Buffer.from("...").toString("base64"), -}; - -const config = { - projects: [ - { - name: "Sample", - path: "main.tact", - output: "./output", - }, - ], -}; - -// Run compiler -let successful = await run({ config, fs }); - -// NOTE: Output from is written to the same fs object. -``` - -## Contract verification - -You can always verify the compiled package with the `verify` function. - -```ts -import { verify } from "@tact-lang/compiler"; -const pkg: string = '...'; -const res = await verify(pkg); -``` From dca801b541d549b8c1ea14988d970e9612ad1676 Mon Sep 17 00:00:00 2001 From: Novus Nota <68142933+novusnota@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:02:14 +0100 Subject: [PATCH 2/2] chore: create a new section for documentation updates --- CHANGELOG.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3151732d6..89073efb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,45 +11,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `&&=`, `||=`, `>>=` and `<<=` augmented assignment operators: PR [#853](https://github.com/tact-lang/tact/pull/853) - New CSpell dictionaries: TVM instructions and adjusted list of Fift words: PR [#881](https://github.com/tact-lang/tact/pull/881) -- Docs: the `description` property to the frontmatter of the each page for better SEO: PR [#916](https://github.com/tact-lang/tact/pull/916) -- Docs: Google Analytics tags per every page: PR [#921](https://github.com/tact-lang/tact/pull/921) -- Docs: added Ston.fi cookbook: PR [#956](https://github.com/tact-lang/tact/pull/956) -- Docs: added NFTs cookbook: PR [#958](https://github.com/tact-lang/tact/pull/958) -- Docs: added security best practices: PR [#1070](https://github.com/tact-lang/tact/pull/1070) - Ability to specify a compile-time method ID expression for getters: PR [#922](https://github.com/tact-lang/tact/pull/922) and PR [#932](https://github.com/tact-lang/tact/pull/932) - Destructuring of structs and messages: PR [#856](https://github.com/tact-lang/tact/pull/856), PR [#964](https://github.com/tact-lang/tact/pull/964), PR [#969](https://github.com/tact-lang/tact/pull/969) -- Docs: automatic links to Web IDE from all code blocks: PR [#994](https://github.com/tact-lang/tact/pull/994) - The `SendDefaultMode` send mode constant to the standard library: PR [#1010](https://github.com/tact-lang/tact/pull/1010) -- Docs: initial semi-automated Chinese translation of the documentation: PR [#942](https://github.com/tact-lang/tact/pull/942) - The `replace` and `replaceGet` methods for the `Map` type: PR [#941](https://github.com/tact-lang/tact/pull/941) - Utility for logging errors in code that was supposed to be unreachable: PR [#991](https://github.com/tact-lang/tact/pull/991) -- Docs: `preloadRef` method for the `Slice` type: PR [#1044](https://github.com/tact-lang/tact/pull/1044) -- Docs: added DeDust cookbook: PR [#954](https://github.com/tact-lang/tact/pull/954) -- Docs: described the limit for deeply nested expressions: PR [#1101](https://github.com/tact-lang/tact/pull/1101) ### Changed - The `parseImports` function now returns AST import nodes instead of raw strings: PR [#966](https://github.com/tact-lang/tact/pull/966) - Optional types for `self` argument in `extends mutates` functions are now allowed: PR [#854](https://github.com/tact-lang/tact/pull/854) -- Docs: complete overhaul of the exit codes page: PR [#978](https://github.com/tact-lang/tact/pull/978) -- Docs: enhanced Jettons Cookbook page: PR [#944](https://github.com/tact-lang/tact/pull/944) - Error codes in the report are now formatted as a list: PR [#1051](https://github.com/tact-lang/tact/pull/1051) - Clarify error message for bounced types from which accessed a field that does not fit in 224 bytes: PR [#1111](https://github.com/tact-lang/tact/pull/1111) -- Docs: note that `compilables/` can sometimes be used over `wrappers/` in Blueprint projects: PR [#1112](https://github.com/tact-lang/tact/pull/1112) ### Fixed - Collisions in getter method ids are now handled and reported properly: PR [#875](https://github.com/tact-lang/tact/pull/875), PR [#1052](https://github.com/tact-lang/tact/pull/1052) -- Docs: layout of tables, syntax highlighting, Chinese translations of sidebar separators: PR [#916](https://github.com/tact-lang/tact/pull/916) - Non-null struct fields after null ones are treated correctly in Sandbox tests after updating `@ton/core` to 0.59.0: PR [#933](https://github.com/tact-lang/tact/pull/933) - Prevent inline code snippets from changing their background color: PR [#935](https://github.com/tact-lang/tact/pull/935) -- Docs: correctly handle next and previous page links at the bottom of the pages when there's a separator item in the sidebar: PR [#949](https://github.com/tact-lang/tact/pull/949) -- Docs: compilation of examples in `data-structures.mdx` and across Cookbook: PR [#917](https://github.com/tact-lang/tact/pull/917) - `as coins` map value serialization type is now handled correctly: PR [#987](https://github.com/tact-lang/tact/pull/987) - Type checking for `foreach` loops in trait methods: PR [#1017](https://github.com/tact-lang/tact/pull/1017) - The `sha256()` function no longer throws on statically known strings of any length: PR [#907](https://github.com/tact-lang/tact/pull/907) - TypeScript wrappers generation for messages with single quote: PR [#1106](https://github.com/tact-lang/tact/pull/1106) +### Docs + +- Added the `description` property to the frontmatter of the each page for better SEO: PR [#916](https://github.com/tact-lang/tact/pull/916) +- Added Google Analytics tags per every page: PR [#921](https://github.com/tact-lang/tact/pull/921) +- Added Ston.fi cookbook: PR [#956](https://github.com/tact-lang/tact/pull/956) +- Added NFTs cookbook: PR [#958](https://github.com/tact-lang/tact/pull/958) +- Added security best practices: PR [#1070](https://github.com/tact-lang/tact/pull/1070) +- Added automatic links to Web IDE from all code blocks: PR [#994](https://github.com/tact-lang/tact/pull/994) +- Added initial semi-automated Chinese translation of the documentation: PR [#942](https://github.com/tact-lang/tact/pull/942) +- `preloadRef` method for the `Slice` type: PR [#1044](https://github.com/tact-lang/tact/pull/1044) +- Added DeDust cookbook: PR [#954](https://github.com/tact-lang/tact/pull/954) +- Described the limit for deeply nested expressions: PR [#1101](https://github.com/tact-lang/tact/pull/1101) +- Completely overhauled the exit codes page: PR [#978](https://github.com/tact-lang/tact/pull/978) +- Enhanced Jettons Cookbook page: PR [#944](https://github.com/tact-lang/tact/pull/944) +- Added a note that `compilables/` can sometimes be used over `wrappers/` in Blueprint projects: PR [#1112](https://github.com/tact-lang/tact/pull/1112) +- Changed the layout of tables, updated syntax highlighting, and added Chinese translations of sidebar separators: PR [#916](https://github.com/tact-lang/tact/pull/916) +- Fixed handling of next and previous page links at the bottom of the pages when there's a separator item in the sidebar: PR [#949](https://github.com/tact-lang/tact/pull/949) +- Enabled compilation of examples in `data-structures.mdx` and across Cookbook: PR [#917](https://github.com/tact-lang/tact/pull/917) +- Removed the Programmatic API page due to frequent changes. To use the API, please refer to the compiler sources: PR [#1184](https://github.com/tact-lang/tact/pull/1184) + ### Release contributors ## [1.5.3] - 2024-11-28