From 11d3a16cb72f6880c6ca6a55a7d3a5bca2fa6f19 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 13:27:59 +0800 Subject: [PATCH 01/13] avoid the word 'code' (#1795) --- .../GitHubAssessmentDefaultValues.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/githubAssessments/GitHubAssessmentDefaultValues.ts b/src/pages/githubAssessments/GitHubAssessmentDefaultValues.ts index 0b1255ff94..ec1468b695 100644 --- a/src/pages/githubAssessments/GitHubAssessmentDefaultValues.ts +++ b/src/pages/githubAssessments/GitHubAssessmentDefaultValues.ts @@ -15,11 +15,11 @@ Everything here is written in Markdown. This means that you can **bolden** or *italicize* text by adding asterisks. -Code-blocks can be formatted through the use of backticks: +Programs can be formatted through the use of triple backticks: \`\`\` -// This is a code example +// This is a program example \`\`\` -If you want to in-line code, rather than display a whole code-block, you can also do \`this\`. +If you want to in-line program snippets, rather than display it as a block, you can also use single backticks like \`this\`. Lists can be created by adding dashes to the start of a line: - First element @@ -48,11 +48,11 @@ Everything here is written in Markdown. This means that you can **bolden** or *italicize* text by adding asterisks. -Code-blocks can be formatted through the use of backticks: +Programs can be formatted through the use of triple backticks: \`\`\` -// This is a code example +// This is a program example \`\`\` -If you want to in-line code, rather than display a whole code-block, you can also do \`this\`. +If you want to in-line program snippets, rather than display it as a block, you can also use single backticks like \`this\`. Lists can be created by adding dashes to the start of a line: - First element @@ -67,7 +67,7 @@ It is also possible to embed images, like this: If you need a more detailed cheatsheet, please click [here](https://www.markdownguide.org/cheat-sheet/)! `; -export const defaultStarterCode = '// Your code here!\n'; +export const defaultStarterCode = '// Your program here!\n'; export const defaultMissionMetadata = { coverImage: '', From c32eaff29f09b3d744d2269ce2b72a88d5dd5f40 Mon Sep 17 00:00:00 2001 From: Samuel Fang Date: Wed, 16 Jun 2021 14:50:59 +0800 Subject: [PATCH 02/13] Fix 404 bug for SICP-JS pages (#1794) * Add symbolic links from sicp pages to index * Add newline to eof --- .github/workflows/build-development.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-development.yml b/.github/workflows/build-development.yml index b66cc76cf2..482b8b146c 100644 --- a/.github/workflows/build-development.yml +++ b/.github/workflows/build-development.yml @@ -37,12 +37,6 @@ jobs: run: | yarn install yarn run build - ln -s index.html build/playground.html - ln -s index.html build/contributors.html - ln -s index.html build/sourcecast.html - ln -s index.html build/interactive-sicp.html - # the `ln`s above are a hack to make GitHub Pages route /playground - # and /contributors etc to index, instead of 404-ing. env: REACT_APP_URL_SHORTENER_SIGNATURE: ${{ secrets.REACT_APP_URL_SHORTENER_SIGNATURE }} REACT_APP_URL_SHORTENER_DOMAIN: ${{ secrets.REACT_APP_URL_SHORTENER_DOMAIN }} @@ -60,7 +54,20 @@ jobs: PUBLIC_URL: "https://source-academy.github.io" REACT_APP_GITHUB_OAUTH_PROXY_URL: ${{ secrets.REACT_APP_GITHUB_OAUTH_PROXY_URL }} REACT_APP_GITHUB_CLIENT_ID: ${{ secrets.REACT_APP_GITHUB_CLIENT_ID }} - + - name: Create symbolic links + run: | + set -euxo pipefail + ln -s index.html build/playground.html + ln -s index.html build/contributors.html + ln -s index.html build/sourcecast.html + ln -s index.html build/interactive-sicp.html + mkdir -p build/interactive-sicp + declare -a arr=("index" "foreword" "prefaces03" "prefaces84" "prefaces96" "acknowledgements" "1" "1.1" "1.1.1" "1.1.2" "1.1.3" "1.1.4" "1.1.5" "1.1.6" "1.1.7" "1.1.8" "1.2" "1.2.1" "1.2.2" "1.2.3" "1.2.4" "1.2.5" "1.2.6" "1.3" "1.3.1" "1.3.2" "1.3.3" "1.3.4" "2" "2.1" "2.1.1" "2.1.2" "2.1.3" "2.1.4" "2.2" "2.2.1" "2.2.2" "2.2.3" "2.2.4" "2.3" "2.3.1" "2.3.2" "2.3.3" "2.3.4" "2.4" "2.4.1" "2.4.2" "2.4.3" "2.5" "2.5.1" "2.5.2" "2.5.3" "3" "3.1" "3.1.1" "3.1.2" "3.1.3" "3.2" "3.2.1" "3.2.2" "3.2.3" "3.2.4" "3.3" "3.3.1" "3.3.2" "3.3.3" "3.3.4" "3.3.5" "3.4" "3.4.1" "3.4.2" "3.5" "3.5.1" "3.5.2" "3.5.3" "3.5.4" "3.5.5" "4" "4.1" "4.1.1" "4.1.2" "4.1.3" "4.1.4" "4.1.5" "4.1.6" "4.1.7" "4.2" "4.2.1" "4.2.2" "4.2.3" "4.3" "4.3.1" "4.3.2" "4.3.3" "4.4" "4.4.1" "4.4.2" "4.4.3" "4.4.4" "5" "5.1" "5.1.1" "5.1.2" "5.1.3" "5.1.4" "5.1.5" "5.2" "5.2.1" "5.2.2" "5.2.3" "5.2.4" "5.3" "5.3.1" "5.3.2" "5.4" "5.4.1" "5.4.2" "5.4.3" "5.4.4" "5.5" "5.5.1" "5.5.2" "5.5.3" "5.5.4" "5.5.5" "5.5.6" "5.5.7" "references" "making-of") + for i in "${arr[@]}"; do + ln -s ../index.html build/interactive-sicp/$i.html + done + # the `ln`s above are a hack to make GitHub Pages route /playground + # and /contributors etc to index, instead of 404-ing. - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: From a0dcc0cf607eaee03689f12753e5236bd190f6e1 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 16:43:44 +0800 Subject: [PATCH 03/13] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 229092fd08..1be0ded5da 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The Source Academy () is an immersive online ## Getting Started -### Installation of Public Edition (playground only, no backend) +### Installation of Source Academy (deployed in GitHub Pages) 1. Install a stable version of NodeJS. The active LTS or current version should work fine. 2. Clone this repository and navigate to it using "cd" in your command line or shell tool. @@ -25,7 +25,7 @@ The Source Academy () is an immersive online In this edition, you will only see the Playground with all its tools, but no login options or homework submission features. For this edition, there is no need for "Setting up your environment". -### Installation of Course Edition +### Installation of Source Academy @ NUS 1. Install a stable version of NodeJS. The active LTS or current version should work fine. 2. Clone this repository and navigate to it using "cd" in your command line or shell tool. From 00024d7426a8042666c6333326c4b2e615c1be24 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 16:45:06 +0800 Subject: [PATCH 04/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1be0ded5da..080cf17223 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The Source Academy () is an immersive online ## Getting Started -### Installation of Source Academy (deployed in GitHub Pages) +### Installation of Source Academy (latest version [available in GitHub Pages](https://source-academy.github.io/)) 1. Install a stable version of NodeJS. The active LTS or current version should work fine. 2. Clone this repository and navigate to it using "cd" in your command line or shell tool. From 0dabd10510b12bccb7c6a11d4a86751b31447220 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 16:47:56 +0800 Subject: [PATCH 05/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 080cf17223..d41b26c171 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The Source Academy () is an immersive online In this edition, you will only see the Playground with all its tools, but no login options or homework submission features. For this edition, there is no need for "Setting up your environment". -### Installation of Source Academy @ NUS +### Installation of Source Academy @ NUS (access [latest production version here](https://sourceacademy.nus.edu.sg)) 1. Install a stable version of NodeJS. The active LTS or current version should work fine. 2. Clone this repository and navigate to it using "cd" in your command line or shell tool. From 7eb552a6b918558b923bc1fd6026dff968fbec7f Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 16:51:29 +0800 Subject: [PATCH 06/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d41b26c171..f083bd3218 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Coverage Status](https://coveralls.io/repos/github/source-academy/cadet-frontend/badge.svg?branch=master)](https://coveralls.io/github/source-academy/cadet-frontend?branch=master) [![License](https://img.shields.io/github/license/source-academy/cadet-frontend)](https://github.com/source-academy/cadet-frontend/blob/master/LICENSE) -The Source Academy () is an immersive online experiential environment for learning programming, developed in the School of Computing at the National University of Singapore. This repository houses the sources for the frontend of the Source Academy, written in ReactJS with Redux. +The Source Academy () is an immersive online experiential environment for learning programming. It is developed by a community of learners (also called "Source Academy") who use the book [Structure and Interpretation of Computer Programs, JavaScript Adaptation](https://source-academy.github.io/interactive-sicp) (SICP JS). This repository houses the sources for the frontend of the Source Academy, written in ReactJS with Redux. ## Features - Playground to write and test programs From 29e8388024a433dc06700c1dbfad48bff6a5cea5 Mon Sep 17 00:00:00 2001 From: Gokul Rajiv <34594184+gok99@users.noreply.github.com> Date: Wed, 16 Jun 2021 17:18:35 +0800 Subject: [PATCH 07/13] Fix room preview params (#1793) Co-authored-by: Tiffany Chong --- .../game/scenes/roomPreview/RoomPreview.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/features/game/scenes/roomPreview/RoomPreview.ts b/src/features/game/scenes/roomPreview/RoomPreview.ts index e0996ac8bc..77cc03706a 100644 --- a/src/features/game/scenes/roomPreview/RoomPreview.ts +++ b/src/features/game/scenes/roomPreview/RoomPreview.ts @@ -139,14 +139,15 @@ export default class RoomPreview extends Phaser.Scene { public createContext() { this.context = createContext(4, [], 'playground', 'default', { - scene: this, - phaser: Phaser, - preloadImageMap: this.preloadImageMap, - preloadSoundMap: this.preloadSoundMap, - preloadSpritesheetMap: this.preloadSpritesheetMap, - remotePath: Constants.assetsFolder, - screenSize: screenSize, - createAward: (x: number, y: number, key: ItemId) => this.createAward(x, y, key) + game: { + scene: this, + preloadImageMap: this.preloadImageMap, + preloadSoundMap: this.preloadSoundMap, + preloadSpritesheetMap: this.preloadSpritesheetMap, + remotePath: Constants.assetsFolder, + screenSize: screenSize, + createAward: (x: number, y: number, key: ItemId) => this.createAward(x, y, key) + } }); } From a617212e214ba7d3cc9774bd7ad01e5d4e5e26d5 Mon Sep 17 00:00:00 2001 From: Samuel Fang Date: Wed, 16 Jun 2021 21:27:07 +0800 Subject: [PATCH 08/13] Interactive SICP-JS: Improve readability + minor fixes (#1796) * Fix syntax highlighting webpack tree shaking issue * Fix index page text alignment * Tweak styles to increase readibility * Fix formatting of styles page * Change max-width * Fix formatting of index page * Update unit tests * Change parsing of metaphrase tag * Update adapters names * Fix figure margins * Update test snapshots * Simplify parsing of containers Co-authored-by: Martin Henz --- src/features/sicp/SourceTheme.ts | 8 +- src/features/sicp/parser/ParseJson.tsx | 20 +- .../sicp/parser/__tests__/ParseJson.tsx | 8 +- .../__snapshots__/ParseJson.tsx.snap | 230 +----------------- src/pages/sicp/Sicp.tsx | 3 +- src/pages/sicp/__tests__/Sicp.tsx | 3 +- src/pages/sicp/subcomponents/CodeSnippet.tsx | 2 +- .../sicp/subcomponents/SicpIndexPage.tsx | 3 +- .../__snapshots__/CodeSnippet.tsx.snap | 4 +- .../__snapshots__/SicpIndexPage.tsx.snap | 2 +- src/styles/_sicp.scss | 49 +++- 11 files changed, 77 insertions(+), 255 deletions(-) diff --git a/src/features/sicp/SourceTheme.ts b/src/features/sicp/SourceTheme.ts index 30ef8660a2..fe2cd04dcd 100644 --- a/src/features/sicp/SourceTheme.ts +++ b/src/features/sicp/SourceTheme.ts @@ -2,10 +2,12 @@ * Source Theme for use with react-syntax-highlighter. * Tries to match the Source Theme for Ace Editor in js-slang */ +const SourceThemeBackground = '#2c3e50'; + export const SourceTheme = { 'code[class*="language-"]': { color: 'white', - background: '#2c3e50', + background: SourceThemeBackground, fontFamily: "'Inconsolata', 'Consolas', monospace", textAlign: 'left', whiteSpace: 'pre', @@ -24,7 +26,7 @@ export const SourceTheme = { }, 'pre[class*="language-"]': { color: 'white', - background: '#2c3e50', + background: SourceThemeBackground, fontFamily: "'Inconsolata', 'Consolas', monospace", textAlign: 'left', whiteSpace: 'pre', @@ -45,7 +47,7 @@ export const SourceTheme = { borderRadius: '0.3em' }, ':not(pre) > code[class*="language-"]': { - background: '#2c3e50', + background: SourceThemeBackground, padding: '0.1em', borderRadius: '0.3em', whiteSpace: 'normal' diff --git a/src/features/sicp/parser/ParseJson.tsx b/src/features/sicp/parser/ParseJson.tsx index 60bd6c2ba3..70931a43d8 100644 --- a/src/features/sicp/parser/ParseJson.tsx +++ b/src/features/sicp/parser/ParseJson.tsx @@ -116,7 +116,7 @@ const handleFigure = (obj: JsonType, refs: React.MutableRefObject<{}>) => (
(refs.current[obj['id']!] = ref)} className="sicp-figure"> {handleImage(obj, refs)} {obj['captionName'] && ( -
+
{obj['captionName']} {parseArr(obj['captionBody']!, refs)}
@@ -127,7 +127,7 @@ const handleFigure = (obj: JsonType, refs: React.MutableRefObject<{}>) => ( const handleImage = (obj: JsonType, refs: React.MutableRefObject<{}>) => { if (obj['src']) { return ( -
+
{obj['src'] && ( ) => { ); }; +const handleReference = (obj: JsonType, refs: React.MutableRefObject<{}>) => { + return
{parseArr(obj['child']!, refs)}
; +}; + const handleText = (text: string) => { return

{text}

; }; @@ -221,19 +225,13 @@ export const processingFunctions = { LaTeX: (_obj: JsonType, _refs: React.MutableRefObject<{}>) => handleText('LaTeX'), - MATTER: handleContainer, - META: (obj: JsonType, _refs: React.MutableRefObject<{}>) => {obj['body']}, - METAPHRASE: (obj: JsonType, _refs: React.MutableRefObject<{}>) =>

⟨ ⟩

, - OL: (obj: JsonType, refs: React.MutableRefObject<{}>) =>
    {parseArr(obj['child']!, refs)}
, REF: handleRef, - REFERENCE: handleContainer, - - REFERENCES: handleContainer, + REFERENCE: handleReference, SECTION: handleContainer, @@ -245,8 +243,6 @@ export const processingFunctions = { ), - SUBSECTION: handleContainer, - SUBSUBHEADING: (obj: JsonType, refs: React.MutableRefObject<{}>) => (

(refs.current[obj['id']!] = ref)}>
@@ -254,8 +250,6 @@ export const processingFunctions = {

), - SUBSUBSECTION: handleContainer, - TABLE: (obj: JsonType, refs: React.MutableRefObject<{}>) => ( {obj['child']!.map((x, index) => handleTR(x, refs, index))} diff --git a/src/features/sicp/parser/__tests__/ParseJson.tsx b/src/features/sicp/parser/__tests__/ParseJson.tsx index f494d79e85..c9864ae112 100644 --- a/src/features/sicp/parser/__tests__/ParseJson.tsx +++ b/src/features/sicp/parser/__tests__/ParseJson.tsx @@ -7,16 +7,16 @@ import { JsonType, parseArr, ParseJsonError, parseObj, processingFunctions } fro // Tags to process const headingTags = ['SUBHEADING', 'SUBSUBHEADING']; -const sectionTags = ['SECTION', 'SUBSECTION', 'SUBSUBSECTION', 'MATTER', 'CHAPTER', 'REFERENCES']; const listTags = ['OL', 'UL']; const symbolTags = ['BR', 'LaTeX', 'TeX']; -const stylingTags = ['B', 'EM', 'JAVASCRIPTINLINE', 'TT', 'METAPHRASE', 'META']; +const stylingTags = ['B', 'EM', 'JAVASCRIPTINLINE', 'TT', 'META']; const latexTags = ['LATEX', 'LATEXINLINE']; const linkTags = ['LINK', 'REF', 'FOOTNOTE_REF']; const epigraphTag = 'EPIGRAPH'; const tableTag = 'TABLE'; const exerciseTag = 'EXERCISE'; +const sectionTag = 'SECTION'; const snippetTag = 'SNIPPET'; const figureTag = 'FIGURE'; const displayFootnoteTag = 'DISPLAYFOOTNOTE'; @@ -79,12 +79,12 @@ describe('Parse heading', () => { }); describe('Parse section', () => { - const tags = sectionTags; + const tag = sectionTag; const text = { tag: 'TEXT', child: [mockData['text'], mockData['text']] }; const content = [text, text]; const obj = { body: 'Title', child: content }; - tags.forEach(x => testTagSuccessful(obj, x)); + testTagSuccessful(obj, tag); }); describe('Parse list', () => { diff --git a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap index d179dfee81..379346bc6d 100644 --- a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap +++ b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap @@ -127,10 +127,10 @@ exports[`Parse exercise EXERCISE without solution successful 1`] = ` exports[`Parse figures FIGURE with image and scale successful 1`] = ` "
-
+
\\"id\\"
-
+
name

@@ -143,10 +143,10 @@ exports[`Parse figures FIGURE with image and scale successful 1`] = ` exports[`Parse figures FIGURE with image successful 1`] = ` "

-
+
\\"id\\"
-
+
name

@@ -160,7 +160,7 @@ exports[`Parse figures FIGURE with image successful 1`] = ` exports[`Parse figures FIGURE with snippet successful 1`] = ` "

-
+
name

@@ -209,7 +209,7 @@ exports[`Parse figures FIGURE with table successful 1`] = `

-
+
name

@@ -352,133 +352,11 @@ exports[`Parse object successful 1`] = ` exports[`Parse reference REFERENCE successful 1`] = ` "

-
- -

- Mock Text -

-
-
-
" -`; - -exports[`Parse section CHAPTER successful 1`] = ` -"
- - Title - -
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
-
-
" -`; - -exports[`Parse section MATTER successful 1`] = ` -"
- - Title - -
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
-
-
" -`; - -exports[`Parse section REFERENCES successful 1`] = ` -"
- - Title - -
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
-
+ +

+ Mock Text +

+
" `; @@ -522,86 +400,6 @@ exports[`Parse section SECTION successful 1`] = `
" `; -exports[`Parse section SUBSECTION successful 1`] = ` -"
- - Title - -
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
-
-
" -`; - -exports[`Parse section SUBSUBSECTION successful 1`] = ` -"
- - Title - -
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
- -
- -

- Mock Text -

-
- -

- Mock Text -

-
-
-
-
-
-
" -`; - exports[`Parse snippet SNIPPET no eval successful 1`] = ` " @@ -660,12 +458,6 @@ exports[`Parse styling JAVASCRIPTINLINE successful 1`] = `""`; -exports[`Parse styling METAPHRASE successful 1`] = ` -"

- &langle; &rangle; -

" -`; - exports[`Parse styling TT successful 1`] = ` " diff --git a/src/pages/sicp/Sicp.tsx b/src/pages/sicp/Sicp.tsx index c3674bcc33..d52dd52be8 100644 --- a/src/pages/sicp/Sicp.tsx +++ b/src/pages/sicp/Sicp.tsx @@ -81,7 +81,6 @@ const Sicp: React.FC = props => { setLoading(true); if (section === 'index') { - setData(); setLoading(false); return; } @@ -154,6 +153,8 @@ const Sicp: React.FC = props => { {loading ? (
{loadingComponent}
+ ) : section === 'index' ? ( + ) : (
{data}
)} diff --git a/src/pages/sicp/__tests__/Sicp.tsx b/src/pages/sicp/__tests__/Sicp.tsx index 658eba16e5..b326924b03 100644 --- a/src/pages/sicp/__tests__/Sicp.tsx +++ b/src/pages/sicp/__tests__/Sicp.tsx @@ -35,7 +35,6 @@ describe('Sicp renders', () => { ); const wrapper = mount(sicp); - const display = wrapper.find('.sicp-content'); - expect(display.prop('children')).toEqual(); + expect(wrapper.contains()).toBeTruthy(); }); }); diff --git a/src/pages/sicp/subcomponents/CodeSnippet.tsx b/src/pages/sicp/subcomponents/CodeSnippet.tsx index be7db8784c..645377113f 100644 --- a/src/pages/sicp/subcomponents/CodeSnippet.tsx +++ b/src/pages/sicp/subcomponents/CodeSnippet.tsx @@ -3,7 +3,7 @@ import { HighlightRulesSelector, ModeSelector } from 'js-slang/dist/editors/ace/ import { Resizable } from 're-resizable'; import * as React from 'react'; import { useMediaQuery } from 'react-responsive'; -import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter'; +import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter'; import ControlBar from 'src/commons/controlBar/ControlBar'; import { ControlBarCloseButton } from 'src/commons/controlBar/ControlBarCloseButton'; import { ControlBarShowDependenciesButton } from 'src/commons/controlBar/ControlBarShowDependenciesButton'; diff --git a/src/pages/sicp/subcomponents/SicpIndexPage.tsx b/src/pages/sicp/subcomponents/SicpIndexPage.tsx index 3cb63a2e22..f20ee6bcf8 100644 --- a/src/pages/sicp/subcomponents/SicpIndexPage.tsx +++ b/src/pages/sicp/subcomponents/SicpIndexPage.tsx @@ -6,8 +6,7 @@ import SicpToc from './SicpToc'; const originalAuthors = 'Harold Abelson and Gerald Jay Sussman'; const originalWithAuthors = 'with Julie Sussman'; const adaptedAuthors = 'Martin Henz and Tobias Wrigstad'; -const adaptedWithAuthors = - 'with Chan Ger Hean, He Xinyue, Liu Hang, Feng Piaopiao, Jolyn Tan and Wang Qian'; +const adaptedWithAuthors = 'with Samuel Fang'; const authors = (
diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap index e85f20c92e..1c19375f15 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap @@ -2,9 +2,9 @@ exports[`Sicp Code Snippet renders correctly 1`] = ` "
- + 1+1; - + 2 diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap index ca1eb627e6..72f910f7bb 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap @@ -38,7 +38,7 @@ exports[`Sicp index page 1`] = `

- with Chan Ger Hean, He Xinyue, Liu Hang, Feng Piaopiao, Jolyn Tan and Wang Qian + with Samuel Fang — adapters to JavaScript diff --git a/src/styles/_sicp.scss b/src/styles/_sicp.scss index a43cf3e010..a747d5d592 100644 --- a/src/styles/_sicp.scss +++ b/src/styles/_sicp.scss @@ -7,9 +7,11 @@ $sicp-background-color: #ffffff; color: $sicp-text-color; overflow: auto; background-color: $sicp-background-color; + font-size: 1.5em; + line-height: 2; @media only screen and (max-width: 768px) { - font-size: 1em; + font-size: 1.2em; } mjx-container, @@ -34,8 +36,8 @@ $sicp-background-color: #ffffff; .sicp-content { margin: 1em auto; - padding: 0 5em; - max-width: 1300px; + padding: 0 6em; + max-width: 1050px; height: fit-content; background-color: $sicp-background-color; @@ -49,7 +51,7 @@ $sicp-background-color: #ffffff; } @media only screen and (max-width: 768px) { - padding: 0 1em; + padding: 0 1.2em; } } @@ -58,7 +60,15 @@ $sicp-background-color: #ffffff; } .sicp-index-page { - > h1, + max-width: 1400px; + margin: 1em auto; + padding: 0 1em; + + h1, + h2 { + text-align: right; + } + > h2, > .sicp-licenses { text-align: center; @@ -74,6 +84,7 @@ $sicp-background-color: #ffffff; flex-flow: column nowrap; text-align: right; align-items: flex-end; + font-size: smaller; > .sicp-authors { max-width: 500px; @@ -104,6 +115,26 @@ $sicp-background-color: #ffffff; } } } + + @media only screen and (max-width: 768px) { + h1, + h2, + h4, + h5 { + text-align: left; + } + + > .sicp-cover { + .sicp-cover-text { + align-items: flex-start; + text-align: left; + } + } + + > h2 { + text-align: center; + } + } } .sicp-code-snippet { @@ -149,8 +180,12 @@ $sicp-background-color: #ffffff; } .sicp-figure { - margin: auto; - text-align: center; + margin: 45px auto 25px auto; + + > .sicp-caption { + margin: 15px auto; + text-align: center; + } } // text container From 34ba7012b5dae9b6588ba820b55ca2a6587976d2 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Wed, 16 Jun 2021 21:52:19 +0800 Subject: [PATCH 09/13] Urls for textbook updated (#1797) * textbook urls updated * textbook urls updated * tests updated * yarn updated * Update url * Change comment to lowercase * Fix formatting for prettier * Fix failing snapshots * Fix failing test snapshots Co-authored-by: Samuel Fang --- .env.example | 2 +- .../__tests__/__snapshots__/Markdown.tsx.snap | 2 +- .../SideContentEnvVisualizer.tsx.snap | 2 +- src/commons/utils/Constants.ts | 12 +- src/features/sicp/parser/ParseJson.tsx | 14 +- .../sicp/parser/__tests__/ParseJson.tsx | 2 +- .../__snapshots__/ParseJson.tsx.snap | 8 +- src/pages/sicp/Sicp.tsx | 2 +- src/styles/_sicp.scss | 3 + yarn.lock | 316 +++++++++--------- 10 files changed, 179 insertions(+), 184 deletions(-) diff --git a/.env.example b/.env.example index 0d4398b8a9..aca7e27b54 100644 --- a/.env.example +++ b/.env.example @@ -53,4 +53,4 @@ REACT_APP_CADET_LOGGER= REACT_APP_CADET_LOGGER_INTERVAL=10000 # Link to interative-sicp -REACT_APP_INTERACTIVE_SICP_URL="http://127.0.0.1:8080/" +REACT_APP_INTERACTIVE_SICP_DATA_URL="http://127.0.0.1:8080/" diff --git a/src/commons/__tests__/__snapshots__/Markdown.tsx.snap b/src/commons/__tests__/__snapshots__/Markdown.tsx.snap index 5505ba72e2..7dc4c37d2f 100644 --- a/src/commons/__tests__/__snapshots__/Markdown.tsx.snap +++ b/src/commons/__tests__/__snapshots__/Markdown.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Markdown page renders correctly 1`] = ` -" +"

" `; diff --git a/src/commons/sideContent/__tests__/__snapshots__/SideContentEnvVisualizer.tsx.snap b/src/commons/sideContent/__tests__/__snapshots__/SideContentEnvVisualizer.tsx.snap index 24f5a070f6..cad1678202 100644 --- a/src/commons/sideContent/__tests__/__snapshots__/SideContentEnvVisualizer.tsx.snap +++ b/src/commons/sideContent/__tests__/__snapshots__/SideContentEnvVisualizer.tsx.snap @@ -11,7 +11,7 @@ exports[`EnvVisualizer component renders correctly 1`] = `
The environment model diagram follows a notation introduced in - + Structure and Interpretation of Computer Programs, JavaScript Adaptation, Chapter 3, Section 2 diff --git a/src/commons/utils/Constants.ts b/src/commons/utils/Constants.ts index b92537d3b0..4af409aa82 100644 --- a/src/commons/utils/Constants.ts +++ b/src/commons/utils/Constants.ts @@ -31,8 +31,8 @@ const googleApiKey = process.env.REACT_APP_GOOGLE_API_KEY; const googleAppId = process.env.REACT_APP_GOOGLE_APP_ID; const githubClientId = process.env.REACT_APP_GITHUB_CLIENT_ID || ''; const githubOAuthProxyUrl = process.env.REACT_APP_GITHUB_OAUTH_PROXY_URL || ''; -const interactiveSicpUrl = - process.env.REACT_APP_INTERACTIVE_SICP_URL || 'https://source-academy.github.io/sicp/'; +const interactiveSicpDataUrl = + process.env.REACT_APP_INTERACTIVE_SICP_DATA_URL || 'https://source-academy.github.io/sicp/'; // data for interactive-sicp (images and json files) const authProviders: Map = new Map(); @@ -80,9 +80,9 @@ export enum Links { sourceDocs = 'https://source-academy.github.io/source/', techSVC = 'mailto:techsvc@comp.nus.edu.sg', techSVCNumber = '6516 2736', - textbook = 'https://source-academy.github.io/sicp/', - textbookChapter2_2 = 'https://source-academy.github.io/sicp/chapters/2.2.html', - textbookChapter3_2 = 'https://source-academy.github.io/sicp/chapters/3.2.html', + textbook = 'https://source-academy.github.io/interactive-sicp/', + textbookChapter2_2 = 'https://source-academy.github.io/interactive-sicp/2.2', + textbookChapter3_2 = 'https://source-academy.github.io/interactive-sicp/3.2', aceHotkeys = 'https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts', sourceHotkeys = 'https://github.com/source-academy/cadet-frontend/wiki/Source-Academy-Keyboard-Shortcuts', @@ -127,7 +127,7 @@ const Constants = { sharedbBackendUrl, disablePeriods, cadetLoggerInterval, - interactiveSicpUrl + interactiveSicpDataUrl }; export default Constants; diff --git a/src/features/sicp/parser/ParseJson.tsx b/src/features/sicp/parser/ParseJson.tsx index 70931a43d8..48c9cee996 100644 --- a/src/features/sicp/parser/ParseJson.tsx +++ b/src/features/sicp/parser/ParseJson.tsx @@ -127,15 +127,11 @@ const handleFigure = (obj: JsonType, refs: React.MutableRefObject<{}>) => ( const handleImage = (obj: JsonType, refs: React.MutableRefObject<{}>) => { if (obj['src']) { return ( -
- {obj['src'] && ( - {obj['id']} - )} -
+ {obj['id']} ); } else if (obj['snippet']) { return processingFunctions['SNIPPET'](obj['snippet'], refs); diff --git a/src/features/sicp/parser/__tests__/ParseJson.tsx b/src/features/sicp/parser/__tests__/ParseJson.tsx index c9864ae112..cfa4e0c45d 100644 --- a/src/features/sicp/parser/__tests__/ParseJson.tsx +++ b/src/features/sicp/parser/__tests__/ParseJson.tsx @@ -28,7 +28,7 @@ jest.mock('src/commons/utils/Constants', () => ({ Links: { sourceDocs: '' }, - interactiveSicpUrl: 'source-academy.github.io/sicp/' + interactiveSicpDataUrl: 'https://source-academy.github.io/sicp/' })); const mockData = { diff --git a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap index 379346bc6d..4ea435daff 100644 --- a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap +++ b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap @@ -127,9 +127,7 @@ exports[`Parse exercise EXERCISE without solution successful 1`] = ` exports[`Parse figures FIGURE with image and scale successful 1`] = ` "
-
- \\"id\\" -
+ \\"id\\"
name @@ -143,9 +141,7 @@ exports[`Parse figures FIGURE with image and scale successful 1`] = ` exports[`Parse figures FIGURE with image successful 1`] = ` "
-
- \\"id\\" -
+ \\"id\\"
name diff --git a/src/pages/sicp/Sicp.tsx b/src/pages/sicp/Sicp.tsx index d52dd52be8..d80d034c0d 100644 --- a/src/pages/sicp/Sicp.tsx +++ b/src/pages/sicp/Sicp.tsx @@ -13,7 +13,7 @@ import SicpIndexPage from './subcomponents/SicpIndexPage'; type SicpProps = RouteComponentProps<{}>; -const baseUrl = Constants.interactiveSicpUrl + '/json/'; +const baseUrl = Constants.interactiveSicpDataUrl + '/json/'; const extension = '.json'; // Context to determine which code snippet is active diff --git a/src/styles/_sicp.scss b/src/styles/_sicp.scss index a747d5d592..35d9649f60 100644 --- a/src/styles/_sicp.scss +++ b/src/styles/_sicp.scss @@ -181,6 +181,9 @@ $sicp-background-color: #ffffff; .sicp-figure { margin: 45px auto 25px auto; + display: flex; + flex-flow: column nowrap; + align-items: center; > .sicp-caption { margin: 15px auto; diff --git a/yarn.lock b/yarn.lock index 8ef23dc27c..97a09e8968 100644 --- a/yarn.lock +++ b/yarn.lock @@ -51,16 +51,16 @@ source-map "^0.5.0" "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.5", "@babel/core@^7.8.4": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.5.tgz#d281f46a9905f07d1b3bf71ead54d9c7d89cb1e3" - integrity sha512-RN/AwP2DJmQTZSfiDaD+JQQ/J99KsIpOCfBE5pL+5jJSt7nI3nYGoAXZu+ffYSQ029NLs2DstZb+eR81uuARgg== + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" + integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== dependencies: "@babel/code-frame" "^7.14.5" "@babel/generator" "^7.14.5" "@babel/helper-compilation-targets" "^7.14.5" "@babel/helper-module-transforms" "^7.14.5" - "@babel/helpers" "^7.14.5" - "@babel/parser" "^7.14.5" + "@babel/helpers" "^7.14.6" + "@babel/parser" "^7.14.6" "@babel/template" "^7.14.5" "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" @@ -105,10 +105,10 @@ browserslist "^4.16.6" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.5.tgz#8842ec495516dd1ed8f6c572be92ba78b1e9beef" - integrity sha512-Uq9z2e7ZtcnDMirRqAGLRaLwJn+Lrh388v5ETrR3pALJnElVh2zqQmdbz4W2RUJYohAPh2mtyPUgyMHMzXMncQ== +"@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.14.5", "@babel/helper-create-class-features-plugin@^7.14.6": + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz#f114469b6c06f8b5c59c6c4e74621f5085362542" + integrity sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg== dependencies: "@babel/helper-annotate-as-pure" "^7.14.5" "@babel/helper-function-name" "^7.14.5" @@ -269,10 +269,10 @@ "@babel/traverse" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/helpers@^7.12.1", "@babel/helpers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.5.tgz#4870f8d9a6fdbbd65e5674a3558b4ff7fef0d9b2" - integrity sha512-xtcWOuN9VL6nApgVHtq3PPcQv5qFBJzoSZzJ/2c0QK/IP/gxVcoWSNQwFEGvmbQsuS9rhYqjILDGGXcTkA705Q== +"@babel/helpers@^7.12.1", "@babel/helpers@^7.14.6": + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" + integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== dependencies: "@babel/template" "^7.14.5" "@babel/traverse" "^7.14.5" @@ -287,10 +287,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.3", "@babel/parser@^7.14.5", "@babel/parser@^7.7.0": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.5.tgz#4cd2f346261061b2518873ffecdf1612cb032829" - integrity sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.3", "@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.7.0": + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.6.tgz#d85cc68ca3cac84eae384c06f032921f5227f4b2" + integrity sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ== "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.14.5": version "7.14.5" @@ -895,9 +895,9 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-spread@^7.12.1", "@babel/plugin-transform-spread@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.5.tgz#bd269fb4119754d2ce7f4cc39a96b4f71baae356" - integrity sha512-/3iqoQdiWergnShZYl0xACb4ADeYCJ7X/RgmwtXshn6cIvautRPAFzhd58frQlokLO6Jb4/3JXvmm6WNTPtiTw== + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz#6bd40e57fe7de94aa904851963b5616652f73144" + integrity sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.14.5" @@ -924,11 +924,11 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-typescript@^7.12.1": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.5.tgz#5b41b59072f765bd1ec1d0b694e08c7df0f6f8a0" - integrity sha512-cFD5PKp4b8/KkwQ7h71FdPXFvz1RgwTFF9akRZwFldb9G0AHf7CgoPx96c4Q/ZVjh6V81tqQwW5YiHws16OzPg== + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz#6e9c2d98da2507ebe0a883b100cde3c7279df36c" + integrity sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA== dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.5" + "@babel/helper-create-class-features-plugin" "^7.14.6" "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript" "^7.14.5" @@ -1143,9 +1143,9 @@ "@babel/plugin-transform-typescript" "^7.12.1" "@babel/runtime-corejs3@^7.10.2": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.5.tgz#0d9bf00d59c0b73185c462c323efffd0f4c37283" - integrity sha512-cBbwXj3F2xjnQJ0ERaFRLjxhUSBYsQPXJ7CERz/ecx6q6hzQ99eTflAPFC3ks4q/IG4CWupNVdflc4jlFBJVsg== + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.14.6.tgz#066b966eda40481740180cb3caab861a3f208cd3" + integrity sha512-Xl8SPYtdjcMoCsIM4teyVRg7jIcgl8F2kRtoCcXuHzXswt9UxZCS6BzRo8fcnCuP6u2XtPgvyonmEPF57Kxo9Q== dependencies: core-js-pure "^3.14.0" regenerator-runtime "^0.13.4" @@ -1158,9 +1158,9 @@ regenerator-runtime "^0.13.4" "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.5.tgz#665450911c6031af38f81db530f387ec04cd9a98" - integrity sha512-121rumjddw9c3NCQ55KGkyE1h/nzWhU/owjhw0l4mQrkzz4x9SGS1X8gFLraHwX7td3Yo4QTL+qj0NcIzN87BA== + version "7.14.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.6.tgz#535203bc0892efc7dec60bdc27b2ecf6e409062d" + integrity sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg== dependencies: regenerator-runtime "^0.13.4" @@ -1587,14 +1587,14 @@ dependencies: "@octokit/types" "^6.0.3" -"@octokit/core@^3.2.3": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.4.0.tgz#b48aa27d755b339fe7550548b340dcc2b513b742" - integrity sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg== +"@octokit/core@^3.5.0": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" + integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== dependencies: "@octokit/auth-token" "^2.4.4" "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.4.12" + "@octokit/request" "^5.6.0" "@octokit/request-error" "^2.0.5" "@octokit/types" "^6.0.3" before-after-hook "^2.2.0" @@ -1610,11 +1610,11 @@ universal-user-agent "^6.0.0" "@octokit/graphql@^4.5.8": - version "4.6.3" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.3.tgz#4dc90e29e19e2771a7e4c8e9bbeebd6118f71687" - integrity sha512-ww2fYpuPPWhlKENk7g3Ynbqm6R5zqXOnbXuyELCiM/zjZq+hMlNOsiV/LgwCH81+i5FkeZA/IB/BgWGoAuXJwA== + version "4.6.4" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.6.4.tgz#0c3f5bed440822182e972317122acb65d311a5ed" + integrity sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg== dependencies: - "@octokit/request" "^5.3.0" + "@octokit/request" "^5.6.0" "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" @@ -1643,33 +1643,33 @@ "@octokit/types" "^6.16.2" deprecation "^2.3.1" -"@octokit/request-error@^2.0.0", "@octokit/request-error@^2.0.5": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.6.tgz#418ce0bb69e1d984da26adcbe50e55a289cb4f9e" - integrity sha512-oGQkw2/m+bVUM8h5xO8qDWDELgTKvWy6MwM5kjJyibnQBO09TXHgodB4ym7JVrFDHkQSWt47UeP9GsE8a6Fj3Q== +"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" + integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== dependencies: "@octokit/types" "^6.0.3" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.3.0", "@octokit/request@^5.4.12": - version "5.5.0" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.5.0.tgz#6588c532255b8e71886cefa0d2b64b4ad73bf18c" - integrity sha512-jxbMLQdQ3heFMZUaTLSCqcKs2oAHEYh7SnLLXyxbZmlULExZ/RXai7QUWWFKowcGGPlCZuKTZg0gSKHWrfYEoQ== +"@octokit/request@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.0.tgz#6084861b6e4fa21dc40c8e2a739ec5eff597e672" + integrity sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA== dependencies: "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.0.0" + "@octokit/request-error" "^2.1.0" "@octokit/types" "^6.16.1" is-plain-object "^5.0.0" node-fetch "^2.6.1" universal-user-agent "^6.0.0" "@octokit/rest@^18.5.6": - version "18.5.6" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.5.6.tgz#8c9a7c9329c7bbf478af20df78ddeab0d21f6d89" - integrity sha512-8HdG6ZjQdZytU6tCt8BQ2XLC7EJ5m4RrbyU/EARSkAM1/HP3ceOzMG/9atEfe17EDMer3IVdHWLedz2wDi73YQ== + version "18.6.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.6.0.tgz#9a8457374c78c2773d3ab3f50aaffc62f3ed4f76" + integrity sha512-MdHuXHDJM7e5sUBe3K9tt7th0cs4csKU5Bb52LRi2oHAeIMrMZ4XqaTrEv660HoUPoM1iDlnj27Ab/Nh3MtwlA== dependencies: - "@octokit/core" "^3.2.3" + "@octokit/core" "^3.5.0" "@octokit/plugin-paginate-rest" "^2.6.2" "@octokit/plugin-request-log" "^1.0.2" "@octokit/plugin-rest-endpoint-methods" "5.3.1" @@ -1771,55 +1771,55 @@ picomatch "^2.2.2" "@sentry/browser@^6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.6.0.tgz#1222c326593f0eecc68fb10e38bafce5fe4244f6" - integrity sha512-+FBGintTWlO/war3umfyHw2KoodWQFkMbMaudrkHfDgr2aRj8VAF7uWCW9V4XFT5Q7d1fMDvyUWG2C+SyPDBug== + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.7.1.tgz#e01144a08984a486ecc91d7922cc457e9c9bd6b7" + integrity sha512-R5PYx4TTvifcU790XkK6JVGwavKaXwycDU0MaAwfc4Vf7BLm5KCNJCsDySu1RPAap/017MVYf54p6dWvKiRviA== dependencies: - "@sentry/core" "6.6.0" - "@sentry/types" "6.6.0" - "@sentry/utils" "6.6.0" + "@sentry/core" "6.7.1" + "@sentry/types" "6.7.1" + "@sentry/utils" "6.7.1" tslib "^1.9.3" -"@sentry/core@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.6.0.tgz#51661d2dd5023d6cd07467422de1854282ced7e5" - integrity sha512-EjdeT6paAdxAZgfsVCB8wneahQF3nAUt9GxOJxaOBUv8BSc3HQ/svcTU3RU7k8YsP26PseEOIsedaxsEVZ+7og== +"@sentry/core@6.7.1": + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.7.1.tgz#c3aaa6415d06bec65ac446b13b84f073805633e3" + integrity sha512-VAv8OR/7INn2JfiLcuop4hfDcyC7mfL9fdPndQEhlacjmw8gRrgXjR7qyhnCTgzFLkHI7V5bcdIzA83TRPYQpA== dependencies: - "@sentry/hub" "6.6.0" - "@sentry/minimal" "6.6.0" - "@sentry/types" "6.6.0" - "@sentry/utils" "6.6.0" + "@sentry/hub" "6.7.1" + "@sentry/minimal" "6.7.1" + "@sentry/types" "6.7.1" + "@sentry/utils" "6.7.1" tslib "^1.9.3" -"@sentry/hub@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.6.0.tgz#1b9fa22ee104b7d6afd2dc4c40a1459fda259366" - integrity sha512-1Yw0kbxcvO7njZUDGvCKB6DxU5jQio7Be3Kx5qxwcx8ojpT9lo9p+IYZajgl6zQqkjjbVm/4SoYqU24ozu5vxw== +"@sentry/hub@6.7.1": + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-6.7.1.tgz#d46d24deec67f0731a808ca16796e6765b371bc1" + integrity sha512-eVCTWvvcp6xa0A5GGNHMQEWslmKPlisE5rGmsV/kjvSUv3zSrI0eIDfb51ikdnCiBjHpK2NBWP8Vy8cZOEJegg== dependencies: - "@sentry/types" "6.6.0" - "@sentry/utils" "6.6.0" + "@sentry/types" "6.7.1" + "@sentry/utils" "6.7.1" tslib "^1.9.3" -"@sentry/minimal@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.6.0.tgz#48684734e3c380e5e63a9357d05f0c18bae84419" - integrity sha512-xVBlZIDxSvHvNdvD5KmjTf8Xgi78vLpT4xqJaDUkW7B+DqWMVJZe5aUdQmcp7X/zWxctBwyMKsdHO7oiHkpS+Q== +"@sentry/minimal@6.7.1": + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-6.7.1.tgz#babf85ee2f167e9dcf150d750d7a0b250c98449c" + integrity sha512-HDDPEnQRD6hC0qaHdqqKDStcdE1KhkFh0RCtJNMCDn0zpav8Dj9AteF70x6kLSlliAJ/JFwi6AmQrLz+FxPexw== dependencies: - "@sentry/hub" "6.6.0" - "@sentry/types" "6.6.0" + "@sentry/hub" "6.7.1" + "@sentry/types" "6.7.1" tslib "^1.9.3" -"@sentry/types@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.6.0.tgz#55cbca23859bad87411f0f32135a968e6e40a639" - integrity sha512-lZ1uFN0lSNftAohi0lciEoSL58Gk/Ib1lLKaj0FSOvB1PAUmvo5dPtLdd0qjtNdtoaM8zqhrAbwCTQ8XZCDRsg== +"@sentry/types@6.7.1": + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.7.1.tgz#c8263e1886df5e815570c4668eb40a1cfaa1c88b" + integrity sha512-9AO7HKoip2MBMNQJEd6+AKtjj2+q9Ze4ooWUdEvdOVSt5drg7BGpK221/p9JEOyJAZwEPEXdcMd3VAIMiOb4MA== -"@sentry/utils@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.6.0.tgz#b34d342d05eefc25b7ddd3f27f41c050f1e7e1ef" - integrity sha512-FK9yqz2x+ef50B54tueeJ6mfb7Pf3lN75omx/YQBDL5cicyOV4j4kJDqn8/VKYhcSuX+ZaCZ/8bvOf0lxe0aHg== +"@sentry/utils@6.7.1": + version "6.7.1" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.7.1.tgz#909184ad580f0f6375e1e4d4a6ffd33dfe64a4d1" + integrity sha512-Tq2otdbWlHAkctD+EWTYKkEx6BL1Qn3Z/imkO06/PvzpWvVhJWQ5qHAzz5XnwwqNHyV03KVzYB6znq1Bea9HuA== dependencies: - "@sentry/types" "6.6.0" + "@sentry/types" "6.7.1" tslib "^1.9.3" "@sinonjs/commons@^1.7.0": @@ -2453,12 +2453,12 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^4.3.0", "@typescript-eslint/eslint-plugin@^4.5.0": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.1.tgz#b9c7313321cb837e2bf8bebe7acc2220659e67d3" - integrity sha512-aoIusj/8CR+xDWmZxARivZjbMBQTT9dImUtdZ8tVCVRXgBUuuZyM5Of5A9D9arQPxbi/0rlJLcuArclz/rCMJw== + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.27.0.tgz#0b7fc974e8bc9b2b5eb98ed51427b0be529b4ad0" + integrity sha512-DsLqxeUfLVNp3AO7PC3JyaddmEHTtI9qTSAs+RB6ja27QvIM0TA8Cizn1qcS6vOu+WDLFJzkwkgweiyFhssDdQ== dependencies: - "@typescript-eslint/experimental-utils" "4.26.1" - "@typescript-eslint/scope-manager" "4.26.1" + "@typescript-eslint/experimental-utils" "4.27.0" + "@typescript-eslint/scope-manager" "4.27.0" debug "^4.3.1" functional-red-black-tree "^1.0.1" lodash "^4.17.21" @@ -2466,15 +2466,15 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.26.1", "@typescript-eslint/experimental-utils@^4.0.1": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.26.1.tgz#a35980a2390da9232aa206b27f620eab66e94142" - integrity sha512-sQHBugRhrXzRCs9PaGg6rowie4i8s/iD/DpTB+EXte8OMDfdCG5TvO73XlO9Wc/zi0uyN4qOmX9hIjQEyhnbmQ== +"@typescript-eslint/experimental-utils@4.27.0", "@typescript-eslint/experimental-utils@^4.0.1": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.27.0.tgz#78192a616472d199f084eab8f10f962c0757cd1c" + integrity sha512-n5NlbnmzT2MXlyT+Y0Jf0gsmAQzCnQSWXKy4RGSXVStjDvS5we9IWbh7qRVKdGcxT0WYlgcCYUK/HRg7xFhvjQ== dependencies: "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.26.1" - "@typescript-eslint/types" "4.26.1" - "@typescript-eslint/typescript-estree" "4.26.1" + "@typescript-eslint/scope-manager" "4.27.0" + "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/typescript-estree" "4.27.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -2490,32 +2490,32 @@ eslint-utils "^2.0.0" "@typescript-eslint/parser@^4.3.0", "@typescript-eslint/parser@^4.5.0": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.26.1.tgz#cecfdd5eb7a5c13aabce1c1cfd7fbafb5a0f1e8e" - integrity sha512-q7F3zSo/nU6YJpPJvQveVlIIzx9/wu75lr6oDbDzoeIRWxpoc/HQ43G4rmMoCc5my/3uSj2VEpg/D83LYZF5HQ== + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.27.0.tgz#85447e573364bce4c46c7f64abaa4985aadf5a94" + integrity sha512-XpbxL+M+gClmJcJ5kHnUpBGmlGdgNvy6cehgR6ufyxkEJMGP25tZKCaKyC0W/JVpuhU3VU1RBn7SYUPKSMqQvQ== dependencies: - "@typescript-eslint/scope-manager" "4.26.1" - "@typescript-eslint/types" "4.26.1" - "@typescript-eslint/typescript-estree" "4.26.1" + "@typescript-eslint/scope-manager" "4.27.0" + "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/typescript-estree" "4.27.0" debug "^4.3.1" -"@typescript-eslint/scope-manager@4.26.1": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.26.1.tgz#075a74a15ff33ee3a7ed33e5fce16ee86689f662" - integrity sha512-TW1X2p62FQ8Rlne+WEShyd7ac2LA6o27S9i131W4NwDSfyeVlQWhw8ylldNNS8JG6oJB9Ha9Xyc+IUcqipvheQ== +"@typescript-eslint/scope-manager@4.27.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.27.0.tgz#b0b1de2b35aaf7f532e89c8e81d0fa298cae327d" + integrity sha512-DY73jK6SEH6UDdzc6maF19AHQJBFVRf6fgAXHPXCGEmpqD4vYgPEzqpFz1lf/daSbOcMpPPj9tyXXDPW2XReAw== dependencies: - "@typescript-eslint/types" "4.26.1" - "@typescript-eslint/visitor-keys" "4.26.1" + "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/visitor-keys" "4.27.0" "@typescript-eslint/types@3.10.1": version "3.10.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== -"@typescript-eslint/types@4.26.1": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.26.1.tgz#9e7c523f73c34b04a765e4167ca5650436ef1d38" - integrity sha512-STyMPxR3cS+LaNvS8yK15rb8Y0iL0tFXq0uyl6gY45glyI7w0CsyqyEXl/Fa0JlQy+pVANeK3sbwPneCbWE7yg== +"@typescript-eslint/types@4.27.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.27.0.tgz#712b408519ed699baff69086bc59cd2fc13df8d8" + integrity sha512-I4ps3SCPFCKclRcvnsVA/7sWzh7naaM/b4pBO2hVxnM3wrU51Lveybdw5WoIktU/V4KfXrTt94V9b065b/0+wA== "@typescript-eslint/typescript-estree@3.10.1": version "3.10.1" @@ -2531,13 +2531,13 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.26.1": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.1.tgz#b2ce2e789233d62283fae2c16baabd4f1dbc9633" - integrity sha512-l3ZXob+h0NQzz80lBGaykdScYaiEbFqznEs99uwzm8fPHhDjwaBFfQkjUC/slw6Sm7npFL8qrGEAMxcfBsBJUg== +"@typescript-eslint/typescript-estree@4.27.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.27.0.tgz#189a7b9f1d0717d5cccdcc17247692dedf7a09da" + integrity sha512-KH03GUsUj41sRLLEy2JHstnezgpS5VNhrJouRdmh6yNdQ+yl8w5LrSwBkExM+jWwCJa7Ct2c8yl8NdtNRyQO6g== dependencies: - "@typescript-eslint/types" "4.26.1" - "@typescript-eslint/visitor-keys" "4.26.1" + "@typescript-eslint/types" "4.27.0" + "@typescript-eslint/visitor-keys" "4.27.0" debug "^4.3.1" globby "^11.0.3" is-glob "^4.0.1" @@ -2551,12 +2551,12 @@ dependencies: eslint-visitor-keys "^1.1.0" -"@typescript-eslint/visitor-keys@4.26.1": - version "4.26.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.26.1.tgz#0d55ea735cb0d8903b198017d6d4f518fdaac546" - integrity sha512-IGouNSSd+6x/fHtYRyLOM6/C+QxMDzWlDtN41ea+flWuSF9g02iqcIlX8wM53JkfljoIjP0U+yp7SiTS1onEkw== +"@typescript-eslint/visitor-keys@4.27.0": + version "4.27.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.27.0.tgz#f56138b993ec822793e7ebcfac6ffdce0a60cb81" + integrity sha512-es0GRYNZp0ieckZ938cEANfEhsfHrzuLrePukLKtY3/KPXcq1Xd555Mno9/GOgXhKzn0QfkDLVgqWO3dGY80bg== dependencies: - "@typescript-eslint/types" "4.26.1" + "@typescript-eslint/types" "4.27.0" eslint-visitor-keys "^2.0.0" "@webassemblyjs/ast@1.9.0": @@ -2951,7 +2951,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.0, anymatch@^3.0.3, anymatch@~3.1.1: +anymatch@^3.0.0, anymatch@^3.0.3, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -3981,9 +3981,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, caniuse-lite@^1.0.30001219: - version "1.0.30001236" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001236.tgz#0a80de4cdf62e1770bb46a30d884fc8d633e3958" - integrity sha512-o0PRQSrSCGJKCPZcgMzl5fUaj5xHe8qA2m4QRvnyY4e1lITqoNkr7q/Oh1NcpGSy0Th97UZ35yoKcINPoq7YOQ== + version "1.0.30001237" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz#4b7783661515b8e7151fc6376cfd97f0e427b9e5" + integrity sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw== canvas@^2.5.0: version "2.8.0" @@ -4089,19 +4089,19 @@ cheerio@^1.0.0-rc.3: tslib "^2.2.0" "chokidar@>=3.0.0 <4.0.0", chokidar@^3.4.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== dependencies: - anymatch "~3.1.1" + anymatch "~3.1.2" braces "~3.0.2" - glob-parent "~5.1.0" + glob-parent "~5.1.2" is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.5.0" + readdirp "~3.6.0" optionalDependencies: - fsevents "~2.3.1" + fsevents "~2.3.2" chokidar@^2.1.8: version "2.1.8" @@ -6382,7 +6382,7 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.1: +fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -6517,7 +6517,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -10702,9 +10702,9 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, po supports-color "^6.1.0" postcss@^8.1.0: - version "8.3.2" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.2.tgz#ed3ec489f5428af5740cd6effcc216b4d455ee64" - integrity sha512-y1FK/AWdZlBF5lusS5j5l4/vF67+vQZt1SXPVJ32y1kRGDQyrs1zk32hG1cInRTu14P0V+orPz+ifwW/7rR4bg== + version "8.3.4" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.4.tgz#41ece1c43f2f7c74dc7d90144047ce052757b822" + integrity sha512-/tZY0PXExXXnNhKv3TOvZAOUYRyuqcCbBm2c17YMDK0PlVII3K7/LKdt3ScHL+hhouddjUWi+1sKDf9xXW+8YA== dependencies: colorette "^1.2.2" nanoid "^3.1.23" @@ -11340,9 +11340,9 @@ react-shallow-renderer@^16.13.1: react-is "^16.12.0 || ^17.0.0" react-simple-keyboard@^3.1.42: - version "3.1.44" - resolved "https://registry.yarnpkg.com/react-simple-keyboard/-/react-simple-keyboard-3.1.44.tgz#31ba7944fa5ed89025f3f7cff6796988bd2f541b" - integrity sha512-NY4JjrJRoROrjj1nYI+P9EM2XWk8iMWC/VlblJwAetIJmvo/MCy5hDeczFmkfiNm0QCM+dbMTileidYU9ORUHw== + version "3.1.51" + resolved "https://registry.yarnpkg.com/react-simple-keyboard/-/react-simple-keyboard-3.1.51.tgz#17ef2a4fd304a826e65745b5b1c112b2799e42d9" + integrity sha512-Kohkfr3y7T2a8USfp9gonjJHt4TEv+to0Xp774QWfMIL1G7wTCz4YXJBEoonKqZPyZp71hJfMxCUg7FeTJHU6A== react-sortable-hoc@^1.11.0: version "1.11.0" @@ -11478,10 +11478,10 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" @@ -11598,9 +11598,9 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: define-properties "^1.1.3" regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== regexpu-core@^4.7.1: version "4.7.1" @@ -11975,9 +11975,9 @@ sass-loader@^10, sass-loader@^10.0.5: semver "^7.3.2" sass@^1.34.1: - version "1.34.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.34.1.tgz#30f45c606c483d47b634f1e7371e13ff773c96ef" - integrity sha512-scLA7EIZM+MmYlej6sdVr0HRbZX5caX5ofDT9asWnUJj21oqgsC+1LuNfm0eg+vM0fCTZHhwImTiCU0sx9h9CQ== + version "1.35.1" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.35.1.tgz#90ecf774dfe68f07b6193077e3b42fb154b9e1cd" + integrity sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ== dependencies: chokidar ">=3.0.0 <4.0.0" @@ -13217,9 +13217,9 @@ tslib@^1.8.1, tslib@^1.9.2, tslib@^1.9.3: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.0.3, tslib@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" - integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== + version "2.3.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" + integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== tslib@~1.13.0: version "1.13.0" From 1836d87665cbfb3af80b6db278507ed28930f805 Mon Sep 17 00:00:00 2001 From: Martin Henz Date: Thu, 17 Jun 2021 12:49:27 +0800 Subject: [PATCH 10/13] Frontmatter (#1798) * reorganizing front matter * reorganizing front matter * reorganizing front matter --- src/pages/sicp/subcomponents/SicpIndexPage.tsx | 8 +++++++- .../__tests__/__snapshots__/SicpIndexPage.tsx.snap | 13 ++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/pages/sicp/subcomponents/SicpIndexPage.tsx b/src/pages/sicp/subcomponents/SicpIndexPage.tsx index f20ee6bcf8..a0e6ceb429 100644 --- a/src/pages/sicp/subcomponents/SicpIndexPage.tsx +++ b/src/pages/sicp/subcomponents/SicpIndexPage.tsx @@ -6,7 +6,8 @@ import SicpToc from './SicpToc'; const originalAuthors = 'Harold Abelson and Gerald Jay Sussman'; const originalWithAuthors = 'with Julie Sussman'; const adaptedAuthors = 'Martin Henz and Tobias Wrigstad'; -const adaptedWithAuthors = 'with Samuel Fang'; +const adaptedWithAuthors = 'with Julie Sussman'; +const developers = 'Samuel Fang'; const authors = (
@@ -22,6 +23,11 @@ const authors = ( {adaptedWithAuthors} — adapters to JavaScript

+
+

{developers}

+

+ — designer and developer of Interactive SICP +

); diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap index 72f910f7bb..db492ecaf3 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap @@ -38,11 +38,22 @@ exports[`Sicp index page 1`] = `

- with Samuel Fang + with Julie Sussman — adapters to JavaScript

+
+ +

+ Samuel Fang +

+
+

+ + — designer and developer of Interactive SICP + +

From 3adfe7eb1953cd05177b8fb3e96dba5ccf2355c7 Mon Sep 17 00:00:00 2001 From: Cheng Geng <47176493+ChengGeng97@users.noreply.github.com> Date: Thu, 17 Jun 2021 14:28:23 +0800 Subject: [PATCH 11/13] Playground Persistence Enhancement (fix issue #1787) (#1799) * fix: enhanced GitHub buttons in playground * style: yarn run format --- .../github/ControlBarGitHubButtons.tsx | 31 ++++++++++--------- .../gitHubOverlay/FileExplorerDialog.tsx | 3 +- .../__tests__/FileExplorerDialog.tsx | 6 ---- src/features/github/GitHubTypes.ts | 6 +++- src/features/github/GitHubUtils.tsx | 20 ++---------- src/features/playground/PlaygroundActions.ts | 7 +++-- src/pages/playground/Playground.tsx | 14 ++++++--- 7 files changed, 41 insertions(+), 46 deletions(-) diff --git a/src/commons/controlBar/github/ControlBarGitHubButtons.tsx b/src/commons/controlBar/github/ControlBarGitHubButtons.tsx index 8f11ac08bf..29cbf87a56 100644 --- a/src/commons/controlBar/github/ControlBarGitHubButtons.tsx +++ b/src/commons/controlBar/github/ControlBarGitHubButtons.tsx @@ -5,13 +5,14 @@ import { Octokit } from '@octokit/rest'; import * as React from 'react'; import { useMediaQuery } from 'react-responsive'; -import { GitHubState } from '../../../features/github/GitHubTypes'; +import { GitHubSaveInfo } from '../../../features/github/GitHubTypes'; import controlButton from '../../ControlButton'; import Constants from '../../utils/Constants'; export type ControlBarGitHubButtonsProps = { loggedInAs: Octokit; - githubSaveInfo: { repoName: string; filePath: string }; + githubSaveInfo: GitHubSaveInfo; + isDirty: boolean; onClickOpen?: () => void; onClickSave?: () => void; onClickSaveAs?: () => void; @@ -19,11 +20,6 @@ export type ControlBarGitHubButtonsProps = { onClickLogOut?: () => void; }; -const stateToIntent: { [state in GitHubState]: Intent } = { - LOGGED_OUT: Intent.NONE, - LOGGED_IN: Intent.NONE -}; - /** * GitHub buttons to be used specifically in the Playground. * Creates a dropdown upon click. @@ -32,16 +28,23 @@ const stateToIntent: { [state in GitHubState]: Intent } = { */ export const ControlBarGitHubButtons: React.FC = props => { const isMobileBreakpoint = useMediaQuery({ maxWidth: Constants.mobileBreakpoint }); - const isLoggedIn = props.loggedInAs !== undefined; + const filePath = props.githubSaveInfo.filePath || ''; + const fileName = (filePath.split('\\').pop() || '').split('/').pop() || ''; + + const isLoggedIn = props.loggedInAs !== undefined; const shouldDisableButtons = !isLoggedIn; - const shouldDisableSaveButton = - props.githubSaveInfo.repoName === '' || props.githubSaveInfo.filePath === ''; + const hasFilePath = filePath !== ''; + const hasOpenFile = isLoggedIn && hasFilePath; - const state: GitHubState = isLoggedIn ? 'LOGGED_IN' : 'LOGGED_OUT'; + const mainButtonDisplayText = hasOpenFile ? fileName : 'GitHub'; + let mainButtonIntent: Intent = Intent.NONE; + if (hasOpenFile) { + mainButtonIntent = props.isDirty ? Intent.WARNING : Intent.PRIMARY; + } - const mainButton = controlButton('GitHub', IconNames.GIT_BRANCH, null, { - intent: stateToIntent[state] + const mainButton = controlButton(mainButtonDisplayText, IconNames.GIT_BRANCH, null, { + intent: mainButtonIntent }); const openButton = controlButton( @@ -57,7 +60,7 @@ export const ControlBarGitHubButtons: React.FC = p IconNames.FLOPPY_DISK, props.onClickSave, undefined, - shouldDisableButtons || shouldDisableSaveButton + shouldDisableButtons || !hasOpenFile ); const saveAsButton = controlButton( diff --git a/src/commons/gitHubOverlay/FileExplorerDialog.tsx b/src/commons/gitHubOverlay/FileExplorerDialog.tsx index ef5539fbb6..8e2618d4a0 100644 --- a/src/commons/gitHubOverlay/FileExplorerDialog.tsx +++ b/src/commons/gitHubOverlay/FileExplorerDialog.tsx @@ -17,7 +17,6 @@ import { checkIfFileCanBeOpened, checkIfFileCanBeSavedAndGetSaveType, checkIfUserAgreesToOverwriteEditorData, - checkIfUserAgreesToPerformCreatingSave, checkIfUserAgreesToPerformOverwritingSave, openFileInEditor, performCreatingSave, @@ -134,7 +133,7 @@ const FileExplorerDialog: React.FC = props => { ); } - if (saveType === 'Create' && (await checkIfUserAgreesToPerformCreatingSave())) { + if (saveType === 'Create') { performCreatingSave( props.octokit, githubLoginID, diff --git a/src/commons/gitHubOverlay/__tests__/FileExplorerDialog.tsx b/src/commons/gitHubOverlay/__tests__/FileExplorerDialog.tsx index d0dad485fe..882f3648de 100644 --- a/src/commons/gitHubOverlay/__tests__/FileExplorerDialog.tsx +++ b/src/commons/gitHubOverlay/__tests__/FileExplorerDialog.tsx @@ -211,12 +211,6 @@ test('Performing creating save leads to appropriate function being called', asyn } ); - const checkIfUserAgreesToPerformCreatingSaveMock = jest.spyOn( - GitHubUtils, - 'checkIfUserAgreesToPerformCreatingSave' - ); - checkIfUserAgreesToPerformCreatingSaveMock.mockImplementation(async () => true); - const performCreatingSaveMock = jest.spyOn(GitHubUtils, 'performCreatingSave'); performCreatingSaveMock.mockImplementation( async ( diff --git a/src/features/github/GitHubTypes.ts b/src/features/github/GitHubTypes.ts index 142bc37024..36feee0724 100644 --- a/src/features/github/GitHubTypes.ts +++ b/src/features/github/GitHubTypes.ts @@ -2,4 +2,8 @@ export const GITHUB_OPEN_FILE = 'GITHUB_OPEN_FILE'; export const GITHUB_SAVE_FILE = 'GITHUB_SAVE_FILE'; export const GITHUB_SAVE_FILE_AS = 'GITHUB_SAVE_FILE_AS'; -export type GitHubState = 'LOGGED_IN' | 'LOGGED_OUT'; +export type GitHubSaveInfo = { + repoName: string; + filePath: string; + lastSaved?: Date; +}; diff --git a/src/features/github/GitHubUtils.tsx b/src/features/github/GitHubUtils.tsx index 0e05bfe465..aa0c31e7f8 100644 --- a/src/features/github/GitHubUtils.tsx +++ b/src/features/github/GitHubUtils.tsx @@ -173,20 +173,6 @@ export async function checkIfUserAgreesToPerformOverwritingSave() { }); } -export async function checkIfUserAgreesToPerformCreatingSave() { - return await showSimpleConfirmDialog({ - contents: ( -
-

Warning: You are creating a new file in the repository.

-

Please click 'Confirm' to continue, or 'Cancel' to go back.

-
- ), - negativeLabel: 'Cancel', - positiveIntent: 'primary', - positiveLabel: 'Confirm' - }); -} - export async function openFileInEditor( octokit: Octokit, repoOwner: string, @@ -207,7 +193,7 @@ export async function openFileInEditor( if (content) { const newEditorValue = Buffer.from(content, 'base64').toString(); store.dispatch(actions.updateEditorValue(newEditorValue, 'playground')); - store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath)); + store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath, new Date())); showSuccessMessage('Successfully loaded file!', 1000); } } @@ -259,7 +245,7 @@ export async function performOverwritingSave( committer: { name: githubName, email: githubEmail }, author: { name: githubName, email: githubEmail } }); - store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath)); + store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath, new Date())); showSuccessMessage('Successfully saved file!', 1000); } catch (err) { console.error(err); @@ -296,7 +282,7 @@ export async function performCreatingSave( committer: { name: githubName, email: githubEmail }, author: { name: githubName, email: githubEmail } }); - store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath)); + store.dispatch(actions.playgroundUpdateGitHubSaveInfo(repoName, filePath, new Date())); showSuccessMessage('Successfully created file!', 1000); } catch (err) { console.error(err); diff --git a/src/features/playground/PlaygroundActions.ts b/src/features/playground/PlaygroundActions.ts index 476b490097..d650dffd28 100644 --- a/src/features/playground/PlaygroundActions.ts +++ b/src/features/playground/PlaygroundActions.ts @@ -21,5 +21,8 @@ export const changeQueryString = (queryString: string) => action(CHANGE_QUERY_ST export const playgroundUpdatePersistenceFile = (file?: PersistenceFile) => action(PLAYGROUND_UPDATE_PERSISTENCE_FILE, file); -export const playgroundUpdateGitHubSaveInfo = (repoName: string, filePath: string) => - action(PLAYGROUND_UPDATE_GITHUB_SAVE_INFO, { repoName, filePath }); +export const playgroundUpdateGitHubSaveInfo = ( + repoName: string, + filePath: string, + lastSaved: Date +) => action(PLAYGROUND_UPDATE_GITHUB_SAVE_INFO, { repoName, filePath, lastSaved }); diff --git a/src/pages/playground/Playground.tsx b/src/pages/playground/Playground.tsx index 171f21fd3d..86700464d0 100644 --- a/src/pages/playground/Playground.tsx +++ b/src/pages/playground/Playground.tsx @@ -51,6 +51,7 @@ import { stringParamToInt } from '../../commons/utils/ParamParseHelper'; import { parseQuery } from '../../commons/utils/QueryHelper'; import Workspace, { WorkspaceProps } from '../../commons/workspace/Workspace'; import { initSession, log } from '../../features/eventLogging'; +import { GitHubSaveInfo } from '../../features/github/GitHubTypes'; import { PersistenceFile } from '../../features/persistence/PersistenceTypes'; import { CodeDelta, @@ -141,7 +142,7 @@ export type StateProps = { persistenceUser: string | undefined; persistenceFile: PersistenceFile | undefined; githubOctokitObject: { octokit: Octokit | undefined }; - githubSaveInfo: { repoName: string; filePath: string }; + githubSaveInfo: GitHubSaveInfo; }; const keyMap = { goGreen: 'h u l k' }; @@ -458,13 +459,17 @@ const Playground: React.FC = props => { ]); const githubOctokitObject = useSelector((store: any) => store.session.githubOctokitObject); + const githubSaveInfo = props.githubSaveInfo; + const githubPersistenceIsDirty = + githubSaveInfo && (!githubSaveInfo.lastSaved || githubSaveInfo.lastSaved < lastEdit); const githubButtons = React.useMemo(() => { const octokit = githubOctokitObject === undefined ? undefined : githubOctokitObject.octokit; return ( = props => { ); }, [ githubOctokitObject, - props.githubSaveInfo, + githubPersistenceIsDirty, + githubSaveInfo, props.handleGitHubOpenFile, props.handleGitHubSaveFileAs, props.handleGitHubSaveFile, From 39798d1a4b2d0990d7dd9525c710c0bd3d23b0f2 Mon Sep 17 00:00:00 2001 From: Samuel Fang Date: Thu, 17 Jun 2021 22:21:57 +0800 Subject: [PATCH 12/13] Interactive SICP-JS: Changes to style and formatting (#1800) * Adjust margins for index page * Add elevation to code snippets * Change styles for toc-caret * Fix blockquote margins --- src/features/sicp/SourceTheme.ts | 4 ++-- src/pages/sicp/subcomponents/CodeSnippet.tsx | 10 ++++---- .../sicp/subcomponents/SicpIndexPage.tsx | 3 --- .../__snapshots__/CodeSnippet.tsx.snap | 8 ++++--- .../__snapshots__/SicpIndexPage.tsx.snap | 3 --- src/styles/_sicp.scss | 23 +++++++++++++++++++ 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/features/sicp/SourceTheme.ts b/src/features/sicp/SourceTheme.ts index fe2cd04dcd..89d1d69fa4 100644 --- a/src/features/sicp/SourceTheme.ts +++ b/src/features/sicp/SourceTheme.ts @@ -7,7 +7,7 @@ const SourceThemeBackground = '#2c3e50'; export const SourceTheme = { 'code[class*="language-"]': { color: 'white', - background: SourceThemeBackground, + background: 'transparent', fontFamily: "'Inconsolata', 'Consolas', monospace", textAlign: 'left', whiteSpace: 'pre', @@ -47,7 +47,7 @@ export const SourceTheme = { borderRadius: '0.3em' }, ':not(pre) > code[class*="language-"]': { - background: SourceThemeBackground, + background: 'transparent', padding: '0.1em', borderRadius: '0.3em', whiteSpace: 'normal' diff --git a/src/pages/sicp/subcomponents/CodeSnippet.tsx b/src/pages/sicp/subcomponents/CodeSnippet.tsx index 645377113f..9bfc01e147 100644 --- a/src/pages/sicp/subcomponents/CodeSnippet.tsx +++ b/src/pages/sicp/subcomponents/CodeSnippet.tsx @@ -1,4 +1,4 @@ -import { Pre } from '@blueprintjs/core'; +import { Card, Elevation, Pre } from '@blueprintjs/core'; import { HighlightRulesSelector, ModeSelector } from 'js-slang/dist/editors/ace/modes/source'; import { Resizable } from 're-resizable'; import * as React from 'react'; @@ -113,9 +113,11 @@ const CodeSnippet: React.FC = props => { )}
) : ( - - {body} - + + + {body} + + )} {output &&
{output}
}
diff --git a/src/pages/sicp/subcomponents/SicpIndexPage.tsx b/src/pages/sicp/subcomponents/SicpIndexPage.tsx index a0e6ceb429..13b9642237 100644 --- a/src/pages/sicp/subcomponents/SicpIndexPage.tsx +++ b/src/pages/sicp/subcomponents/SicpIndexPage.tsx @@ -11,19 +11,16 @@ const developers = 'Samuel Fang'; const authors = (
-

{originalAuthors}

{originalWithAuthors} — original authors

-

{adaptedAuthors}

{adaptedWithAuthors} — adapters to JavaScript

-

{developers}

— designer and developer of Interactive SICP diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap index 1c19375f15..f0a6442b9b 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap @@ -2,9 +2,11 @@ exports[`Sicp Code Snippet renders correctly 1`] = ` "

- - 1+1; - + + + 1+1; + + 2 diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap index db492ecaf3..70b2f8b012 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap @@ -19,7 +19,6 @@ exports[`Sicp index page 1`] = `
-

Harold Abelson and Gerald Jay Sussman @@ -31,7 +30,6 @@ exports[`Sicp index page 1`] = ` — original authors

-

Martin Henz and Tobias Wrigstad @@ -43,7 +41,6 @@ exports[`Sicp index page 1`] = ` — adapters to JavaScript

-

Samuel Fang diff --git a/src/styles/_sicp.scss b/src/styles/_sicp.scss index 35d9649f60..972e33ce13 100644 --- a/src/styles/_sicp.scss +++ b/src/styles/_sicp.scss @@ -19,6 +19,10 @@ $sicp-background-color: #ffffff; overflow-x: scroll; } + .bp3-blockquote { + margin: 10px 0; + } + .bp3-heading { margin-top: 10px; } @@ -69,6 +73,10 @@ $sicp-background-color: #ffffff; text-align: right; } + h4 { + margin-top: 15px; + } + > h2, > .sicp-licenses { text-align: center; @@ -173,6 +181,11 @@ $sicp-background-color: #ffffff; width: 100vw; } } + + .sicp-code-snippet-closed { + padding: 0; + margin: 0; + } } .sicp-footnote { @@ -227,6 +240,16 @@ $sicp-background-color: #ffffff; .sicp-toc { overflow-y: auto; + text-align: left; + + .bp3-tree-node-caret { + color: #777777 !important; + scale: 1.25; + } + + .bp3-tree-node-caret:hover { + color: $sicp-text-color !important; + } } .sicp-toc-drawer { From 558f2137426888eae29c3c1b32f5d74755a5470a Mon Sep 17 00:00:00 2001 From: Samuel Fang Date: Fri, 18 Jun 2021 08:57:07 +0800 Subject: [PATCH 13/13] Switch math parsing library to katex (#1801) --- package.json | 2 +- src/features/sicp/parser/ParseJson.tsx | 11 ++- .../sicp/parser/__tests__/ParseJson.tsx | 25 +++---- .../__snapshots__/ParseJson.tsx.snap | 48 ++++++------- src/pages/sicp/Sicp.tsx | 32 +++------ src/pages/sicp/subcomponents/SicpLatex.tsx | 11 +-- .../subcomponents/__tests__/SicpLatex.tsx | 14 +--- .../__snapshots__/SicpLatex.tsx.snap | 28 +++----- yarn.lock | 69 +++++-------------- 9 files changed, 83 insertions(+), 157 deletions(-) diff --git a/package.json b/package.json index 855569f82d..b927811d25 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "ag-grid-community": "^25.3.0", "ag-grid-react": "^25.3.0", "array-move": "^3.0.1", - "better-react-mathjax": "^1.0.2", "classnames": "^2.3.1", "connected-react-router": "^6.9.1", "flexboxgrid": "^6.3.1", @@ -67,6 +66,7 @@ "react-dropzone": "^11.3.2", "react-hotkeys": "^2.0.0", "react-konva": "^17.0.2-4", + "react-latex-next": "^2.0.0", "react-mde": "^11.5.0", "react-redux": "^7.2.4", "react-responsive": "^8.2.0", diff --git a/src/features/sicp/parser/ParseJson.tsx b/src/features/sicp/parser/ParseJson.tsx index 48c9cee996..336f5521ca 100644 --- a/src/features/sicp/parser/ParseJson.tsx +++ b/src/features/sicp/parser/ParseJson.tsx @@ -92,7 +92,7 @@ const handleEpigraph = (obj: JsonType, refs: React.MutableRefObject<{}>) => { const handleSnippet = (obj: JsonType) => { if (obj['latex']) { - return
{handleLatex(obj['body']!, false)}
; + return
{handleLatex(obj['body']!)}
; } else if (typeof obj['eval'] === 'boolean' && !obj['eval']) { return
{obj['body']}
; } else { @@ -179,8 +179,8 @@ const handleText = (text: string) => { return

{text}

; }; -const handleLatex = (math: string, inline: boolean) => { - return ; +const handleLatex = (math: string) => { + return ; }; export const processingFunctions = { @@ -210,10 +210,9 @@ export const processingFunctions = { {obj['body']} ), - LATEX: (obj: JsonType, _refs: React.MutableRefObject<{}>) => handleLatex(obj['body']!, false), + LATEX: (obj: JsonType, _refs: React.MutableRefObject<{}>) => handleLatex(obj['body']!), - LATEXINLINE: (obj: JsonType, _refs: React.MutableRefObject<{}>) => - handleLatex(obj['body']!, true), + LATEXINLINE: (obj: JsonType, _refs: React.MutableRefObject<{}>) => handleLatex(obj['body']!), LI: (obj: JsonType, refs: React.MutableRefObject<{}>) =>
  • {parseArr(obj['child']!, refs)}
  • , diff --git a/src/features/sicp/parser/__tests__/ParseJson.tsx b/src/features/sicp/parser/__tests__/ParseJson.tsx index cfa4e0c45d..73d96503de 100644 --- a/src/features/sicp/parser/__tests__/ParseJson.tsx +++ b/src/features/sicp/parser/__tests__/ParseJson.tsx @@ -1,7 +1,6 @@ -import { MathJaxContext } from 'better-react-mathjax'; import { mount, shallow } from 'enzyme'; import lzString from 'lz-string'; -import { mathjaxConfig } from 'src/pages/sicp/Sicp'; +import { CodeSnippetProps } from 'src/pages/sicp/subcomponents/CodeSnippet'; import { JsonType, parseArr, ParseJsonError, parseObj, processingFunctions } from '../ParseJson'; @@ -31,6 +30,10 @@ jest.mock('src/commons/utils/Constants', () => ({ interactiveSicpDataUrl: 'https://source-academy.github.io/sicp/' })); +jest.mock('src/pages/sicp/subcomponents/CodeSnippet', () => { + return (props: CodeSnippetProps) =>
    Code Snippet
    ; +}); + const mockData = { text: { tag: textTag, @@ -44,21 +47,15 @@ const mockData = { const mockRef = { current: {} }; -const processTag = (tag: string, obj: JsonType, math: boolean) => { +const processTag = (tag: string, obj: JsonType) => { obj['tag'] = tag; - return math ? ( - - {processingFunctions[tag](obj, mockRef)} - - ) : ( - processingFunctions[tag](obj, mockRef) - ); + return processingFunctions[tag](obj, mockRef); }; -const testTagSuccessful = (obj: JsonType, tag: string, text: string = '', math = false) => { +const testTagSuccessful = (obj: JsonType, tag: string, text: string = '') => { test(tag + ' ' + text + ' successful', () => { - const tree = shallow(processTag(tag, obj, math)); + const tree = shallow(processTag(tag, obj)); expect(tree.debug()).toMatchSnapshot(); }); @@ -215,7 +212,7 @@ describe('Parse snippet', () => { objLatex ]; - objsToTest.forEach(obj => testTagSuccessful(obj['obj'], tag, obj['text'], true)); + objsToTest.forEach(obj => testTagSuccessful(obj['obj'], tag, obj['text'])); }); describe('Parse figures', () => { @@ -300,7 +297,7 @@ describe('Parse latex', () => { body: math }; - tag.forEach(tag => testTagSuccessful(obj, tag, '', true)); + tag.forEach(tag => testTagSuccessful(obj, tag, '')); }); describe('Parse links', () => { diff --git a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap index 4ea435daff..d4e6b50d93 100644 --- a/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap +++ b/src/features/sicp/parser/__tests__/__snapshots__/ParseJson.tsx.snap @@ -155,7 +155,7 @@ exports[`Parse figures FIGURE with image successful 1`] = ` exports[`Parse figures FIGURE with snippet successful 1`] = ` "
    - +
    name @@ -269,15 +269,15 @@ exports[`Parse heading SUBSUBHEADING successful 1`] = ` `; exports[`Parse latex LATEX successful 1`] = ` -" - -" +" + $test$ +" `; exports[`Parse latex LATEXINLINE successful 1`] = ` -" - -" +" + $test$ +" `; exports[`Parse links FOOTNOTE_REF successful 1`] = ` @@ -397,37 +397,33 @@ exports[`Parse section SECTION successful 1`] = ` `; exports[`Parse snippet SNIPPET no eval successful 1`] = ` -" - - 1 + 1; - -" +"
    +  1 + 1;
    +
    " `; exports[`Parse snippet SNIPPET with latex successful 1`] = ` -" - - - -" +"
    +  
    +
    " `; exports[`Parse snippet SNIPPET with prepend successful 1`] = ` -" - -" +"
    + Code Snippet +
    " `; exports[`Parse snippet SNIPPET without prepend successful 1`] = ` -" - -" +"
    + Code Snippet +
    " `; exports[`Parse snippet SNIPPET without prepend with output successful 1`] = ` -" - -" +"
    + Code Snippet +
    " `; exports[`Parse styling B successful 1`] = ` diff --git a/src/pages/sicp/Sicp.tsx b/src/pages/sicp/Sicp.tsx index d80d034c0d..b3abcc199a 100644 --- a/src/pages/sicp/Sicp.tsx +++ b/src/pages/sicp/Sicp.tsx @@ -1,6 +1,7 @@ +import 'katex/dist/katex.min.css'; + import { Classes, NonIdealState, Spinner } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; -import { MathJaxContext } from 'better-react-mathjax'; import classNames from 'classnames'; import * as React from 'react'; import { useDispatch } from 'react-redux'; @@ -13,7 +14,7 @@ import SicpIndexPage from './subcomponents/SicpIndexPage'; type SicpProps = RouteComponentProps<{}>; -const baseUrl = Constants.interactiveSicpDataUrl + '/json/'; +const baseUrl = Constants.interactiveSicpDataUrl + 'json/'; const extension = '.json'; // Context to determine which code snippet is active @@ -22,16 +23,6 @@ export const CodeSnippetContext = React.createContext({ setActive: (x: string) => {} }); -export const mathjaxConfig = { - tex: { - inlineMath: [ - ['$', '$'], - ['\\(', '\\)'] - ], - displayMath: [['\\[', '\\]']] - } -}; - const loadingComponent = } />; const unexpectedError = ( @@ -113,6 +104,7 @@ const Sicp: React.FC = props => { } else { setData(errorComponent(unexpectedError)); } + setLoading(false); }); }, [section]); @@ -150,15 +142,13 @@ const Sicp: React.FC = props => {
    - - {loading ? ( -
    {loadingComponent}
    - ) : section === 'index' ? ( - - ) : ( -
    {data}
    - )} -
    + {loading ? ( +
    {loadingComponent}
    + ) : section === 'index' ? ( + + ) : ( +
    {data}
    + )}
    ); diff --git a/src/pages/sicp/subcomponents/SicpLatex.tsx b/src/pages/sicp/subcomponents/SicpLatex.tsx index f9b8f1fc71..96be111b1b 100644 --- a/src/pages/sicp/subcomponents/SicpLatex.tsx +++ b/src/pages/sicp/subcomponents/SicpLatex.tsx @@ -1,19 +1,12 @@ -import { MathJax } from 'better-react-mathjax'; import * as React from 'react'; +import Latex from 'react-latex-next'; type SicpLatexProps = { math: string; - inline: boolean; }; const SicpLatex: React.FC = props => { - const { math, inline } = props; - - return ( - - {math} - - ); + return {props.math}; }; export default SicpLatex; diff --git a/src/pages/sicp/subcomponents/__tests__/SicpLatex.tsx b/src/pages/sicp/subcomponents/__tests__/SicpLatex.tsx index e6d016d632..9738a7db5c 100644 --- a/src/pages/sicp/subcomponents/__tests__/SicpLatex.tsx +++ b/src/pages/sicp/subcomponents/__tests__/SicpLatex.tsx @@ -1,7 +1,5 @@ -import { MathJaxContext } from 'better-react-mathjax'; import { mount } from 'enzyme'; -import { mathjaxConfig } from '../../Sicp'; import SicpLatex from '../SicpLatex'; describe('Sicp latex renders', () => { @@ -11,11 +9,7 @@ describe('Sicp latex renders', () => { inline: false }; - const tree = mount( - - - - ); + const tree = mount(); expect(tree.debug()).toMatchSnapshot(); }); @@ -25,11 +19,7 @@ describe('Sicp latex renders', () => { inline: true }; - const tree = mount( - - - - ); + const tree = mount(); expect(tree.debug()).toMatchSnapshot(); }); }); diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpLatex.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpLatex.tsx.snap index bb07994135..5d0ec91281 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpLatex.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpLatex.tsx.snap @@ -1,25 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Sicp latex renders correctly block 1`] = ` -" - - - - 1+1 - - - -" +" + + + +" `; exports[`Sicp latex renders correctly inline 1`] = ` -" - - - - 1+1 - - - -" +" + + + +" `; diff --git a/yarn.lock b/yarn.lock index 97a09e8968..f0dd438ace 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3570,13 +3570,6 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== -better-react-mathjax@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/better-react-mathjax/-/better-react-mathjax-1.0.2.tgz#f29a61700f65f781ead8c301b68edfc69f01ec1c" - integrity sha512-wCSInSWHSe5+u54sZQ3yz7y5Kn274g8mT6Kfdz87hpt+94/B25O/HAqtHb68sgXWEHww0Deq0Oni3Qqu8HP/jg== - dependencies: - mathjax-full "^3.1.2" - bfj@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/bfj/-/bfj-7.0.2.tgz#1988ce76f3add9ac2913fd8ba47aad9e651bfbb2" @@ -4298,11 +4291,6 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@>=7.0.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -4313,6 +4301,11 @@ commander@^4.1.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== + commist@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/commist/-/commist-1.1.0.tgz#17811ec6978f6c15ee4de80c45c9beb77cee35d5" @@ -5762,11 +5755,6 @@ eslint@7, eslint@^7.11.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" -esm@^3.2.25: - version "3.2.25" - resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" - integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== - espree@^7.3.0, espree@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" @@ -8378,6 +8366,13 @@ jsprim@^1.2.2: array-includes "^3.1.2" object.assign "^4.1.2" +katex@^0.13.0: + version "0.13.11" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.13.11.tgz#66138ebf173f25ef130cd3a3ea3ea1d12a3f1362" + integrity sha512-yJBHVIgwlAaapzlbvTpVF/ZOs8UkTj/sd46Fl8+qAf2/UiituPYVeapVD8ADZtqyRg/qNWUKt7gJoyYVWLrcXw== + dependencies: + commander "^6.0.0" + killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" @@ -8754,15 +8749,6 @@ matchmediaquery@^0.3.0: dependencies: css-mediaquery "^0.1.2" -mathjax-full@^3.1.2: - version "3.1.4" - resolved "https://registry.yarnpkg.com/mathjax-full/-/mathjax-full-3.1.4.tgz#ec9c51abf55b427e0fd54760ca9478d439406e59" - integrity sha512-80lZZci7vqQQV2wdLcnFUtI7z5Aru0RL03wPw8JM6kFPmX4CA/SYfnlQQ1WIIBU+0p0YoxJ6Z3gAUcVzvDArhw== - dependencies: - esm "^3.2.25" - mj-context-menu "^0.6.1" - speech-rule-engine "^3.2.0" - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -9000,11 +8986,6 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mj-context-menu@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/mj-context-menu/-/mj-context-menu-0.6.1.tgz#a043c5282bf7e1cf3821de07b13525ca6f85aa69" - integrity sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA== - mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" @@ -11169,6 +11150,13 @@ react-konva@^17.0.2-4: react-reconciler "~0.26.2" scheduler "^0.20.2" +react-latex-next@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/react-latex-next/-/react-latex-next-2.0.0.tgz#c33b26b7ec18006207c544a0183dbf3cb68e3cf4" + integrity sha512-FbabI8S5k6sUodeo1Bu3mobF77c7l8HQLptfha9IEbam7iEUwycgdS6GexlBtKy6Cg9kyr8ZFHdozEaRly514w== + dependencies: + katex "^0.13.0" + react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" @@ -12478,15 +12466,6 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -speech-rule-engine@^3.2.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/speech-rule-engine/-/speech-rule-engine-3.3.3.tgz#781ed03cbcf3279f94d1d80241025ea954c6d571" - integrity sha512-0exWw+0XauLjat+f/aFeo5T8SiDsO1JtwpY3qgJE4cWt+yL/Stl0WP4VNDWdh7lzGkubUD9lWP4J1ASnORXfyQ== - dependencies: - commander ">=7.0.0" - wicked-good-xpath "^1.3.0" - xmldom-sre "^0.1.31" - split-on-first@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" @@ -13922,11 +13901,6 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -wicked-good-xpath@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz#81b0e95e8650e49c94b22298fff8686b5553cf6c" - integrity sha1-gbDpXoZQ5JyUsiKY//hoa1VTz2w= - wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -14174,11 +14148,6 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xmldom-sre@^0.1.31: - version "0.1.31" - resolved "https://registry.yarnpkg.com/xmldom-sre/-/xmldom-sre-0.1.31.tgz#10860d5bab2c603144597d04bf2c4980e98067f4" - integrity sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw== - xmlhttprequest-ts@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xmlhttprequest-ts/-/xmlhttprequest-ts-1.0.1.tgz#7b3cb4a197aee38cf2d4f9dd6189d1d21f0835b2"