fix: adapt to new scratch-storage@>=3 API

This commit is contained in:
Christopher Willis-Ford 2024-12-20 13:15:02 -08:00
parent ec47dee233
commit 4cf4e24b40
4 changed files with 4 additions and 4 deletions

View file

@ -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');

View file

@ -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/';

View file

@ -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');

View file

@ -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'