From d617cf939c2db79f50d18fdaa2f20e516618e622 Mon Sep 17 00:00:00 2001 From: Nikita Grachev Date: Mon, 12 Feb 2024 15:59:42 -0300 Subject: [PATCH] disabled node runtime fallback (#508) --- Changelog.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- src/webpack.config.ts | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index b9fabd35..5ad8f17e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,10 @@ This page contains information about changes to the PowerBI Visual Tools (pbiviz). +## 5.4.2 +* Added the **node: false** option to the webpack plugin to eliminate the use of the potentially dangerous **new Function()** method, which ensures compatibility with the Node.js runtime. +* Introduced support for *.mjs ECMAScript modules. + ## 5.4.1 * Updated R-based visuals settings.ts file to work properly with the new API diff --git a/package-lock.json b/package-lock.json index 90bbc490..33c207d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "powerbi-visuals-tools", - "version": "5.4.1", + "version": "5.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "powerbi-visuals-tools", - "version": "5.4.1", + "version": "5.4.2", "license": "MIT", "dependencies": { "@typescript-eslint/parser": "^6.17.0", diff --git a/package.json b/package.json index 0d7e7851..ef579ec8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "powerbi-visuals-tools", - "version": "5.4.1", + "version": "5.4.2", "description": "Command line tool for creating and publishing visuals for Power BI", "main": "./bin/pbiviz.js", "type": "module", diff --git a/src/webpack.config.ts b/src/webpack.config.ts index 76073c26..0826d4c2 100644 --- a/src/webpack.config.ts +++ b/src/webpack.config.ts @@ -13,6 +13,7 @@ const webpackConfig = { 'visual.js': ['./src/visual.ts'] }, target: 'web', + node: false, devtool: false, mode: "production", optimization: { @@ -74,7 +75,7 @@ const webpackConfig = { "powerbi-visuals-api": 'null' }, resolve: { - extensions: ['.tsx', '.ts', '.jsx', '.js', '.css'], + extensions: ['.tsx', '.ts', '.jsx', '.js', '.mjs', '.css'], modules: ['node_modules', path.resolve(rootPath, 'node_modules')], fallback: { assert: "assert",