@windycom/plugin-devtools 1.0.5 → 1.0.6

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 (3) hide show
  1. package/README.md +1 -0
  2. package/index.mjs +3 -2
  3. package/package.json +5 -2
package/README.md CHANGED
@@ -4,5 +4,6 @@ Check out https://docs.windy-plugins.com for more information.
4
4
 
5
5
  # CHANGELOG
6
6
 
7
+ - 1.0.6 - Fix plugin version validation
7
8
  - 1.0.5 - Fixing .d.ts declarations
8
9
  - 1.0.0 - TS declarations for client v42
package/index.mjs CHANGED
@@ -3,6 +3,7 @@ import fs from 'fs';
3
3
  import assert from 'assert';
4
4
  import MagicString from 'magic-string';
5
5
  import { walk } from 'estree-walker';
6
+ const semver = require('semver');
6
7
 
7
8
  const testLoadedPlugin = config => {
8
9
  const { name, version, title, desktopUI, mobileUI, routerPath, icon } = config;
@@ -13,8 +14,8 @@ const testLoadedPlugin = config => {
13
14
  );
14
15
 
15
16
  assert(
16
- typeof version === 'string' && version.match(/^\d+\.\d+\.\d+$/),
17
- 'Plugin version is not defined or is not in semversion format (example: 1.3.7)',
17
+ typeof version === 'string' && semver.valid(version),
18
+ 'Plugin version is not defined or is not in SemVer format (example: 1.3.7)',
18
19
  );
19
20
 
20
21
  assert(
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@windycom/plugin-devtools",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Developer tools and TS declarations for developers of Windy Plugins.",
5
5
  "main": "index.mjs",
6
6
  "module": "index.mjs",
7
7
  "author": "Windyty, S.E.",
8
- "license": "ISC"
8
+ "license": "ISC",
9
+ "dependencies": {
10
+ "semver": "^7.6.0"
11
+ }
9
12
  }