From 5b9eb13319783d4dbe490fe70c8c28c58c37dcbf Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:15:02 -0800 Subject: [PATCH] fix: adapt to new scratch-storage@^3 API --- src/playground/benchmark.js | 2 +- test/fixtures/make-test-storage.js | 2 +- test/integration/offline-custom-assets.js | 2 +- webpack.config.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/playground/benchmark.js b/src/playground/benchmark.js index a2c706df3b2..b6280c1b983 100644 --- a/src/playground/benchmark.js +++ b/src/playground/benchmark.js @@ -43,7 +43,7 @@ const importLoadSound = require('../import/load-sound'); const soundMiddleware = new LoadingMiddleware(); importLoadSound.loadSound = soundMiddleware.install(importLoadSound, importLoadSound.loadSound); -const ScratchStorage = require('scratch-storage'); +const {ScratchStorage} = require('scratch-storage'); const VirtualMachine = require('..'); const Runtime = require('../engine/runtime'); diff --git a/test/fixtures/make-test-storage.js b/test/fixtures/make-test-storage.js index 1401a2c1edb..1d76d0af06f 100644 --- a/test/fixtures/make-test-storage.js +++ b/test/fixtures/make-test-storage.js @@ -1,4 +1,4 @@ -const ScratchStorage = require('scratch-storage'); +const {ScratchStorage} = require('scratch-storage'); const ASSET_SERVER = 'https://cdn.assets.scratch.mit.edu/'; const PROJECT_SERVER = 'https://cdn.projects.scratch.mit.edu/'; diff --git a/test/integration/offline-custom-assets.js b/test/integration/offline-custom-assets.js index 50bd9c00153..db3b752e317 100644 --- a/test/integration/offline-custom-assets.js +++ b/test/integration/offline-custom-assets.js @@ -8,7 +8,7 @@ const path = require('path'); const fs = require('fs'); const test = require('tap').test; const AdmZip = require('adm-zip'); -const ScratchStorage = require('scratch-storage'); +const {ScratchStorage} = require('scratch-storage'); const VirtualMachine = require('../../src/index'); const projectUri = path.resolve(__dirname, '../fixtures/offline-custom-assets.sb2'); diff --git a/webpack.config.js b/webpack.config.js index 40b0c7c6a2a..6eb70e9053e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -95,7 +95,7 @@ const playgroundBuilder = webBuilder.clone() } }) .addModuleRule({ - test: require.resolve('scratch-storage/src/index.js'), + test: require.resolve('scratch-storage/src/index.ts'), loader: 'expose-loader', options: { exposes: 'ScratchStorage'