Skip to content

Commit

Permalink
Merge pull request #3488 from jspsych/remove-canvas-dependency-from-c…
Browse files Browse the repository at this point in the history
…onfig

Replace `canvas` dependency in`@jspsych/config` with `jest-canvas-mock`
  • Loading branch information
jodeleeuw authored Jan 28, 2025
2 parents 6e74767 + 4a796c7 commit 313231c
Show file tree
Hide file tree
Showing 9 changed files with 2,132 additions and 4,509 deletions.
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
---

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"
}
}

0 comments on commit 313231c

Please sign in to comment.