Skip to content

Commit

Permalink
fix: fix dev/prod dependencies (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Jul 17, 2023
1 parent 4c76f96 commit da083ea
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 57 deletions.
63 changes: 15 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@
"author": "D2L Corporation",
"license": "Apache-2.0",
"devDependencies": {
"@rollup/plugin-node-resolve": "^15",
"@web/dev-server": "^0.2",
"@web/rollup-plugin-html": "^2",
"chai": "^4",
"deepmerge": "^4",
"eslint": "^8",
"eslint-config-brightspace": "^0.23",
"lit": "^2",
"mocha": "^10",
"page": "^1",
"rollup": "^3",
"sinon": "^15"
},
"exports": {
Expand All @@ -40,13 +34,18 @@
"access": "public"
},
"dependencies": {
"@rollup/plugin-node-resolve": "^15",
"@open-wc/testing": "^3",
"@web/rollup-plugin-html": "^2",
"@web/test-runner": "^0.16",
"@web/test-runner-commands": "^0.7",
"@web/test-runner-playwright": "^0.10",
"command-line-args": "^5",
"glob": "^10",
"lit": "^2",
"page": "^1",
"pixelmatch": "^5",
"pngjs": "^7"
"pngjs": "^7",
"rollup": "^3"
}
}
10 changes: 8 additions & 2 deletions src/server/visual-diff-plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { access, constants, mkdir, readdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
import { basename, dirname, join } from 'node:path';
import { env } from 'node:process';
import merge from 'deepmerge';
import pixelmatch from 'pixelmatch';
import { PNG } from 'pngjs';

Expand Down Expand Up @@ -123,7 +122,14 @@ function getTestInfoKey(session, fullTitle) {
function setTestInfo(session, fullTitle, testInfo) {
const key = getTestInfoKey(session, fullTitle);
if (testInfoMap.has(key)) {
testInfo = merge(testInfoMap.get(key), testInfo);
const info = testInfoMap.get(key);
if (info.golden || testInfo.golden) {
testInfo.golden = { ...info.golden, ...testInfo.golden };
}
if (info.new || testInfo.new) {
testInfo.new = { ...info.new, ...testInfo.new };
}
testInfo.diff = testInfo.diff || info.diff;
}
testInfoMap.set(key, testInfo);
}
Expand Down

0 comments on commit da083ea

Please sign in to comment.