Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace canvas dependency in@jspsych/config with jest-canvas-mock #3488

Merged
merged 15 commits into from
Jan 28, 2025
Merged
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
5 changes: 5 additions & 0 deletions .changeset/little-roses-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@jspsych/config": patch
jodeleeuw marked this conversation as resolved.
Show resolved Hide resolved
---

Replaces the dependency on `canvas` in `@jspsych/config` with `jest-canvas-mock`.
6,616 changes: 2,115 additions & 4,501 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@
"devDependencies": {
"@changesets/changelog-github": "^0.4.7",
"@changesets/cli": "^2.25.2",
"@jspsych/config": "^3.0.0",
"@jspsych/config": "^3.2.1",
"husky": "^8.0.3",
"import-sort-style-module": "^6.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"prettier-plugin-import-sort": "^0.0.7",
"turbo": "^1.6.3"
},
"overrides": {
"typescript": "^5.0.0"
},
"prettier": {
"printWidth": 100
},
Expand Down
3 changes: 2 additions & 1 deletion packages/config/jest.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports.makePackageConfig = (dirname) => {
displayName: {
name: packageBaseName,
color: packageBaseName === "jspsych" ? "white" : "cyanBright",
}
},
setupFiles: [require.resolve("jest-canvas-mock")],
};
};
4 changes: 2 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@types/node": "^22.10.10",
"alias-hq": "6.2.4",
"app-root-path": "^3.1.0",
"canvas": "^2.11.2",
"esbuild": "0.23.1",
"glob": "7.2.3",
"gulp": "5.0.0",
Expand All @@ -62,6 +61,7 @@
"gulp-replace": "1.1.4",
"gulp-zip": "6.0.0",
"jest": "29.7.0",
"jest-canvas-mock": "2.5.0",
"jest-environment-jsdom": "29.7.0",
"merge-stream": "2.0.0",
"rollup": "4.21.2",
Expand All @@ -71,6 +71,6 @@
"rollup-plugin-node-externals": "7.1.3",
"sucrase": "3.34.0",
"tslib": "2.6.2",
"typescript": "^5.2.2"
"typescript": "^5.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-canvas-button-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@jspsych/config": "^3.2.0",
"@jspsych/test-utils": "^1.2.0"
"@jspsych/test-utils": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-image-button-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@jspsych/config": "^3.2.0",
"@jspsych/test-utils": "^1.2.0"
"@jspsych/test-utils": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-image-keyboard-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@jspsych/config": "^3.2.0",
"@jspsych/test-utils": "^1.2.0"
"@jspsych/test-utils": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-sketchpad/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
},
"devDependencies": {
"@jspsych/config": "^3.2.0",
"@jspsych/test-utils": "^1.2.0"
"@jspsych/test-utils": "^1.2.0"
}
}