feat: [UEPR-54] update to scoped dependency for scratch-gui

This commit is contained in:
MiroslavDionisiev 2025-01-28 12:59:07 +02:00
parent 46748ce9f3
commit 6634a35aec
9 changed files with 499 additions and 665 deletions

View file

@ -23,7 +23,7 @@ The scratch-www project has lots of aspects of its design that are particular to
To use it for your own project, you would have to look at all the places it makes backend calls, and
create your own backend systems to perform those functions.
The [scratch-gui](https://github.com/scratchfoundation/scratch-gui) project, on the other hand, is designed to be
The [scratch-gui](https://github.com/scratchfoundation/scratch-editor/tree/develop/packages/scratch-gui) project, on the other hand, is designed to be
able to be used by anyone, without needing to create backend systems, though it also can support
backend systems for project and asset saving.
@ -33,12 +33,12 @@ We welcome your contributions to this codebase! You may want to start by browsin
list of open issues labeled "help wanted"](https://github.com/scratchfoundation/scratch-www/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
Contributing to scratch-www can be more difficult than contributing to
[scratch-gui](https://github.com/scratchfoundation/scratch-gui). This is because scratch-gui can be run on its
[scratch-gui](https://github.com/scratchfoundation/scratch-editor/tree/develop/packages/scratch-gui). This is because scratch-gui can be run on its
own, without needing any other services to be running, while scratch-www needs to communicate
with several backend systems that the Scratch team runs (see "How this fits in with other Scratch
repos" above). If you are new to contributing to Scratch's source code, we suggest you start
by becoming familiar with scratch-gui and its [list of open issues labeled "help
wanted"](https://github.com/scratchfoundation/scratch-gui/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
wanted"](https://github.com/scratchfoundation/scratch-editor/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22).
To contribute, please follow the [standard steps for contributing to a project on
GitHub](https://github.com/firstcontributions/first-contributions).

1124
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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.1"
},
"devDependencies": {
"@babel/cli": "7.26.4",
@ -74,6 +74,7 @@
"@formatjs/intl-numberformat": "8.15.2",
"@formatjs/intl-pluralrules": "5.4.2",
"@formatjs/intl-relativetimeformat": "11.4.9",
"@scratch/scratch-gui": "^11.0.0-beta.2",
"@types/jest": "29.5.14",
"async": "3.2.6",
"autoprefixer": "10.4.20",
@ -146,7 +147,6 @@
"regenerator-runtime": "0.13.9",
"sass": "1.83.4",
"sass-loader": "10.5.2",
"scratch-gui": "5.1.33",
"scratch-l10n": "5.0.101",
"selenium-webdriver": "4.28.1",
"slick-carousel": "1.8.1",

View file

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

View file

@ -345,7 +345,7 @@ const Faq = injectIntl(props => (
id="faq.sourceCodeBody"
values={{
guiLink: (
<a href="https://github.com/LLK/scratch-gui">GitHub</a>
<a href="https://github.com/scratchfoundation/scratch-editor/tree/develop/packages/scratch-gui">GitHub</a>
),
flashLink: (
<a href="https://github.com/LLK/scratch-flash">

View file

@ -11,7 +11,7 @@ const Meta = require('./meta.jsx');
const previewActions = require('../../redux/preview.js');
const GUI = require('scratch-gui');
const GUI = require('@scratch/scratch-gui');
const IntlGUI = injectIntl(GUI.default);
class EmbedView extends React.Component {

View file

@ -8,7 +8,7 @@ const React = require('react');
const Formsy = require('formsy-react').default;
const classNames = require('classnames');
const GUI = require('scratch-gui').default;
const GUI = require('@scratch/scratch-gui').default;
const IntlGUI = injectIntl(GUI);
const AdminPanel = require('../../components/adminpanel/adminpanel.jsx');

View file

@ -34,7 +34,7 @@ const projectCommentActions = require('../../redux/project-comment-actions.js');
const frameless = require('../../lib/frameless');
const GUI = require('scratch-gui');
const GUI = require('@scratch/scratch-gui');
const IntlGUI = injectIntl(GUI.default);
const localStorageAvailable = 'localStorage' in window && window.localStorage !== null;

View file

@ -240,29 +240,25 @@ module.exports = {
{from: 'static'},
{from: 'intl', to: 'js'},
{
from: 'node_modules/scratch-gui/dist/static/blocks-media',
from: 'node_modules/@scratch/scratch-gui/dist/static/blocks-media',
to: 'static/blocks-media'
},
{
from: 'node_modules/scratch-gui/dist/chunks',
to: 'static/chunks'
from: 'node_modules/@scratch/scratch-gui/dist/chunks',
to: 'chunks'
},
{
from: 'node_modules/scratch-gui/dist/extension-worker.js',
to: 'js'
from: 'node_modules/@scratch/scratch-gui/dist/extension-worker.js'
},
{
from: 'node_modules/scratch-gui/dist/extension-worker.js.map',
to: 'js'
from: 'node_modules/@scratch/scratch-gui/dist/extension-worker.js.map'
},
{
from: 'node_modules/scratch-gui/dist/static/assets',
// TODO: why do tutorials and extension icons expect these files in `js/`?
to: 'js/static/assets'
from: 'node_modules/@scratch/scratch-gui/dist/static/assets',
to: 'static/assets'
},
{
from: 'node_modules/scratch-gui/dist/*.hex',
from: 'node_modules/@scratch/scratch-gui/dist/*.hex',
to: 'static',
flatten: true
}