@vcmap/plugin-cli 4.0.0-rc.2 → 4.0.0-rc.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.
@@ -10,8 +10,5 @@ import ResizeObserver from 'resize-observer-polyfill';
10
10
  global.ResizeObserver = ResizeObserver;
11
11
 
12
12
  import 'jest-canvas-mock';
13
- import Vue from 'vue';
14
-
15
- Vue.config.productionTip = false;
16
13
 
17
14
  window.CESIUM_BASE_URL = '/node_modules/@vcmap-cesium/engine/Build/';
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
- import { VcsUiApp, loadPlugin } from '@vcmap/ui';
2
+ import { VcsUiApp, loadPlugin, isValidPackageName } from '@vcmap/ui';
3
3
  import plugin from '../src/index.js';
4
4
  import packageJSON from '../package.json';
5
5
 
@@ -30,8 +30,9 @@ describe('VcsPlugin Interface test', () => {
30
30
  });
31
31
 
32
32
  describe('name, version, mapVersion', () => {
33
- it('should return the plugin name from the package.json', () => {
33
+ it('should return a valid plugin name from the package.json', () => {
34
34
  expect(pluginInstance).to.have.property('name', packageJSON.name);
35
+ expect(isValidPackageName(pluginInstance.name)).to.be.true;
35
36
  });
36
37
  it('should return the plugin version from the package.json', () => {
37
38
  expect(pluginInstance).to.have.property('version', packageJSON.version);
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect, beforeAll, afterAll } from 'vitest';
2
- import { VcsUiApp, loadPlugin, VcsPlugin } from '@vcmap/ui';
2
+ import { VcsUiApp, loadPlugin, isValidPackageName, VcsPlugin } from '@vcmap/ui';
3
3
  import plugin from '../src/index.js';
4
4
  import packageJSON from '../package.json';
5
5
 
@@ -41,8 +41,9 @@ describe('VcsPlugin Interface test', () => {
41
41
  });
42
42
 
43
43
  describe('name, version, mapVersion', () => {
44
- it('should return the plugin name from the package.json', () => {
44
+ it('should return a valid plugin name from the package.json', () => {
45
45
  expect(pluginInstance).to.have.property('name', packageJSON.name);
46
+ expect(isValidPackageName(pluginInstance.name)).to.be.true;
46
47
  });
47
48
  it('should return the plugin version from the package.json', () => {
48
49
  expect(pluginInstance).to.have.property('version', packageJSON.version);
@@ -6,15 +6,7 @@ const configTest = defineConfig({
6
6
  ...commonViteConfig,
7
7
  resolve: {
8
8
  alias: {
9
- vue: 'vue/dist/vue.esm.js',
10
- tinyqueue: 'tinyqueue/tinyqueue.js',
11
- },
12
- },
13
- css: {
14
- preprocessorOptions: {
15
- sass: {
16
- additionalData: "\n@import '@vcmap/ui/src/styles/variables.scss'\n",
17
- },
9
+ '@vcmap/ui': '@vcmap/ui',
18
10
  },
19
11
  },
20
12
  test: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/plugin-cli",
3
- "version": "4.0.0-rc.2",
3
+ "version": "4.0.0-rc.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",
@@ -32,6 +32,7 @@
32
32
  "@vcmap/rollup-plugin-vcs-ol": "^1.0.2",
33
33
  "@vcsuite/cli-logger": "^1.0.0",
34
34
  "@vitejs/plugin-vue": "^5.0.4",
35
+ "vite-plugin-vuetify": "^2.0.3",
35
36
  "commander": "^10.0.1",
36
37
  "express": "^4.18.2",
37
38
  "prompts": "^2.4.2",
package/src/create.js CHANGED
@@ -247,8 +247,7 @@ async function createPluginTemplate(options, pluginPath) {
247
247
  let mapVersion;
248
248
  const mapSemver = parse(minVersion(cliPeerDependencies['@vcmap/ui']));
249
249
  if (prerelease(mapSemver)) {
250
- const { major, minor, patch } = mapSemver;
251
- mapVersion = `^${major}.${minor}.${patch}-rc`;
250
+ mapVersion = mapSemver.version;
252
251
  } else {
253
252
  const { major, minor } = mapSemver;
254
253
  mapVersion = `^${major}.${minor}`;