From 11794d885a4bcc9b6025b4140b48e7e7a21806ac Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 8 Apr 2021 10:36:56 -0400 Subject: [PATCH 1/7] Add permissions selectors and tests for studio comments --- src/redux/studio.js | 14 ++- test/unit/redux/studio.test.js | 223 ++++++++++++++++++++++----------- 2 files changed, 164 insertions(+), 73 deletions(-) diff --git a/src/redux/studio.js b/src/redux/studio.js index e4a237d8b..2a9e1f51b 100644 --- a/src/redux/studio.js +++ b/src/redux/studio.js @@ -91,8 +91,14 @@ const selectCanAddProjects = state => isCurator(state) || (selectIsSocial(state) && state.studio.openToAll); -// This isn't "canComment" since they could be muted, but comment composer handles that const selectShowCommentComposer = state => selectIsSocial(state); +const selectCanReportComment = state => selectIsSocial(state); +const selectCanRestoreComment = state => selectIsAdmin(state); +// On the project page, project owners can delete comments with a confirmation, +// and admins can delete comments without a confirmation. For now, only admins +// can delete studio comments, so the following two are the same. +const selectCanDeleteComment = state => selectIsAdmin(state); +const selectCanDeleteCommentWithoutConfirm = state => selectIsAdmin(state); // Data selectors const selectStudioId = state => state.studio.id; @@ -157,5 +163,9 @@ module.exports = { selectStudioId, selectCanEditInfo, selectCanAddProjects, - selectShowCommentComposer + selectShowCommentComposer, + selectCanDeleteComment, + selectCanDeleteCommentWithoutConfirm, + selectCanReportComment, + selectCanRestoreComment }; diff --git a/test/unit/redux/studio.test.js b/test/unit/redux/studio.test.js index f859c29dd..88194e61d 100644 --- a/test/unit/redux/studio.test.js +++ b/test/unit/redux/studio.test.js @@ -2,7 +2,11 @@ import { getInitialState as getInitialStudioState, selectCanEditInfo, selectCanAddProjects, - selectShowCommentComposer + selectShowCommentComposer, + selectCanDeleteComment, + selectCanDeleteCommentWithoutConfirm, + selectCanReportComment, + selectCanRestoreComment } from '../../../src/redux/studio'; import { @@ -11,79 +15,156 @@ import { import {sessions, studios} from '../../helpers/state-fixtures.json'; -describe('studio selectors', () => { - let state; +let state; - beforeEach(() => { - state = { - session: getInitialSessionState(), - studio: getInitialStudioState() - }; - }); +const setStateByRole = (role) => { + switch (role) { + case 'admin': + state.session = sessions.user1Admin; + break; + case 'curator': + state.studio = studios.isCurator; + state.session = sessions.user1Social; + break; + case 'manager': + state.studio = studios.isManager; + state.session = sessions.user1Social; + break; + case 'creator': + state.studio = studios.creator1; + state.session = sessions.user1Social; + break; + case 'logged in': + state.session = sessions.user1Social; + break; + case 'unconfirmed': + state.session = sessions.user1; + break; + case 'logged out': // Default state set in beforeEach + break; + default: + throw new Error('Unknown user role in test: ' + role); + } +}; - describe('studio info', () => { - test('is editable by admin', () => { - state.session = sessions.user1Admin; - expect(selectCanEditInfo(state)).toBe(true); - }); - test('is editable by managers and studio creator', () => { - state.studio = studios.isManager; - expect(selectCanEditInfo(state)).toBe(true); +beforeEach(() => { + state = { + session: getInitialSessionState(), + studio: getInitialStudioState() + }; +}); - state.studio = studios.creator1; - state.session = sessions.user1; - expect(selectCanEditInfo(state)).toBe(true); - }); - test('is not editable by curators', () => { - state.studio = studios.isCurator; - state.session = sessions.user1; - expect(selectCanEditInfo(state)).toBe(false); - }); - test('is not editable by other logged in users', () => { - state.session = sessions.user1; - expect(selectCanEditInfo(state)).toBe(false); - }); - test('is not editable by logged out users', () => { - expect(selectCanEditInfo(state)).toBe(false); - }); - }); - - describe('studio projects', () => { - test('cannot be added by admin', () => { - state.session = sessions.user1Admin; - expect(selectCanAddProjects(state)).toBe(false); - }); - test('can be added by managers and studio creator', () => { - state.studio = studios.isManager; - expect(selectCanAddProjects(state)).toBe(true); - - state.studio = studios.creator1; - state.session = sessions.user1; - expect(selectCanAddProjects(state)).toBe(true); - }); - test('can be added by curators', () => { - state.studio = studios.isCurator; - state.session = sessions.user1; - expect(selectCanAddProjects(state)).toBe(true); - }); - test('can be added by social users if studio is openToAll', () => { - state.studio = studios.openToAll; - state.session = sessions.user1Social; - expect(selectCanAddProjects(state)).toBe(true); - }); - test('cannot be added by social users if not openToAll', () => { - state.session = sessions.user1Social; - expect(selectCanAddProjects(state)).toBe(false); - }); - }); - - describe('studio comments', () => { - test('show comment composer only for social users', () => { - expect(selectShowCommentComposer(state)).toBe(false); - state.session = sessions.user1; - expect(selectShowCommentComposer(state)).toBe(false); - state.session = sessions.user1Social; - expect(selectShowCommentComposer(state)).toBe(true); +describe('studio info', () => { + describe('can edit studio info', () => { + test.each([ + ['admin', true], + ['curator', false], + ['manager', true], + ['creator', true], + ['logged in', false], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanEditInfo(state)).toBe(expected); + }); + }); +}); + +describe('studio projects', () => { + describe('can add project, not open to all', () => { + test.each([ + ['admin', false], + ['curator', true], + ['manager', true], + ['creator', true], + ['logged in', false], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanAddProjects(state)).toBe(expected); + }); + }); + + describe('can add project, open to all', () => { + test.each([ + ['logged in', true], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + state.studio.openToAll = true; + expect(selectCanAddProjects(state)).toBe(expected); + }); + }); +}); + +describe('studio comments', () => { + describe('showing comment composer', () => { + test.each([ + ['logged in', true], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectShowCommentComposer(state)).toBe(expected); + }); + }); + + describe('can report comment', () => { + test.each([ + ['logged in', true], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanReportComment(state)).toBe(expected); + }); + }); + + describe('can delete comment', () => { + test.each([ + ['admin', true], + ['curator', false], + ['manager', false], + ['creator', false], + ['logged in', false], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanDeleteComment(state)).toBe(expected); + }); + }); + + describe('can delete comment without confirmation', () => { + test.each([ + ['admin', true], + ['curator', false], + ['manager', false], + ['creator', false], + ['logged in', false], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanDeleteCommentWithoutConfirm(state)).toBe(expected); + }); + }); + + describe('can restore a comment', () => { + test.each([ + ['admin', true], + ['curator', false], + ['manager', false], + ['creator', false], + ['logged in', false], + ['unconfirmed', false], + ['logged out', false] + ])('%s: %s', (role, expected) => { + setStateByRole(role); + expect(selectCanRestoreComment(state)).toBe(expected); }); }); }); From 810eadd258e2f7aebedf1559f5ff802f66699569 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 8 Apr 2021 10:37:45 -0400 Subject: [PATCH 2/7] Remove params from studio comment actions that can be retrieved from state --- src/redux/studio-comment-actions.js | 36 +++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/src/redux/studio-comment-actions.js b/src/redux/studio-comment-actions.js index a93905af6..b3513dd01 100644 --- a/src/redux/studio-comment-actions.js +++ b/src/redux/studio-comment-actions.js @@ -31,8 +31,14 @@ const { selectStudioId } = require('./studio'); -const getReplies = (studioId, commentIds, offset, isAdmin, token) => (dispatch => { +const getReplies = (commentIds, offset) => ((dispatch, getState) => { + if (!Array.isArray(commentIds)) commentIds = [commentIds]; + dispatch(setFetchStatus('replies', Status.FETCHING)); + const state = getState(); + const studioId = selectStudioId(state); + const isAdmin = selectIsAdmin(state); + const token = selectToken(state); const fetchedReplies = {}; eachLimit(commentIds, 10, (parentId, callback) => { api({ @@ -84,7 +90,7 @@ const getTopLevelComments = () => ((dispatch, getState) => { } dispatch(setFetchStatus('comments', Status.FETCHED)); dispatch(setComments(body)); - dispatch(getReplies(id, body.map(comment => comment.id), 0, isAdmin, token)); + dispatch(getReplies(body.map(comment => comment.id), 0)); // If we loaded a full page of comments, assume there are more to load. // This will be wrong (1 / COMMENT_LIMIT) of the time, but does not require @@ -95,7 +101,11 @@ const getTopLevelComments = () => ((dispatch, getState) => { }); }); -const getCommentById = (studioId, commentId, isAdmin, token) => (dispatch => { +const getCommentById = commentId => ((dispatch, getState) => { + const state = getState(); + const studioId = selectStudioId(state); + const isAdmin = selectIsAdmin(state); + const token = selectToken(state); dispatch(setFetchStatus('comments', Status.FETCHING)); api({ uri: `${isAdmin ? '/admin' : ''}/studios/${studioId}/comments/${commentId}`, @@ -114,18 +124,20 @@ const getCommentById = (studioId, commentId, isAdmin, token) => (dispatch => { if (body.parent_id) { // If the comment is a reply, load the parent - return dispatch(getCommentById(studioId, body.parent_id, isAdmin, token)); + return dispatch(getCommentById(body.parent_id)); } // If the comment is not a reply, show it as top level and load replies dispatch(setFetchStatus('comments', Status.FETCHED)); dispatch(setComments([body])); - dispatch(getReplies(studioId, [body.id], 0, isAdmin, token)); + dispatch(getReplies(body.id, 0)); }); }); -const deleteComment = (studioId, commentId, topLevelCommentId, token) => (dispatch => { - /* TODO fetching/fetched/error states updates for comment deleting */ +const deleteComment = (commentId, topLevelCommentId) => ((dispatch, getState) => { + const state = getState(); + const studioId = selectStudioId(state); + const token = selectToken(state); api({ uri: `/proxy/comments/studio/${studioId}/comment/${commentId}`, authentication: token, @@ -144,7 +156,10 @@ const deleteComment = (studioId, commentId, topLevelCommentId, token) => (dispat }); }); -const reportComment = (studioId, commentId, topLevelCommentId, token) => (dispatch => { +const reportComment = (commentId, topLevelCommentId) => ((dispatch, getState) => { + const state = getState(); + const studioId = selectStudioId(state); + const token = selectToken(state); api({ uri: `/proxy/studio/${studioId}/comment/${commentId}/report`, authentication: token, @@ -161,7 +176,10 @@ const reportComment = (studioId, commentId, topLevelCommentId, token) => (dispat }); }); -const restoreComment = (studioId, commentId, topLevelCommentId, token) => (dispatch => { +const restoreComment = (commentId, topLevelCommentId) => ((dispatch, getState) => { + const state = getState(); + const studioId = selectStudioId(state); + const token = selectToken(state); api({ uri: `/proxy/admin/studio/${studioId}/comment/${commentId}/undelete`, authentication: token, From 74a29a62a08f96e1768ceb6a6d00dc5b067755ba Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 8 Apr 2021 10:38:34 -0400 Subject: [PATCH 3/7] Hook up delete restore and report actions for studio comments --- src/views/studio/studio-comments.jsx | 59 +++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/src/views/studio/studio-comments.jsx b/src/views/studio/studio-comments.jsx index a5e89f146..869374e0d 100644 --- a/src/views/studio/studio-comments.jsx +++ b/src/views/studio/studio-comments.jsx @@ -9,7 +9,13 @@ import ComposeComment from '../preview/comment/compose-comment.jsx'; import TopLevelComment from '../preview/comment/top-level-comment.jsx'; import studioCommentActions from '../../redux/studio-comment-actions.js'; -import {selectShowCommentComposer} from '../../redux/studio.js'; +import { + selectShowCommentComposer, + selectCanDeleteComment, + selectCanDeleteCommentWithoutConfirm, + selectCanReportComment, + selectCanRestoreComment +} from '../../redux/studio.js'; const StudioComments = ({ comments, @@ -17,10 +23,17 @@ const StudioComments = ({ handleNewComment, moreCommentsToLoad, replies, - shouldShowCommentComposer + postURI, + shouldShowCommentComposer, + canDeleteComment, + canDeleteCommentWithoutConfirm, + canReportComment, + canRestoreComment, + handleDeleteComment, + handleRestoreComment, + handleReportComment, + handleLoadMoreReplies }) => { - const {studioId} = useParams(); - useEffect(() => { if (comments.length === 0) handleLoadMoreComments(); }, []); // Only runs once after the first render @@ -31,24 +44,32 @@ const StudioComments = ({
{shouldShowCommentComposer && } {comments.map(comment => ( ))} {moreCommentsToLoad && @@ -70,19 +91,37 @@ StudioComments.propTypes = { handleNewComment: PropTypes.func, moreCommentsToLoad: PropTypes.bool, replies: PropTypes.shape({}), - shouldShowCommentComposer: PropTypes.bool + shouldShowCommentComposer: PropTypes.bool, + canDeleteComment: PropTypes.bool, + canDeleteCommentWithoutConfirm: PropTypes.bool, + canReportComment: PropTypes.bool, + canRestoreComment: PropTypes.bool, + handleDeleteComment: PropTypes.func, + handleRestoreComment: PropTypes.func, + handleReportComment: PropTypes.func, + handleLoadMoreReplies: PropTypes.func, + postURI: PropTypes.string }; - export default connect( state => ({ comments: state.comments.comments, moreCommentsToLoad: state.comments.moreCommentsToLoad, replies: state.comments.replies, - shouldShowCommentComposer: selectShowCommentComposer(state) + shouldShowCommentComposer: selectShowCommentComposer(state), + canDeleteComment: selectCanDeleteComment(state), + canDeleteCommentWithoutConfirm: selectCanDeleteCommentWithoutConfirm(state), + canReportComment: selectCanReportComment(state), + canRestoreComment: selectCanRestoreComment(state), + postURI: `/proxy/comments/studio/${state.studio.id}` }), { handleLoadMoreComments: studioCommentActions.getTopLevelComments, - handleNewComment: studioCommentActions.addNewComment + handleNewComment: studioCommentActions.addNewComment, + handleDeleteComment: studioCommentActions.deleteComment, + handleRestoreComment: studioCommentActions.restoreComment, + handleReportComment: studioCommentActions.reportComment, + handleLoadMoreReplies: studioCommentActions.getReplies + } )(StudioComments); From 7c4871c19b3b599a5549099bbf2e859545f91f7c Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 8 Apr 2021 10:57:28 -0400 Subject: [PATCH 4/7] Remove unused reference --- src/views/studio/studio-comments.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/studio/studio-comments.jsx b/src/views/studio/studio-comments.jsx index 869374e0d..df19eb94c 100644 --- a/src/views/studio/studio-comments.jsx +++ b/src/views/studio/studio-comments.jsx @@ -1,6 +1,5 @@ import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; -import {useParams} from 'react-router-dom'; import {connect} from 'react-redux'; import {FormattedMessage} from 'react-intl'; From 3a562fc05b851669aabb71d787496a7040b9d44e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 06:28:56 +0000 Subject: [PATCH 5/7] Bump scratch-l10n from 3.11.20210413031556 to 3.11.20210415031450 Bumps [scratch-l10n](https://github.com/LLK/scratch-l10n) from 3.11.20210413031556 to 3.11.20210415031450. - [Release notes](https://github.com/LLK/scratch-l10n/releases) - [Commits](https://github.com/LLK/scratch-l10n/compare/3.11.20210413031556...3.11.20210415031450) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0eebeb49d..70229ae61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -516,22 +516,10 @@ "node-releases": "^1.1.71" } }, - "caniuse-lite": { - "version": "1.0.30001208", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", - "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==", - "dev": true - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, "electron-to-chromium": { - "version": "1.3.713", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.713.tgz", - "integrity": "sha512-HWgkyX4xTHmxcWWlvv7a87RHSINEcpKYZmDMxkUlHcY+CJcfx7xEfBHuXVsO1rzyYs1WQJ7EgDp2CoErakBIow==", + "version": "1.3.717", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz", + "integrity": "sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==", "dev": true }, "semver": { @@ -21370,6 +21358,19 @@ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, + "scratch-l10n": { + "version": "3.11.20210413031556", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210413031556.tgz", + "integrity": "sha512-mmD0wvRCgkVgx7scN14CQ6NPDqaL0uT//ZFQWpp5foTBuXokXPh9jRrJ+KScCeXK7jaXMLeJa6r4q1ivpnVXGQ==", + "dev": true, + "requires": { + "@babel/cli": "^7.1.2", + "@babel/core": "^7.1.2", + "babel-plugin-react-intl": "^3.0.1", + "react-intl": "^2.8.0", + "transifex": "1.6.6" + } + }, "scratch-storage": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/scratch-storage/-/scratch-storage-1.3.3.tgz", @@ -21437,9 +21438,9 @@ } }, "scratch-l10n": { - "version": "3.11.20210413031556", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210413031556.tgz", - "integrity": "sha512-mmD0wvRCgkVgx7scN14CQ6NPDqaL0uT//ZFQWpp5foTBuXokXPh9jRrJ+KScCeXK7jaXMLeJa6r4q1ivpnVXGQ==", + "version": "3.11.20210415031450", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210415031450.tgz", + "integrity": "sha512-8C/fNxF2PtHu3ZFCB6lSkGMTUs/R/Pyyk6RpiPh1Wn5faxFKcsB0C7IuIhBwDsbWYtHcrWYTHdbBSAaQA2Ho/A==", "dev": true, "requires": { "@babel/cli": "^7.1.2", From c7148f2e5b79ed8d44cf278bccca1307ef4a8bcb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 11:05:09 +0000 Subject: [PATCH 6/7] Bump scratch-gui Bumps [scratch-gui](https://github.com/LLK/scratch-gui) from 0.1.0-prerelease.20210413191604 to 0.1.0-prerelease.20210415094805. - [Release notes](https://github.com/LLK/scratch-gui/releases) - [Commits](https://github.com/LLK/scratch-gui/compare/0.1.0-prerelease.20210413191604...0.1.0-prerelease.20210415094805) Signed-off-by: dependabot-preview[bot] --- package-lock.json | 35 +++++++++++------------------------ package.json | 2 +- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70229ae61..16346b35b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20903,9 +20903,9 @@ } }, "scratch-blocks": { - "version": "0.1.0-prerelease.20210413185056", - "resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210413185056.tgz", - "integrity": "sha512-jLEJNGpePSNMbwYHZ86auT95NU2HN0ft1Ah8ErBZttCuC+trcgpZx333cIka5eUBq5JFSyLwuPMAUBd8vRnrNw==", + "version": "0.1.0-prerelease.20210415062829", + "resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210415062829.tgz", + "integrity": "sha512-tQoVJdUb00kfBtLVyG7r1XTrtTVqSmol+cxUt0Z7IgIata9J1LOORJ/7zkEpohKMdMRE+76b2QXW/mR2I/bNAg==", "dev": true, "requires": { "exports-loader": "0.6.3", @@ -20913,9 +20913,9 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20210413191604", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210413191604.tgz", - "integrity": "sha512-1vjrMGzUMXdmbP01U72b2wFkk3PKrlsM7wppI0he9t0gIK994m2itjl82lxYQRAUOunLQfVHrO7hQvL/cgt4VA==", + "version": "0.1.0-prerelease.20210415094805", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210415094805.tgz", + "integrity": "sha512-0NaKb++BNm+WLHsvkVGp6HBJYYyysdcvhUkrCAmfWIUvOucnLx2z/rbv8xY9EhA/6DJCeybFQ0sP+Tx757d6rQ==", "dev": true, "requires": { "arraybuffer-loader": "^1.0.6", @@ -20966,8 +20966,8 @@ "redux": "3.7.2", "redux-throttle": "0.1.1", "scratch-audio": "0.1.0-prerelease.20200528195344", - "scratch-blocks": "0.1.0-prerelease.20210413185056", - "scratch-l10n": "3.11.20210413031556", + "scratch-blocks": "0.1.0-prerelease.20210415062829", + "scratch-l10n": "3.11.20210415031450", "scratch-paint": "0.2.0-prerelease.20210407203313", "scratch-render": "0.1.0-prerelease.20210325231800", "scratch-render-fonts": "1.0.0-prerelease.20210401210003", @@ -21136,9 +21136,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.716", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.716.tgz", - "integrity": "sha512-yUWKAfpJH5ovgwIlNbBHioedAWolzTVl6tmMaXP1RmCMyYv+U+ukvo9gwA10mLW0eFbyW4n/oC4UIN12gTMn/w==", + "version": "1.3.717", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz", + "integrity": "sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==", "dev": true }, "has-flag": { @@ -21358,19 +21358,6 @@ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true }, - "scratch-l10n": { - "version": "3.11.20210413031556", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210413031556.tgz", - "integrity": "sha512-mmD0wvRCgkVgx7scN14CQ6NPDqaL0uT//ZFQWpp5foTBuXokXPh9jRrJ+KScCeXK7jaXMLeJa6r4q1ivpnVXGQ==", - "dev": true, - "requires": { - "@babel/cli": "^7.1.2", - "@babel/core": "^7.1.2", - "babel-plugin-react-intl": "^3.0.1", - "react-intl": "^2.8.0", - "transifex": "1.6.6" - } - }, "scratch-storage": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/scratch-storage/-/scratch-storage-1.3.3.tgz", diff --git a/package.json b/package.json index 722167e00..ed0487a1b 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "redux-mock-store": "^1.2.3", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20210413191604", + "scratch-gui": "0.1.0-prerelease.20210415094805", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0", From 15b31ae2c2414cca29f6737f3651bfefca4d1118 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Wed, 21 Apr 2021 13:08:26 -0400 Subject: [PATCH 7/7] Roll back gui to what's in production --- package-lock.json | 114 ++++++++++++++++++---------------------------- package.json | 2 +- 2 files changed, 45 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index c139da14a..710851116 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20840,9 +20840,9 @@ } }, "scratch-blocks": { - "version": "0.1.0-prerelease.20210415062829", - "resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210415062829.tgz", - "integrity": "sha512-tQoVJdUb00kfBtLVyG7r1XTrtTVqSmol+cxUt0Z7IgIata9J1LOORJ/7zkEpohKMdMRE+76b2QXW/mR2I/bNAg==", + "version": "0.1.0-prerelease.20210324033606", + "resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20210324033606.tgz", + "integrity": "sha512-zCf7mN64RLME1tA9t2HcDEnf5h5+ziMyksbQj3gsWOUylYLrrYksMBw7wprVEMdPBJwz+4HhpcpkkrCQV1NVnw==", "dev": true, "requires": { "exports-loader": "0.6.3", @@ -20850,9 +20850,9 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20210415094805", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210415094805.tgz", - "integrity": "sha512-0NaKb++BNm+WLHsvkVGp6HBJYYyysdcvhUkrCAmfWIUvOucnLx2z/rbv8xY9EhA/6DJCeybFQ0sP+Tx757d6rQ==", + "version": "0.1.0-prerelease.20210324120840", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20210324120840.tgz", + "integrity": "sha512-6KLZfZdJLAMLBDJo/LC6f0ckUg0CefE941NvBiNmV2XOIAoMPe5gq/eX3C1JT6BDLAFw4ogw4+K1KmQX/PYibw==", "dev": true, "requires": { "arraybuffer-loader": "^1.0.6", @@ -20903,14 +20903,14 @@ "redux": "3.7.2", "redux-throttle": "0.1.1", "scratch-audio": "0.1.0-prerelease.20200528195344", - "scratch-blocks": "0.1.0-prerelease.20210415062829", - "scratch-l10n": "3.11.20210415031450", - "scratch-paint": "0.2.0-prerelease.20210407203313", - "scratch-render": "0.1.0-prerelease.20210325231800", - "scratch-render-fonts": "1.0.0-prerelease.20210401210003", + "scratch-blocks": "0.1.0-prerelease.20210324033606", + "scratch-l10n": "3.11.20210324031512", + "scratch-paint": "0.2.0-prerelease.20210319222931", + "scratch-render": "0.1.0-prerelease.20210317200605", + "scratch-render-fonts": "1.0.0-prerelease.20200507182347", "scratch-storage": "1.3.3", - "scratch-svg-renderer": "0.2.0-prerelease.20210408171934", - "scratch-vm": "0.2.0-prerelease.20210412181234", + "scratch-svg-renderer": "0.2.0-prerelease.20210317184701", + "scratch-vm": "0.2.0-prerelease.20210324111836", "startaudiocontext": "1.2.1", "style-loader": "^0.23.0", "text-encoding": "0.7.0", @@ -21296,9 +21296,9 @@ "dev": true }, "scratch-l10n": { - "version": "3.11.20210415031450", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210415031450.tgz", - "integrity": "sha512-8C/fNxF2PtHu3ZFCB6lSkGMTUs/R/Pyyk6RpiPh1Wn5faxFKcsB0C7IuIhBwDsbWYtHcrWYTHdbBSAaQA2Ho/A==", + "version": "3.11.20210324031512", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.11.20210324031512.tgz", + "integrity": "sha512-dyv2cjNWVHrL78XpW64uF2azYaUhMKLjfJVH6vSCPJxm3EKCvO6EoaUSlIAwhsGoMwgfxWZ8D74+IaifGJfnCQ==", "dev": true, "requires": { "@babel/cli": "^7.1.2", @@ -21388,9 +21388,9 @@ } }, "scratch-paint": { - "version": "0.2.0-prerelease.20210407203313", - "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-0.2.0-prerelease.20210407203313.tgz", - "integrity": "sha512-dAg+7Bh8X4PxukXnIXN1NVDELSCmPsTRh2a2taM1MGIl9zqZLTo3nxz95qZ2aC6tnVZYY/oJRjl9UAnm47Fe4g==", + "version": "0.2.0-prerelease.20210319222931", + "resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-0.2.0-prerelease.20210319222931.tgz", + "integrity": "sha512-O5tIIQ6ECsLZ3iol2S3OV3yaVyM1i6Kk0YVAR219t6GnSv1ux6RCD3qs7g8HCa+G3f+PHKBcCIk4DCR8Qv59Uw==", "dev": true, "requires": { "@scratch/paper": "0.11.20200728195508", @@ -21400,7 +21400,8 @@ "lodash.omit": "4.5.0", "minilog": "3.1.0", "parse-color": "1.0.0", - "prop-types": "^15.5.10" + "prop-types": "^15.5.10", + "scratch-render-fonts": "^1.0.0-prerelease.20210401210003" }, "dependencies": { "lodash.omit": { @@ -21423,6 +21424,15 @@ "requires": { "microee": "0.0.6" } + }, + "scratch-render-fonts": { + "version": "1.0.0-prerelease.20210401210003", + "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20210401210003.tgz", + "integrity": "sha512-sgU+LIXTLKk4f7FZOv/B61dpvmfpnlXFf912T6T4GpOfzx99JPRhXPyErZWuwPz8NEzthkhpO7iF2AqgzUxJfA==", + "dev": true, + "requires": { + "base64-loader": "1.0.0" + } } } }, @@ -21449,9 +21459,9 @@ } }, "scratch-render": { - "version": "0.1.0-prerelease.20210325231800", - "resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20210325231800.tgz", - "integrity": "sha512-hjiIHRR8SuP/8UKKZ4O+TIJaCZ2wSN6uoEM49jwNjZecAaflBvd5t/OLL3NFQp3q7Ra6ncDi+B7URy7WRdm2fg==", + "version": "0.1.0-prerelease.20210317200605", + "resolved": "https://registry.npmjs.org/scratch-render/-/scratch-render-0.1.0-prerelease.20210317200605.tgz", + "integrity": "sha512-HbWHTOX9X/jlZw0HINKfHkZ8H7GHiyqR8Cj3jKowHrH2r8bTn7K8DfT3Ql81fepMxVqqeKFPPnpvHwvDEaYWKg==", "dev": true, "requires": { "grapheme-breaker": "0.3.2", @@ -21492,15 +21502,6 @@ "microee": "0.0.6" } }, - "scratch-render-fonts": { - "version": "1.0.0-prerelease.20200507182347", - "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20200507182347.tgz", - "integrity": "sha512-tVt2s7lxsBhme9WKIZTnluMerdJVGEc80QSrDdIIzUvHXGCIYkLh6j7ytwXcyq2UsA34d93op9+I9Bh1SPkQkA==", - "dev": true, - "requires": { - "base64-loader": "1.0.0" - } - }, "scratch-storage": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/scratch-storage/-/scratch-storage-1.3.3.tgz", @@ -21516,28 +21517,6 @@ "worker-loader": "^2.0.0" } }, - "scratch-svg-renderer": { - "version": "0.2.0-prerelease.20210317184701", - "resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20210317184701.tgz", - "integrity": "sha512-drHD8kRTU//Rqgs8F6oWmBIQi6TunI86Skvp7BfM+mqalds3GzaPjZHKSCFkdkXbHO4i/zAPLvkQtMDdLm4Y6g==", - "dev": true, - "requires": { - "base64-js": "1.2.1", - "base64-loader": "1.0.0", - "dompurify": "2.1.1", - "minilog": "3.1.0", - "scratch-render-fonts": "1.0.0-prerelease.20200507182347", - "transformation-matrix": "1.15.0" - }, - "dependencies": { - "base64-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", - "dev": true - } - } - }, "text-encoding": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz", @@ -21547,9 +21526,9 @@ } }, "scratch-render-fonts": { - "version": "1.0.0-prerelease.20210401210003", - "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20210401210003.tgz", - "integrity": "sha512-sgU+LIXTLKk4f7FZOv/B61dpvmfpnlXFf912T6T4GpOfzx99JPRhXPyErZWuwPz8NEzthkhpO7iF2AqgzUxJfA==", + "version": "1.0.0-prerelease.20200507182347", + "resolved": "https://registry.npmjs.org/scratch-render-fonts/-/scratch-render-fonts-1.0.0-prerelease.20200507182347.tgz", + "integrity": "sha512-tVt2s7lxsBhme9WKIZTnluMerdJVGEc80QSrDdIIzUvHXGCIYkLh6j7ytwXcyq2UsA34d93op9+I9Bh1SPkQkA==", "dev": true, "requires": { "base64-loader": "1.0.0" @@ -21609,24 +21588,19 @@ } }, "scratch-svg-renderer": { - "version": "0.2.0-prerelease.20210408171934", - "resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20210408171934.tgz", - "integrity": "sha512-kc59fyZlJ58ooW86VQo9oqXNzpR48RH7vObehekVyPq4FMRENwtv9gCZ5XitLPNsLEheFCJdfRVPkVsMAjhPYQ==", + "version": "0.2.0-prerelease.20210317184701", + "resolved": "https://registry.npmjs.org/scratch-svg-renderer/-/scratch-svg-renderer-0.2.0-prerelease.20210317184701.tgz", + "integrity": "sha512-drHD8kRTU//Rqgs8F6oWmBIQi6TunI86Skvp7BfM+mqalds3GzaPjZHKSCFkdkXbHO4i/zAPLvkQtMDdLm4Y6g==", "dev": true, "requires": { "base64-js": "1.2.1", "base64-loader": "1.0.0", - "dompurify": "2.2.7", + "dompurify": "2.1.1", "minilog": "3.1.0", + "scratch-render-fonts": "1.0.0-prerelease.20200507182347", "transformation-matrix": "1.15.0" }, "dependencies": { - "dompurify": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz", - "integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg==", - "dev": true - }, "microee": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/microee/-/microee-0.0.6.tgz", @@ -21651,9 +21625,9 @@ "dev": true }, "scratch-vm": { - "version": "0.2.0-prerelease.20210412181234", - "resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-0.2.0-prerelease.20210412181234.tgz", - "integrity": "sha512-xhLd4GJ9O9kgPzHj4LJhOALYbR/9FJBszrnsjKoiU2ErQD3/iZwWYqsnFjHKVvqv8wo27SAmF4crjDQyEIGY+A==", + "version": "0.2.0-prerelease.20210324111836", + "resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-0.2.0-prerelease.20210324111836.tgz", + "integrity": "sha512-vOayLHJJ3ZYS2XUIVPnIMZmaW/JuazC9x32Lc/i64ZxPsQjO8pANgeUN/8A5LdEc5ZO2YG2I3JWRBLnK6o+LEw==", "dev": true, "requires": { "@vernier/godirect": "1.5.0", diff --git a/package.json b/package.json index ed0487a1b..c50ced912 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "redux-mock-store": "^1.2.3", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20210415094805", + "scratch-gui": "0.1.0-prerelease.20210324120840", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0",