From bea45770bd38ef14537fec86b79aabf79b22eb15 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 29 Apr 2020 16:04:15 -0400 Subject: [PATCH 1/2] Fix Scratch paint building in node 12 --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3116269e..86e34f52 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "babel-plugin-transform-object-rest-spread": "^6.22.0", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.22.0", - "canvas-prebuilt": "^1.6.11", "css-loader": "3.4.0", "enzyme": "^3.6.0", "enzyme-adapter-react-16": "^1.5.0", @@ -69,6 +68,7 @@ "gh-pages": "github:rschamp/gh-pages#publish-branch-to-subfolder", "html-webpack-plugin": "3.2.0", "jest": "^22.2.2", + "jest-canvas-mock": "^2.2.0", "lodash.defaultsdeep": "4.6.1", "mkdirp": "^1.0.3", "postcss-import": "^12.0.0", @@ -103,7 +103,8 @@ "jest": { "setupFiles": [ "raf/polyfill", - "/test/helpers/enzyme-setup.js" + "/test/helpers/enzyme-setup.js", + "jest-canvas-mock" ], "testURL": "http://localhost", "moduleNameMapper": { From f3f3834b48c3fd53ac77b107c1b26295c552c086 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 29 Apr 2020 17:28:41 -0400 Subject: [PATCH 2/2] remove canvas from travis build steps' --- .travis.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78eafe6c..a9695414 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,18 +9,9 @@ env: cache: directories: - node_modules -addons: - apt: - packages: - - libcairo2-dev - - libpango1.0-dev - - libssl-dev - - libjpeg62-dev - - libgif-dev install: - npm --production=false install - npm --production=false update -- npm install --no-save canvas@1.6.11 script: npm run $NPM_SCRIPT jobs: include: