Skip to content

Conversation

samchon
Copy link
Owner

@samchon samchon commented Jun 26, 2025

This pull request significantly refactors the website directory to improve the compiler infrastructure, streamline the build process, and enhance the playground's functionality. The most notable changes include replacing the old compiler implementation with a new one based on embed-typescript, restructuring file paths, and updating the playground's UI components.

Compiler Refactor and Infrastructure Updates:

  • Replaced the old TypeScriptCompiler implementation with a new compiler service using embed-typescript for enhanced modularity and maintainability. (website/src/compiler/ICompilerService.ts, website/src/compiler/index.ts, website/build/compiler.js, [1] [2] [3]
  • Added a new package.json for compiler-dependencies to manage dependencies for the compiler service. (website/compiler-dependencies/package.json, website/compiler-dependencies/package.jsonR1-R18)

Build Process Improvements:

  • Updated the build script to include a dedicated compiler build step (build:compiler) and removed redundant raw data generation logic. (website/package.json, [1] [2] [3] [4]
  • Adjusted the rspack.config.js to reflect the new file structure and output paths for the compiler. (website/rspack.config.js, website/rspack.config.jsL2-R7)

Playground Enhancements:

File Structure and Dependency Updates:

  • Renamed compilers directory and related references to compiler for consistency. (website/.gitignore, website/rspack.config.js, [1] [2]
  • Removed unused dependencies and added embed-typescript to the project. (website/package.json, [1] [2]

These changes collectively enhance the maintainability, performance, and user experience of the website project.

@samchon samchon requested a review from Copilot June 26, 2025 14:17
@samchon samchon self-assigned this Jun 26, 2025
@samchon samchon added the enhancement New feature or request label Jun 26, 2025
Copy link

socket-security bot commented Jun 26, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License

View full report

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the playground compiler to use embed-typescript, streamlines the build process, and enhances the UI components in the playground.

  • Replaced the old TypeScriptCompiler service with a new EmbedTypeScript-based implementation under src/compiler
  • Updated build scripts and rspack.config.js to include a dedicated compiler build step and new file paths
  • Improved playground components: added default script constant, JSON output support, and stricter typing

Reviewed Changes

Copilot reviewed 16 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/src/pages/Playground.tsx Updated compiler service import, compile/transform logic, and script defaults
website/src/compiler/index.ts New EmbedTypeScript-based compiler worker implementation
website/src/components/playground/OutputViewer.tsx Extended to accept json language, introduced IProps namespace
website/src/components/playground/PLAYGROUND_DEFAULT_SCRIPT.ts Added default playground script constant
website/rspack.config.js Adjusted entry and output paths for new compiler directory
website/package.json Added build:compiler script, moved TypeScript to devDeps
Files not reviewed (1)
  • website/compiler-dependencies/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

website/src/pages/Playground.tsx:270

  • Move the createCompilerService declaration above its first usage in the component to avoid a reference error caused by the temporal dead zone of const.
const createCompilerService = new Singleton(async () => {

@samchon samchon merged commit 6eac840 into master Jun 26, 2025
4 checks passed
@samchon samchon deleted the feat/playground branch June 26, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant