Skip to content

Commit

Permalink
Replace vitest-canvas-mock with node-canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Jan 6, 2024
1 parent 195fe6a commit 353e565
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 47 deletions.
4 changes: 2 additions & 2 deletions packages/react-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@types/node": "*",
"@types/react": "*",
"@types/warning": "^3.0.0",
"canvas": "^2.11.2",
"cpy-cli": "^5.0.0",
"eslint": "^8.26.0",
"eslint-config-wojtekmaj": "^0.9.0",
Expand All @@ -81,8 +82,7 @@
"react-dom": "^18.2.0",
"rimraf": "^3.0.0",
"typescript": "^5.3.2",
"vitest": "^1.0.2",
"vitest-canvas-mock": "^0.2.2"
"vitest": "^1.0.2"
},
"peerDependencies": {
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
5 changes: 0 additions & 5 deletions packages/react-pdf/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ export default defineConfig({
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'src/index.test.ts'],
pool: 'forks',
server: {
deps: {
inline: ['vitest-canvas-mock'],
},
},
setupFiles: 'vitest.setup.ts',
watch: false,
},
Expand Down
1 change: 0 additions & 1 deletion packages/react-pdf/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';
import '@testing-library/jest-dom/vitest';
import 'vitest-canvas-mock';

afterEach(() => {
cleanup();
Expand Down
41 changes: 2 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,7 @@ __metadata:
languageName: node
linkType: hard

"color-name@npm:^1.1.4, color-name@npm:~1.1.4":
"color-name@npm:~1.1.4":
version: 1.1.4
resolution: "color-name@npm:1.1.4"
checksum: a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95
Expand Down Expand Up @@ -1836,13 +1836,6 @@ __metadata:
languageName: node
linkType: hard

"cssfontparser@npm:^1.2.1":
version: 1.2.1
resolution: "cssfontparser@npm:1.2.1"
checksum: ceb9b2976d503dbff3ac2aff0229b263affb4fb221a6947b357682cd8a952f6995253646ca5f820020d2fe05b5e29b56dbdd2343388c32203e8dd0ed15bdc1ca
languageName: node
linkType: hard

"cssstyle@npm:^3.0.0":
version: 3.0.0
resolution: "cssstyle@npm:3.0.0"
Expand Down Expand Up @@ -3181,16 +3174,6 @@ __metadata:
languageName: node
linkType: hard

"jest-canvas-mock@npm:^2.4.0":
version: 2.5.0
resolution: "jest-canvas-mock@npm:2.5.0"
dependencies:
cssfontparser: "npm:^1.2.1"
moo-color: "npm:^1.0.2"
checksum: db6cdda478c7cf9722c96fd1be37ed7f6a19c7db8a62a874693ca71a3eb61dcbb633cedead4a2deebd4d733a79c78a59c3bfb73ad410c13aa2fc74cbba317652
languageName: node
linkType: hard

"js-sdsl@npm:^4.1.4":
version: 4.4.0
resolution: "js-sdsl@npm:4.4.0"
Expand Down Expand Up @@ -3808,15 +3791,6 @@ __metadata:
languageName: node
linkType: hard

"moo-color@npm:^1.0.2":
version: 1.0.3
resolution: "moo-color@npm:1.0.3"
dependencies:
color-name: "npm:^1.1.4"
checksum: 778c82f67f638c03a1d0fa78dcd6ea376a9f17b5e78e349c7e34a290b496dbdb43fd0b1c38070e2062d5e784bcf08e57f499015fcbcf52b3a1887d7825ebb80d
languageName: node
linkType: hard

"ms@npm:2.1.2":
version: 2.1.2
resolution: "ms@npm:2.1.2"
Expand Down Expand Up @@ -4551,6 +4525,7 @@ __metadata:
"@types/node": "npm:*"
"@types/react": "npm:*"
"@types/warning": "npm:^3.0.0"
canvas: "npm:^2.11.2"
clsx: "npm:^2.0.0"
cpy-cli: "npm:^5.0.0"
eslint: "npm:^8.26.0"
Expand All @@ -4569,7 +4544,6 @@ __metadata:
tiny-invariant: "npm:^1.0.0"
typescript: "npm:^5.3.2"
vitest: "npm:^1.0.2"
vitest-canvas-mock: "npm:^0.2.2"
warning: "npm:^4.0.0"
peerDependencies:
"@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0
Expand Down Expand Up @@ -5610,17 +5584,6 @@ __metadata:
languageName: node
linkType: hard

"vitest-canvas-mock@npm:^0.2.2":
version: 0.2.2
resolution: "vitest-canvas-mock@npm:0.2.2"
dependencies:
jest-canvas-mock: "npm:^2.4.0"
peerDependencies:
vitest: "*"
checksum: f8b77ed9216f749f6768a9c1190fd999ce3d70b7afc5c615b180971fcdc3353779cb249cdf2c40f75bb15c031795ad5f76b3f27783bce54cd6547e16e91f18eb
languageName: node
linkType: hard

"vitest@npm:^1.0.2":
version: 1.0.2
resolution: "vitest@npm:1.0.2"
Expand Down

0 comments on commit 353e565

Please sign in to comment.