@aptos-labs/script-composer-pack 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -0
- package/dist/cjs/main.js +46 -46
- package/dist/esm/main.mjs +46 -46
- package/dist/main.d.mts +19 -19
- package/dist/main.d.ts +19 -19
- package/package.json +5 -3
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @aptos-labs/script-composer-pack
|
|
2
|
+
|
|
3
|
+
Generate Move script payload helpers from `@aptos-labs/aptos-dynamic-transaction-composer`.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 18+
|
|
8
|
+
- pnpm
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Build
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Version Bump CLI
|
|
23
|
+
|
|
24
|
+
This repo includes a generic version bump CLI at `scripts/bump-version.mjs`.
|
|
25
|
+
|
|
26
|
+
### Command
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm run version:bump -- <major|minor|patch|prerelease|X.Y.Z> [options]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`X.Y.Z` uses strict SemVer parsing and supports prerelease/build metadata,
|
|
33
|
+
for example `1.4.0-rc.1` and `1.4.0+build.7`.
|
|
34
|
+
|
|
35
|
+
### Options
|
|
36
|
+
|
|
37
|
+
- `--file <path>`: target `package.json` (default: `./package.json`)
|
|
38
|
+
- `--pre <id>`: prerelease id for `prerelease` action (default: `rc`)
|
|
39
|
+
- `--dry-run`: preview only, no file changes
|
|
40
|
+
|
|
41
|
+
### Examples
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# bump patch version
|
|
45
|
+
pnpm run version:bump -- patch
|
|
46
|
+
|
|
47
|
+
# preview minor bump
|
|
48
|
+
pnpm run version:bump -- minor --dry-run
|
|
49
|
+
|
|
50
|
+
# set exact version
|
|
51
|
+
pnpm run version:bump -- 1.4.0
|
|
52
|
+
|
|
53
|
+
# create/increment prerelease
|
|
54
|
+
pnpm run version:bump -- prerelease --pre beta
|
|
55
|
+
|
|
56
|
+
# bump another package.json
|
|
57
|
+
pnpm run version:bump -- patch --file ./packages/foo/package.json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Recommended Upgrade Flow
|
|
61
|
+
|
|
62
|
+
1. Pull latest `main`.
|
|
63
|
+
2. Create a new branch for the release.
|
|
64
|
+
3. Preview target version:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pnpm run version:bump -- patch --dry-run
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
4. Apply version bump:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pnpm run version:bump -- patch
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
5. Verify build:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
pnpm build
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
6. Commit and push:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git add package.json
|
|
86
|
+
git commit -m "chore: bump version to <new-version>"
|
|
87
|
+
git push -u origin <your-branch>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
7. Open PR.
|