@aptos-labs/script-composer-pack 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +90 -0
  2. 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.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Aptos Labs <opensource@aptoslabs.com>"
5
5
  ],
6
6
  "description": "Generating Move Script from composer",
7
- "version": "0.2.1",
7
+ "version": "0.2.2",
8
8
  "license": "Apache-2.0",
9
9
  "repository": {
10
10
  "type": "git",
@@ -29,6 +29,7 @@
29
29
  "buffer": "6.0.3",
30
30
  "esbuild": "0.25.4",
31
31
  "fflate": "0.8.2",
32
+ "semver": "^7.7.4",
32
33
  "tsc": "2.0.4",
33
34
  "tsup": "8.4.0",
34
35
  "typescript": "5.8.3"
@@ -47,11 +48,12 @@
47
48
  }
48
49
  },
49
50
  "peerDependencies": {
50
- "@aptos-labs/ts-sdk": "^3.0.0 || ^4.0.0 || ^5.0.0",
51
- "@aptos-labs/aptos-dynamic-transaction-composer": "0.1.5"
51
+ "@aptos-labs/aptos-dynamic-transaction-composer": "0.1.5",
52
+ "@aptos-labs/ts-sdk": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
52
53
  },
53
54
  "scripts": {
54
55
  "build": "npx tsup",
56
+ "version:bump": "node ./scripts/bump-version.mjs",
55
57
  "prepublish": "pnpm build"
56
58
  }
57
59
  }