ic-mops 1.9.0 → 1.10.0
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/CHANGELOG.md +6 -0
- package/bundle/cli.tgz +0 -0
- package/commands/bench-replica.ts +1 -0
- package/commands/publish.ts +14 -1
- package/commands/test/test.ts +2 -1
- package/commands/toolchain/moc.ts +10 -4
- package/dist/commands/bench-replica.js +1 -0
- package/dist/commands/publish.js +13 -1
- package/dist/commands/test/test.js +1 -0
- package/dist/commands/toolchain/moc.js +10 -4
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Mops CLI Changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
- Enable `memory64` for `wasi` testing (by @ggreif)
|
|
5
|
+
- Add support for arm64 `moc` binaries (for `moc` >= 0.14.6)
|
|
6
|
+
- Deploy benchmarks with `optimize: "cycles"` dfx setting
|
|
7
|
+
- Show warning when publishing packages with GitHub dependencies
|
|
8
|
+
|
|
3
9
|
## 1.9.0
|
|
4
10
|
- Add `mops docs generate` command for generating package documentation ([docs](https://docs.mops.one/cli/mops-docs-generate))
|
|
5
11
|
- Add `mops docs coverage` command for analyzing documentation coverage ([docs](https://docs.mops.one/cli/mops-docs-coverage))
|
package/bundle/cli.tgz
CHANGED
|
Binary file
|
package/commands/publish.ts
CHANGED
|
@@ -53,7 +53,7 @@ export async function publish(options : {docs ?: boolean, test ?: boolean, bench
|
|
|
53
53
|
// desired fields
|
|
54
54
|
for (let key of ['description', 'repository']) {
|
|
55
55
|
// @ts-ignore
|
|
56
|
-
if (!config.package[key]) {
|
|
56
|
+
if (!config.package[key] && !process.env.CI) {
|
|
57
57
|
let res = await prompts({
|
|
58
58
|
type: 'confirm',
|
|
59
59
|
name: 'ok',
|
|
@@ -127,6 +127,19 @@ export async function publish(options : {docs ?: boolean, test ?: boolean, bench
|
|
|
127
127
|
}
|
|
128
128
|
delete dep.path;
|
|
129
129
|
}
|
|
130
|
+
|
|
131
|
+
for (let dep of Object.values(config.dependencies)) {
|
|
132
|
+
if (dep.repo && !process.env.CI) {
|
|
133
|
+
let res = await prompts({
|
|
134
|
+
type: 'confirm',
|
|
135
|
+
name: 'ok',
|
|
136
|
+
message: chalk.yellow('GitHub dependencies make the registry less reliable and limit its capabilities.\nIf you are the owner of the dependency, please consider publishing it to the Mops registry.') + '\n\nPublish anyway?',
|
|
137
|
+
});
|
|
138
|
+
if (!res.ok) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
130
143
|
}
|
|
131
144
|
|
|
132
145
|
if (config['dev-dependencies']) {
|
package/commands/test/test.ts
CHANGED
|
@@ -289,6 +289,7 @@ export async function testWithReporter(reporterName : ReporterName | Reporter |
|
|
|
289
289
|
'-C', 'cache=n',
|
|
290
290
|
'-W', 'bulk-memory',
|
|
291
291
|
'-W', 'multi-memory',
|
|
292
|
+
'-W', 'memory64',
|
|
292
293
|
'-W', 'max-wasm-stack=4000000',
|
|
293
294
|
'-W', 'nan-canonicalization=y',
|
|
294
295
|
wasmFile,
|
|
@@ -475,4 +476,4 @@ function pipeMMF(proc : ChildProcessWithoutNullStreams, mmf : MMF1) {
|
|
|
475
476
|
resolve();
|
|
476
477
|
});
|
|
477
478
|
});
|
|
478
|
-
}
|
|
479
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
|
+
import {SemVer} from 'semver';
|
|
4
5
|
|
|
5
6
|
import {globalCacheDir} from '../../mops.js';
|
|
6
7
|
import * as toolchainUtils from './toolchain-utils.js';
|
|
@@ -39,11 +40,16 @@ export let download = async (version : string, {silent = false, verbose = false}
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
let url;
|
|
42
|
-
if (
|
|
43
|
+
if (new SemVer(version).compare(new SemVer('0.14.6')) >= 0) {
|
|
43
44
|
let platfrom = process.platform == 'darwin' ? 'Darwin' : 'Linux';
|
|
44
|
-
let arch = process.arch.startsWith('arm')
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
let arch = process.arch.startsWith('arm')
|
|
46
|
+
? (process.platform == 'darwin' ? 'arm64' : 'aarch64')
|
|
47
|
+
: 'x86_64';
|
|
48
|
+
url = `https://github.com/dfinity/motoko/releases/download/${version}/motoko-${platfrom}-${arch}-${version}.tar.gz`;
|
|
49
|
+
}
|
|
50
|
+
else if (new SemVer(version).compare(new SemVer('0.9.5')) >= 0) {
|
|
51
|
+
let platfrom = process.platform == 'darwin' ? 'Darwin' : 'Linux';
|
|
52
|
+
let arch = 'x86_64';
|
|
47
53
|
url = `https://github.com/dfinity/motoko/releases/download/${version}/motoko-${platfrom}-${arch}-${version}.tar.gz`;
|
|
48
54
|
}
|
|
49
55
|
else {
|
package/dist/commands/publish.js
CHANGED
|
@@ -44,7 +44,7 @@ export async function publish(options = {}) {
|
|
|
44
44
|
// desired fields
|
|
45
45
|
for (let key of ['description', 'repository']) {
|
|
46
46
|
// @ts-ignore
|
|
47
|
-
if (!config.package[key]) {
|
|
47
|
+
if (!config.package[key] && !process.env.CI) {
|
|
48
48
|
let res = await prompts({
|
|
49
49
|
type: 'confirm',
|
|
50
50
|
name: 'ok',
|
|
@@ -113,6 +113,18 @@ export async function publish(options = {}) {
|
|
|
113
113
|
}
|
|
114
114
|
delete dep.path;
|
|
115
115
|
}
|
|
116
|
+
for (let dep of Object.values(config.dependencies)) {
|
|
117
|
+
if (dep.repo && !process.env.CI) {
|
|
118
|
+
let res = await prompts({
|
|
119
|
+
type: 'confirm',
|
|
120
|
+
name: 'ok',
|
|
121
|
+
message: chalk.yellow('GitHub dependencies make the registry less reliable and limit its capabilities.\nIf you are the owner of the dependency, please consider publishing it to the Mops registry.') + '\n\nPublish anyway?',
|
|
122
|
+
});
|
|
123
|
+
if (!res.ok) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
116
128
|
}
|
|
117
129
|
if (config['dev-dependencies']) {
|
|
118
130
|
if (Object.keys(config['dev-dependencies']).length > 100) {
|
|
@@ -233,6 +233,7 @@ export async function testWithReporter(reporterName, filter = '', defaultMode =
|
|
|
233
233
|
'-C', 'cache=n',
|
|
234
234
|
'-W', 'bulk-memory',
|
|
235
235
|
'-W', 'multi-memory',
|
|
236
|
+
'-W', 'memory64',
|
|
236
237
|
'-W', 'max-wasm-stack=4000000',
|
|
237
238
|
'-W', 'nan-canonicalization=y',
|
|
238
239
|
wasmFile,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
|
+
import { SemVer } from 'semver';
|
|
4
5
|
import { globalCacheDir } from '../../mops.js';
|
|
5
6
|
import * as toolchainUtils from './toolchain-utils.js';
|
|
6
7
|
let cacheDir = path.join(globalCacheDir, 'moc');
|
|
@@ -31,11 +32,16 @@ export let download = async (version, { silent = false, verbose = false } = {})
|
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
let url;
|
|
34
|
-
if (
|
|
35
|
+
if (new SemVer(version).compare(new SemVer('0.14.6')) >= 0) {
|
|
35
36
|
let platfrom = process.platform == 'darwin' ? 'Darwin' : 'Linux';
|
|
36
|
-
let arch = process.arch.startsWith('arm')
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
let arch = process.arch.startsWith('arm')
|
|
38
|
+
? (process.platform == 'darwin' ? 'arm64' : 'aarch64')
|
|
39
|
+
: 'x86_64';
|
|
40
|
+
url = `https://github.com/dfinity/motoko/releases/download/${version}/motoko-${platfrom}-${arch}-${version}.tar.gz`;
|
|
41
|
+
}
|
|
42
|
+
else if (new SemVer(version).compare(new SemVer('0.9.5')) >= 0) {
|
|
43
|
+
let platfrom = process.platform == 'darwin' ? 'Darwin' : 'Linux';
|
|
44
|
+
let arch = 'x86_64';
|
|
39
45
|
url = `https://github.com/dfinity/motoko/releases/download/${version}/motoko-${platfrom}-${arch}-${version}.tar.gz`;
|
|
40
46
|
}
|
|
41
47
|
else {
|
package/dist/package.json
CHANGED