ic-mops 0.34.0 → 0.34.1

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/cli.ts CHANGED
@@ -212,6 +212,7 @@ program
212
212
  .addOption(new Option('--mode <mode>', 'Test mode').choices(['interpreter', 'wasi']).default('interpreter'))
213
213
  .option('-w, --watch', 'Enable watch mode')
214
214
  .action(async (filter, options) => {
215
+ await installAll({silent: true, lockfile: 'ignore'});
215
216
  await test(filter, options);
216
217
  });
217
218
 
@@ -225,6 +226,7 @@ program
225
226
  // .addOption(new Option('--force-gc', 'Force GC'))
226
227
  .addOption(new Option('--verbose', 'Show more information'))
227
228
  .action(async (filter, options) => {
229
+ await installAll({silent: true, lockfile: 'ignore'});
228
230
  await bench(filter, options);
229
231
  });
230
232
 
package/commands/add.ts CHANGED
@@ -15,7 +15,7 @@ type AddOptions = {
15
15
  };
16
16
 
17
17
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
- export async function add(name: string, {verbose = false, dev = false, lockfile}: AddOptions = {}) {
18
+ export async function add(name: string, {verbose = false, dev = false, lockfile}: AddOptions = {}, asName?: string) {
19
19
  if (!checkConfigFile()) {
20
20
  return;
21
21
  }
@@ -57,7 +57,7 @@ export async function add(name: string, {verbose = false, dev = false, lockfile}
57
57
  }
58
58
 
59
59
  pkgDetails = {
60
- name: parseGithubURL(name).gitName,
60
+ name: asName || parseGithubURL(name).gitName,
61
61
  repo: `https://github.com/${org}/${gitName}#${branch}@${commitHash}`,
62
62
  version: '',
63
63
  };
@@ -34,7 +34,7 @@ export async function update(pkg?: string, {lockfile}: UpdateOptions = {}) {
34
34
  let dev = !!config['dev-dependencies']?.[dep.name];
35
35
  let commit = await getGithubCommit(`${org}/${gitName}`, branch);
36
36
  if (commit.sha !== commitHash) {
37
- await add(`https://github.com/${org}/${gitName}#${branch}@${commit.sha}`, {dev});
37
+ await add(`https://github.com/${org}/${gitName}#${branch}@${commit.sha}`, {dev}, dep.name);
38
38
  }
39
39
  }
40
40
 
package/dist/cli.js CHANGED
@@ -185,6 +185,7 @@ program
185
185
  .addOption(new Option('--mode <mode>', 'Test mode').choices(['interpreter', 'wasi']).default('interpreter'))
186
186
  .option('-w, --watch', 'Enable watch mode')
187
187
  .action(async (filter, options) => {
188
+ await installAll({ silent: true, lockfile: 'ignore' });
188
189
  await test(filter, options);
189
190
  });
190
191
  // bench
@@ -197,6 +198,7 @@ program
197
198
  // .addOption(new Option('--force-gc', 'Force GC'))
198
199
  .addOption(new Option('--verbose', 'Show more information'))
199
200
  .action(async (filter, options) => {
201
+ await installAll({ silent: true, lockfile: 'ignore' });
200
202
  await bench(filter, options);
201
203
  });
202
204
  // template
@@ -3,5 +3,5 @@ type AddOptions = {
3
3
  dev?: boolean;
4
4
  lockfile?: 'save' | 'ignore';
5
5
  };
6
- export declare function add(name: string, { verbose, dev, lockfile }?: AddOptions): Promise<void>;
6
+ export declare function add(name: string, { verbose, dev, lockfile }?: AddOptions, asName?: string): Promise<void>;
7
7
  export {};
@@ -7,7 +7,7 @@ import { installFromGithub } from '../vessel.js';
7
7
  import { install } from './install.js';
8
8
  import { notifyInstalls } from '../notify-installs.js';
9
9
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
- export async function add(name, { verbose = false, dev = false, lockfile } = {}) {
10
+ export async function add(name, { verbose = false, dev = false, lockfile } = {}, asName) {
11
11
  if (!checkConfigFile()) {
12
12
  return;
13
13
  }
@@ -44,7 +44,7 @@ export async function add(name, { verbose = false, dev = false, lockfile } = {})
44
44
  commitHash = commit.sha;
45
45
  }
46
46
  pkgDetails = {
47
- name: parseGithubURL(name).gitName,
47
+ name: asName || parseGithubURL(name).gitName,
48
48
  repo: `https://github.com/${org}/${gitName}#${branch}@${commitHash}`,
49
49
  version: '',
50
50
  };
@@ -24,7 +24,7 @@ export async function update(pkg, { lockfile } = {}) {
24
24
  let dev = !!config['dev-dependencies']?.[dep.name];
25
25
  let commit = await getGithubCommit(`${org}/${gitName}`, branch);
26
26
  if (commit.sha !== commitHash) {
27
- await add(`https://github.com/${org}/${gitName}#${branch}@${commit.sha}`, { dev });
27
+ await add(`https://github.com/${org}/${gitName}#${branch}@${commit.sha}`, { dev }, dep.name);
28
28
  }
29
29
  }
30
30
  // update mops packages
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "dist/cli.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "dist/cli.js"