Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ jobs:
matrix:
node-version: [20.x, 22.x]

env:
CI: true

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm audit
continue-on-error: true
# Scoped to shipped dependencies so a devDependency advisory cannot red-build unrelated PRs.
- run: npm audit --audit-level=high --omit=dev
- run: npm outdated
continue-on-error: true
- run: npm run lint --if-present
- run: npm run lint
- run: npm run package
- run: npm test
env:
CI: true
# Browser provisioning is a separate step so test runs stay offline-friendly.
- run: npm run browsers:ci
# test:coverage triggers pretest:coverage, which runs the spec type check.
- run: npm run test:coverage
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ typings
/coverage
webpack.statistics.html
webpack.statistics.*.html
TESTS-report.xml
.vitest-reports
.vitest-attachments
__screenshots__
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 3.1.1.0
### Testing
* Migrate tests from Karma + Webpack to Vite + Vitest (browser mode with Playwright/Chromium)
* Stub `powerbi-visuals-api` in specs so the ambient `const enum`s survive the esbuild transform
* Replace Jasmine `done` callbacks with async/await tests built on the new `TestWrapper.render()` helper
* Replace Istanbul coverage with V8 coverage
* Remove obsolete specs for per-metric stale data settings, which the formatting model no longer supports

### Scripts
* Add `test:watch`, `test:coverage` and `test:typecheck` scripts
* Run the spec type check before every test run
* Install the Chromium binary from a dedicated `browsers` script (`browsers:ci` adds the Linux system packages) so test runs stay offline-friendly

### CI
* Provision the browser in its own workflow step before running the tests
* Scope the audit to shipped dependencies (`npm audit --audit-level=high --omit=dev`)
* Update the GitHub actions to v6

### Dependencies
* Move linting packages to `devDependencies` and drop the unused `regenerator-runtime`
* Drop the direct `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` entries, which `typescript-eslint` already provides
* Update ESLint to v10, `powerbi-visuals-tools` to 7.2.1, `powerbi-visuals-api` to 5.11.1 and the visual utils to their 7.x releases

## 3.1.0.0
### New feature
* Add new option "Data Gaps" to detect missing days in time-series data and display a warning icon when gaps are found. The icon is shown by default and appears automatically whenever gaps are detected.
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ Sparkline Interpolation: Interpolate sparkline values to get rid of noisy points

See also [MultiKPI at Microsoft AppSource](https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381763)

# Testing

Tests run on [Vitest](https://vitest.dev/) in browser mode (Playwright, headless Chromium). Run `npm run browsers` once after cloning to download the Chromium binary; the test scripts themselves never reach out to the network.

| Command | Description |
| --- | --- |
| `npm run browsers` | Downloads the Chromium binary used by the suite (one-time setup) |
| `npm run browsers:ci` | Same download plus the Linux system packages, for CI images |
| `npm test` | Type checks the specs and runs the whole suite once |
| `npm run test:watch` | Runs the suite in watch mode |
| `npm run test:coverage` | Runs the suite and collects V8 coverage into `coverage/` |
| `npm run test:typecheck` | Type checks `specs` and `src` without emitting |

# Version 2.2.0 New Functionality
## A new option "Show Latest Available As Current Value" inside "Values" option group

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default [
...tseslint.configs.recommended,
powerbiVisualsConfigs.configs.recommended,
{
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**", "coverage/**", "specs/**", "test.webpack.config.js", "karma.conf.ts"],
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**", "coverage/**"],
},
];
101 changes: 0 additions & 101 deletions karma.conf.ts

This file was deleted.

Loading
Loading