powerbi-visuals-tools 7.1.1 → 7.2.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 CHANGED
@@ -1,6 +1,12 @@
1
1
  # Change Log - PowerBI Visual Tools (pbiviz)
2
2
 
3
3
  This page contains information about changes to the PowerBI Visual Tools (pbiviz).
4
+ ## 7.2.0
5
+ * Added a pre-build validation that fails with an error when the visual version contains parts with leading zeros (rejected by the Power BI marketplace package acceptance check).
6
+ * Bumped `powerbi-visuals-api` to `5.11.1` in the visual templates.
7
+
8
+ ## 7.1.2
9
+ * Npm audit fixes.
4
10
 
5
11
  ## 7.1.1
6
12
  * Minor documentation and metadata updates.
package/lib/Visual.js CHANGED
@@ -17,6 +17,9 @@ export class Visual {
17
17
  isVisualVersionValid(length) {
18
18
  return this.visualVersion.split(".").length === length;
19
19
  }
20
+ hasVisualVersionLeadingZeros() {
21
+ return this.visualVersion.split(".").some(part => /^0\d+/.test(part));
22
+ }
20
23
  isAuthorDefined() {
21
24
  const author = this.config?.author;
22
25
  const emailRegex = /^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$/;
@@ -0,0 +1,12 @@
1
+ import { Severity, Stage, VisualFeatureType } from "./FeatureTypes.js";
2
+ export default class VisualVersionLeadingZeros {
3
+ static featureName = "Visual version leading zeros";
4
+ static errorMessage = `${this.featureName} - version parts must not contain leading zeros (e.g. use 1.2.3.4 instead of 1.2.03.4). Update the pbiviz.json file. Versions with leading zeros are rejected by the Power BI marketplace package acceptance check.`;
5
+ static severity = Severity.Error;
6
+ static stage = Stage.PreBuild;
7
+ static visualFeatureType = VisualFeatureType.All;
8
+ static certificationRequired = true;
9
+ static isSupported(visual) {
10
+ return !visual.hasVisualVersionLeadingZeros();
11
+ }
12
+ }
@@ -26,4 +26,5 @@ import TotalSubTotal from './TotalSubTotal.js';
26
26
  import WarningIcon from './WarningIcon.js';
27
27
  import APIVersion from './APIVersion.js';
28
28
  import VisualVersion from './VisualVersion.js';
29
- export { AdvancedEditMode, AllowInteractions, AnalyticsPane, Bookmarks, ColorPalette, ConditionalFormatting, ContextMenu, DrillDown, FetchMoreData, FileDownload, FormatPane, HighContrast, HighlightData, KeyboardNavigation, LandingPage, LaunchURL, Localizations, LocalStorage, ModalDialog, RenderingEvents, SelectionAcrossVisuals, SyncSlicer, Tooltips, TotalSubTotal, WarningIcon, APIVersion, VisualVersion, AuthorInfo };
29
+ import VisualVersionLeadingZeros from './VisualVersionLeadingZeros.js';
30
+ export { AdvancedEditMode, AllowInteractions, AnalyticsPane, Bookmarks, ColorPalette, ConditionalFormatting, ContextMenu, DrillDown, FetchMoreData, FileDownload, FormatPane, HighContrast, HighlightData, KeyboardNavigation, LandingPage, LaunchURL, Localizations, LocalStorage, ModalDialog, RenderingEvents, SelectionAcrossVisuals, SyncSlicer, Tooltips, TotalSubTotal, WarningIcon, APIVersion, VisualVersion, VisualVersionLeadingZeros, AuthorInfo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerbi-visuals-tools",
3
- "version": "7.1.1",
3
+ "version": "7.2.0",
4
4
  "description": "Command line tool for creating and publishing visuals for Power BI",
5
5
  "main": "./bin/pbiviz.js",
6
6
  "type": "module",
@@ -48,7 +48,6 @@
48
48
  "lodash.isequal": "4.5.0",
49
49
  "lodash.ismatch": "^4.4.0",
50
50
  "mini-css-extract-plugin": "^2.10.2",
51
- "powerbi-visuals-api": "~5.3.0",
52
51
  "powerbi-visuals-webpack-plugin": "^5.0.1",
53
52
  "terser-webpack-plugin": "^5.4.0",
54
53
  "ts-loader": "^9.5.4",
@@ -57,6 +56,7 @@
57
56
  "webpack-bundle-analyzer": "4.10.2",
58
57
  "webpack-dev-server": "^5.2.3",
59
58
  "zod": "^4.3.6"
59
+
60
60
  },
61
61
  "devDependencies": {
62
62
  "@typescript-eslint/eslint-plugin": "^8.58.0",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@types/d3": "7.4.3",
18
18
  "d3": "7.9.0",
19
- "powerbi-visuals-api": "5.11.0",
19
+ "powerbi-visuals-api": "5.11.1",
20
20
  "powerbi-visuals-utils-formattingmodel": "6.0.4"
21
21
  },
22
22
  "devDependencies": {
@@ -4,7 +4,7 @@
4
4
  "powerbi-visuals-utils-formattingmodel": "6.0.0"
5
5
  },
6
6
  "devDependencies": {
7
- "powerbi-visuals-api": "5.11.0",
7
+ "powerbi-visuals-api": "5.11.1",
8
8
  "ts-loader": "9.5.1",
9
9
  "@typescript-eslint/eslint-plugin": "^8.8.0",
10
10
  "eslint": "^9.11.1",
@@ -4,7 +4,7 @@
4
4
  "powerbi-visuals-utils-formattingmodel": "6.0.0"
5
5
  },
6
6
  "devDependencies": {
7
- "powerbi-visuals-api": "5.11.0",
7
+ "powerbi-visuals-api": "5.11.1",
8
8
  "@typescript-eslint/eslint-plugin": "^8.8.0",
9
9
  "eslint": "^9.11.1",
10
10
  "eslint-plugin-powerbi-visuals": "^1.0.0",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/d3": "7.4.3",
15
- "powerbi-visuals-api": "5.11.0",
15
+ "powerbi-visuals-api": "5.11.1",
16
16
  "@typescript-eslint/eslint-plugin": "^8.8.0",
17
17
  "eslint": "^9.11.1",
18
18
  "eslint-plugin-powerbi-visuals": "^1.0.0",
@@ -11,7 +11,7 @@
11
11
  "powerbi-visuals-utils-formattingmodel": "6.0.4"
12
12
  },
13
13
  "devDependencies": {
14
- "powerbi-visuals-api": "5.11.0",
14
+ "powerbi-visuals-api": "5.11.1",
15
15
  "@types/d3": "7.4.3",
16
16
  "@typescript-eslint/eslint-plugin": "^8.8.0",
17
17
  "eslint": "^9.11.1",