Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add Full TypeScript chapter #2379

Merged
merged 7 commits into from
Mar 23, 2023

Conversation

zhaojj2209
Copy link
Contributor

Description

Adds the Full TypeScript chapter to js-slang. This branch can only be merged once source-academy/js-slang#1376 is merged and js-slang is bumped; opening as draft for now to facilitate testing of source-academy/js-slang#1376.

Also refactored out utils regarding FullJS/HTML/FullTS disclaimers into one file.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

How to test

Link local frontend to source-academy/js-slang#1376, then switch to the Full TypeScript chapter and run TS code.

@zhaojj2209 zhaojj2209 force-pushed the feat/typescript-chapter branch from 34c96b1 to da4a5aa Compare March 23, 2023 08:26
@coveralls
Copy link

coveralls commented Mar 23, 2023

Pull Request Test Coverage Report for Build 4500472453

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 9 of 16 (56.25%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 34.811%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pages/playground/Playground.tsx 0 3 0.0%
src/commons/utils/WarningDialogHelper.tsx 6 10 60.0%
Files with Coverage Reduction New Missed Lines %
src/pages/playground/Playground.tsx 1 2.89%
Totals Coverage Status
Change from base Build 4496881301: 0.02%
Covered Lines: 4673
Relevant Lines: 12513

💛 - Coveralls

@zhaojj2209 zhaojj2209 marked this pull request as ready for review March 23, 2023 12:26
@zhaojj2209
Copy link
Contributor Author

Adding ts-morph as a js-slang dependency caused some warnings to appear when building the frontend. This is a known issue when bundling TypeScript with webpack, and cannot be resolved on the js-slang side because the js-slang build does not include its dependencies and they are instead installed directly to the frontend node_modules folder. Fix is to add typescript.js to the webpack noParse config, and also increase the file size limit for caching.

Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@martin-henz martin-henz merged commit f70066c into source-academy:master Mar 23, 2023
RichDom2185 pushed a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Jul 15, 2023
* Add full TS chapter

* Suppress ts-morph warnings

* Add tests

* Bump js-slang

* Fix workaround

* Increase cache size

* Remove tabs for full TS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants