Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency scratch-storage to v4 #9021

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 57 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"react-twitter-embed": "3.0.3",
"react-use": "17.6.0",
"scratch-parser": "6.0.0",
"scratch-storage": "2.3.284"
"scratch-storage": "4.0.23"
},
"devDependencies": {
"@babel/cli": "7.26.4",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/storage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ScratchStorage from 'scratch-storage';
import {ScratchStorage} from 'scratch-storage';

const PROJECT_HOST = process.env.PROJECT_HOST || 'https://projects.scratch.mit.edu';

Expand All @@ -9,7 +9,7 @@ const PROJECT_HOST = process.env.PROJECT_HOST || 'https://projects.scratch.mit.e
class Storage extends ScratchStorage {
constructor () {
super();
this.addWebSource(
this.addWebStore(
[this.AssetType.Project],
this.getProjectGetConfig.bind(this)
);
Expand Down
9 changes: 9 additions & 0 deletions test/unit/lib/storage.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import storage from '../../../src/lib/storage';

describe('unit test lib/storage.js', () => {
test('storage construction', () => {
expect(storage).toBeDefined(); // also implies the import succeeded
expect(storage.addWebSource).toBeDefined(); // method on ScratchStorage
expect(storage.setProjectToken).toBeDefined(); // method added by GUI
});
});
Loading