@vcmap/plugin-cli 3.1.2 → 3.1.4

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/package.json +1 -1
  2. package/src/update.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/plugin-cli",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "description": "A CLI to help develop and build plugins for the VC Map",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/src/update.js CHANGED
@@ -32,7 +32,11 @@ export async function updatePeerDependencies(
32
32
  );
33
33
  options.mapVersion = 'latest';
34
34
  }
35
- const { stdout, stderr } = await promiseExec('npm view @vcmap/ui --json');
35
+ let viewCmd = 'npm view @vcmap/ui --json';
36
+ if (options.mapVersion) {
37
+ viewCmd = `npm view @vcmap/ui@${options.mapVersion} --json`;
38
+ }
39
+ const { stdout, stderr } = await promiseExec(viewCmd);
36
40
  logger.error(stderr);
37
41
  const { name: mapName, peerDependencies: mapPeer } = JSON.parse(stdout);
38
42
  const peerDeps = [`${mapName}@${options.mapVersion || 'latest'}`]; // @vcmap/ui is a required peer dep and will be updated in any case