Skip to content

Commit c3b9c8a

Browse files
authored
chore(mops-cli): sync caffeinelabs/mops cli-v2.20.0 (#347)
1 parent f9b70ea commit c3b9c8a

3 files changed

Lines changed: 32 additions & 8 deletions

File tree

.claude/upstream.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Upstream file paths and the tracking model (release-tag vs commit) are listed pe
7777
## mops-cli
7878

7979
- **Upstream:** https://github.com/caffeinelabs/mops
80-
- **Tag:** cli-v2.19.0
81-
- **Commit:** be449cbeaf8bd9ce6c929b3ceb41591afe8bedca
82-
- **Last synced:** 2026-07-28
80+
- **Tag:** cli-v2.20.0
81+
- **Commit:** a079cb8c4d752403cc1d68c7bcc04a3be71dadf9
82+
- **Last synced:** 2026-08-11
8383
- **Upstream file:** `.agents/skills/mops-cli/SKILL.md`
8484
- **icskills-owned sections:** none — body is 1:1 with upstream; only frontmatter differs

evaluations/mops-cli.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,20 @@
7979
"expected_behaviors": [
8080
"Explains the warning is because `pocket-ic` is not pinned in `[toolchain]`, so mops falls back to the deprecated dfx replica",
8181
"Pins `pocket-ic` in the `[toolchain]` section of mops.toml (e.g. `pocket-ic = \"12.0.0\"`) OR uses `mops toolchain use pocket-ic 12.0.0`",
82-
"Pins a specific pocket-ic version rather than `latest` (latest may resolve to a version the bundled pic-js client doesn't support)",
82+
"Pins a specific pocket-ic version rather than `latest` (latest may resolve to a version the vendored `@dfinity/pic` client doesn't support)",
8383
"Notes the same pin also applies to `mops bench` and `mops watch`"
8484
]
8585
},
86+
{
87+
"name": "Adversarial: mops publish --dry-run scope",
88+
"prompt": "Before publishing my package to the mops registry, I ran `mops publish --dry-run` and it passed. Does that mean the real `mops publish` is guaranteed to succeed? Just answer the question.",
89+
"expected_behaviors": [
90+
"Explains that `--dry-run` runs the same local publish pipeline (packaging checks, docs, changelog, tests, benchmarks) but stops before identity/upload (no registry contact)",
91+
"Clarifies it does NOT validate canister config (SPDX/semver/name rules)",
92+
"Clarifies it does NOT prove registry acceptance (already published, permissions, missing deps)",
93+
"Does NOT claim a passing `--dry-run` guarantees the real publish will succeed"
94+
]
95+
},
8696
{
8797
"name": "check-stable baseline bootstrap",
8898
"prompt": "I'm starting a brand-new mops project and want to enable `check-stable`. There's no deployed version yet, so what do I use as the `.most` baseline for `[check-stable].path`? Just the setup, no deploy steps.",
@@ -180,7 +190,8 @@
180190
"How do I regenerate the candid .did file for my Motoko canister with mops?",
181191
"How do I keep my check-stable .most baseline in sync after deploying?",
182192
"How do I enable wasm-opt optimization for my mops build?",
183-
"How do I run benchmarks with mops?"
193+
"How do I run benchmarks with mops?",
194+
"How do I publish my package to the mops registry?"
184195
],
185196
"should_not_trigger": [
186197
"Write a Motoko persistent actor with a counter",

skills/mops-cli/SKILL.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: mops-cli
33
description: "Manage Motoko projects with the mops CLI — toolchain pinning, dependency management, type-checking, building, and linting. Use when working with mops.toml, mops.lock, running mops commands, adding/removing packages, pinning moc or lintoko versions, checking or building canisters, configuring moc flags, or setting up a new Motoko project."
44
license: Apache-2.0
5-
compatibility: "mops >= 2.19.0"
5+
compatibility: "mops >= 2.20.0"
66
metadata:
77
title: Mops CLI
88
category: Infrastructure
@@ -86,7 +86,7 @@ mops install --lock update # regenerate a stale/corrupt mops.lock
8686
mops install --lock check # fail if lockfile is missing or stale (CI)
8787
```
8888

89-
Run after cloning or after manual `mops.toml` edits. Updates `mops.lock` by default.
89+
Run after cloning or after manual `mops.toml` edits. Updates `mops.lock` by default. Local path dependencies are stored root-relative in the lockfile (portable across machines). A plain install will not rewrite absolute paths left by older CLIs — use `mops install --lock update`, and ensure every environment has a CLI that understands relative lock paths.
9090

9191
When the `CI` env var is set and `--lock` is omitted, defaults to `--lock check` (deprecated — pass `--lock check` explicitly; auto-detection will be removed in v3). A stale lock fails with a hint to run `mops install --lock update`.
9292

@@ -157,7 +157,7 @@ mops generate candid backend -o <path> # single canister, ad-hoc path
157157
mops toolchain use moc 1.7.0 # pin specific version
158158
mops toolchain use moc latest # pin latest version (non-interactive)
159159
mops toolchain use lintoko 0.10.0 # pin specific version
160-
mops toolchain use pocket-ic 12.0.0 # pin for replica tests / benchmarks (pin a specific version; `latest` may resolve to one the bundled pic-js client doesn't support)
160+
mops toolchain use pocket-ic 12.0.0 # pin for replica tests / benchmarks (pin a specific version; `latest` may resolve to one the vendored `@dfinity/pic` client doesn't support)
161161
mops toolchain use wasm-opt 131 # Binaryen for [optimize] (or `latest`)
162162
mops toolchain update moc # update to latest (requires existing [toolchain] entry)
163163
mops toolchain update # update all tools to latest
@@ -167,6 +167,8 @@ mops toolchain info <tool> --versions --all # full stable history (cache warming
167167
mops toolchain bin moc # print path to binary
168168
```
169169

170+
**`pocket-ic` versions**: `9.0.0` and newer run on the vendored `@dfinity/pic` client. Pins below `9.0.0` still work on the legacy `pic-ic` client but print a deprecation warning and are removed in mops v3 — pin `9.0.0` or newer.
171+
170172
**Agent note**: `toolchain use <tool>` without a version opens an interactive picker — do not use in scripts or agents. Always pass a version or `latest`. `toolchain update` only works when the tool already has a `[toolchain]` entry. `toolchain info <tool> --versions` works without `mops.toml` (first GitHub page by default; pass `--all` for full history).
171173

172174
### Enhanced migrations
@@ -202,6 +204,17 @@ mops sync # add missing / remove unused packages
202204

203205
## Other Commands
204206

207+
### `mops publish`
208+
209+
```bash
210+
mops publish # publish to the registry (runs tests/docs/bench by default)
211+
mops publish --dry-run # same local steps as publish; no registry contact / identity
212+
mops publish --dry-run --no-test --no-docs --no-bench # packaging checks only
213+
mops publish --no-test --no-docs --no-bench
214+
```
215+
216+
`--dry-run` runs the same local publish pipeline (packaging checks, docs, changelog, tests, benchmarks) and prints the final file list, then stops before identity/upload. `--no-*` flags work as usual. It does **not** run canister config validation (SPDX/semver/name rules) or prove registry acceptance (already published, permissions, missing deps).
217+
205218
### `mops test`
206219

207220
Tests live in `test/*.test.mo`:

0 commit comments

Comments
 (0)