Skip to content

Commit

Permalink
reg-suit begone! -300 dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Nov 7, 2022
1 parent ab51894 commit 1ab233b
Show file tree
Hide file tree
Showing 8 changed files with 2,416 additions and 8,836 deletions.
11,185 changes: 2,397 additions & 8,788 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
"mocha": "^10.0.0",
"prettier": "2.7.1",
"puppeteer": "^13.5.2",
"reg-suit": "^0.12.1",
"reg-suit-core": "^0.12.1",
"reg-suit-interface": "^0.12.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.2"
},
Expand All @@ -69,7 +66,7 @@
"test:cov": "c8 mocha -r ts-node/register --config .config/mocha.fast.json",
"build:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json",
"test:full": "c8 mocha -r ts-node/register --config .config/mocha.full.json",
"test:visual": "node ./dist/test/capture-screenshots.js && reg-suit -c .config/regconfig.json compare",
"test:visual": "ts-node ./src/test/capture-screenshots.ts && ./scripts/compare_screenshots.sh",
"test:visual:accept": "node scripts/accept_visual_regression.js",
"rebuild_specs": "node scripts/rebuild_specs.js",
"build": "npm run build:tsc && npm run build:themes",
Expand Down
6 changes: 3 additions & 3 deletions scripts/accept_visual_regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const fs = require("fs/promises");
const { copy } = require("../dist/lib/utils/fs");
const { join } = require("path");

const expectedDir = join(__dirname, "../dist/tmp/.reg/expected");
const outputDir = join(__dirname, "../dist/tmp/__screenshots__");
const expectedDir = join(__dirname, "../tmp/baseline");
const outputDir = join(__dirname, "../tmp/screenshots");

fs.rmdir(expectedDir, { recursive: true })
fs.rm(expectedDir, { recursive: true, force: true })
.then(() => copy(outputDir, expectedDir))
.catch((err) => {
console.error(err);
Expand Down
11 changes: 11 additions & 0 deletions scripts/compare_screenshots.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

test -d ./tmp/output && rm -rf ./tmp/output
mkdir -p ./tmp/{output,screenshots,baseline}

docker run \
--name typedoc-reg-suit \
-v "$PWD/tmp/screenshots:/new" \
-v "$PWD/tmp/baseline:/old" \
-v "$PWD/tmp/output:/out" \
ghcr.io/gerrit0/reg-suit-container:main
2 changes: 1 addition & 1 deletion scripts/download_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async function main(args) {
);
const tarballs = await Promise.all(plugins.map(getTarballUrl));
console.log(`Downloading tarballs...`);
await fs.promises.rmdir(outDir, { recursive: true }).catch(console.error);
await fs.promises.rm(outDir, { recursive: true, force: true });
await fs.promises.mkdir(outDir, { recursive: true });
const tarballFiles = await Promise.all(
tarballs.map((tar) => downloadTarball(tar, outDir))
Expand Down
4 changes: 2 additions & 2 deletions src/test/capture-screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const puppeteer = require("puppeteer");

const concurrency = 10;
const src = join(__dirname, "../../src/test/renderer/testProject/src");
const baseDirectory = join(__dirname, "../../dist/tmp/capture");
const outputDirectory = join(__dirname, "../../dist/tmp/__screenshots__");
const baseDirectory = join(__dirname, "../../tmp/capture");
const outputDirectory = join(__dirname, "../../tmp/screenshots");
const viewport = { width: 1024, height: 768 };

class PQueue {
Expand Down
34 changes: 0 additions & 34 deletions src/test/slow/visual.test.ts

This file was deleted.

5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@

// Add our `ts` internal types
"typeRoots": ["node_modules/@types", "src/lib/types"],
"types": ["node", "glob", "lunr", "marked", "minimatch", "mocha"],
"types": ["node", "lunr", "marked", "minimatch", "mocha"],
// Speed up dev compilation time
"incremental": true,
"tsBuildInfoFile": "dist/.tsbuildinfo",

// *grumble* need to get rid of reg-suit
"skipLibCheck": true,

"experimentalDecorators": true,
"strict": true,
"alwaysStrict": true,
Expand Down

0 comments on commit 1ab233b

Please sign in to comment.