Merge pull request #3488 from jspsych/remove-canvas-dependency-from-config

Replace `canvas` dependency in`@jspsych/config` with `jest-canvas-mock`
This commit is contained in:
Josh de Leeuw 2025-01-28 16:19:27 -05:00 committed by GitHub
commit 313231cae6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 2023 additions and 4400 deletions

View File

@ -0,0 +1,5 @@
---
"@jspsych/config": patch
---
Replaces the dependency on `canvas` in `@jspsych/config` with `jest-canvas-mock`.

6388
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@
"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",
@ -35,6 +35,9 @@
"prettier-plugin-import-sort": "^0.0.7",
"turbo": "^1.6.3"
},
"overrides": {
"typescript": "^5.0.0"
},
"prettier": {
"printWidth": 100
},

View File

@ -18,6 +18,7 @@ module.exports.makePackageConfig = (dirname) => {
displayName: {
name: packageBaseName,
color: packageBaseName === "jspsych" ? "white" : "cyanBright",
}
},
setupFiles: [require.resolve("jest-canvas-mock")],
};
};

View File

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