chore: remove aw (#1771)

* chore: remove aw

* chore: add back jimp

* chore: add back jimp
This commit is contained in:
Tobias Åström
2025-06-21 14:24:52 +02:00
committed by GitHub
parent 8a6c2817a0
commit 343dedfba4
7 changed files with 482 additions and 2562 deletions

View File

@@ -94,7 +94,6 @@
"chai": false,
"expect": false,
"sinon": false,
"aw": false,
"page": false
},
"plugins": ["mocha"],

View File

@@ -1,16 +0,0 @@
module.exports = {
mocha: {
timeout: 30000,
},
mocks: [],
nyc: {
exclude: [
'**/commands/**',
'**/__stories__/**',
'**/apis/**',
'**/packages/ui/icons/**/*.js', // Exclude the defined icons but test the `<SvgIcon />`
],
},
};
global.__NEBULA_DEV__ = false; // eslint-disable-line

View File

@@ -26,7 +26,6 @@
"chai": false,
"expect": false,
"sinon": false,
"aw": false,
"page": false
},
"plugins": ["mocha"],

View File

@@ -28,7 +28,6 @@
"chai": false,
"expect": false,
"sinon": false,
"aw": false,
"page": false
},
"plugins": ["mocha"],

View File

@@ -12,7 +12,6 @@
"locale:verify": "node tools/verify-translations.cjs",
"locale:generate": "node apis/locale/scripts/generate-all.mjs",
"lint": "eslint packages apis commands --ext .js,.jsx",
"lint:check": "eslint --print-config ./aw.config.cjs | eslint-config-prettier-check",
"spec": "lerna run spec --stream --concurrency 99 && lerna run ts --stream --concurrency 99 ",
"mashup": "node scripts/start-mashup.js",
"test": "yarn run test:unit",
@@ -37,7 +36,6 @@
]
},
"devDependencies": {
"@after-work.js/aw": "6.0.14",
"@babel/cli": "7.27.2",
"@babel/core": "7.27.4",
"@babel/helper-plugin-utils": "7.27.1",
@@ -54,9 +52,9 @@
"@rollup/plugin-node-resolve": "16.0.1",
"@rollup/plugin-replace": "6.0.2",
"@rollup/plugin-terser": "0.4.4",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/user-event": "^14.6.1",
"babel-loader": "10.0.0",
"babel-plugin-istanbul": "7.0.0",
@@ -79,6 +77,7 @@
"jest-environment-jsdom": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-location-mock": "^2.0.0",
"jimp": "^1.6.0",
"lerna": "8.2.2",
"lint-staged": "^16.1.2",
"mocha-junit-reporter": "2.2.1",

View File

@@ -1,15 +1,15 @@
import path from 'path';
import jimp from 'jimp';
import { Jimp } from 'jimp';
export async function looksLike(fileName, capturedPath) {
const artifactsPath = path.resolve(__dirname, './__artifacts__/');
const storedPath = path.resolve(artifactsPath, 'baseline', fileName);
const stored = await jimp.read(storedPath);
const captured = await jimp.read(capturedPath);
const stored = await Jimp.read(storedPath);
const captured = await Jimp.read(capturedPath);
const distance = jimp.distance(stored, captured);
const diff = jimp.diff(stored, captured);
const distance = Jimp.distance(stored, captured);
const diff = Jimp.diff(stored, captured);
if (distance > 0.001 || diff.percent > 0.007) {
await captured.writeAsync(path.resolve(artifactsPath, 'regression', fileName));

3010
yarn.lock

File diff suppressed because it is too large Load Diff