Skip to content

Mason/fix node#10

Merged
MasonChow merged 5 commits intomainfrom
mason/fix-node
Sep 15, 2025
Merged

Mason/fix node#10
MasonChow merged 5 commits intomainfrom
mason/fix-node

Conversation

@MasonChow
Copy link
Owner

No description provided.

- Commented out the re-export of low-level APIs to maintain backward compatibility.
- Changed the initialization logic to use dynamic import for better control in SSR/custom loading scenarios.
- Updated tests to reflect the new initialization method, ensuring the WASM module is loaded correctly.
- Removed the unused top-level await plugin from Vite configuration and adjusted the target to 'node20' for consistency with WASM bindings.
- Rename package from  to  for consistency.
- Update README with new usage examples and API references.
- Implement a new initialization method for loading the WASM module.
- Enhance API functions to return parsed JS objects instead of raw JSON strings.
- Add TypeScript definitions for better type safety and developer experience.
- Introduce a new  for TypeScript compilation settings.
- Modify build scripts to include type generation and improve output structure.
- Update integration tests to load source maps from the repository for more realistic testing scenarios.
- Ensure all API functions are aligned with the new type definitions and return values.
Copilot AI review requested due to automatic review settings September 14, 2025 15:29
Copy link
Contributor

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 modernizes the Node SDK build configuration and removes reliance on top-level await, while updating tests to use real sourcemap files instead of synthetic data.

  • Removes vite-plugin-top-level-await dependency and updates build configuration
  • Switches from synthetic sourcemap generation to real asset-based testing
  • Adds comprehensive TypeScript type definitions and improves API documentation

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/source_map_parser/tests/integration.rs Replaces synthetic sourcemap tests with real asset-based testing
crates/node_sdk/vite.config.mjs Removes top-level-await plugin and updates build target
crates/node_sdk/tsconfig.json Adds TypeScript configuration for declaration generation
crates/node_sdk/tests/test_basic.test.mjs Updates test imports to use new init pattern
crates/node_sdk/src/types.ts Adds comprehensive TypeScript type definitions
crates/node_sdk/src/index.ts Major rewrite with proper TypeScript types and documentation
crates/node_sdk/package.json Updates build scripts and output filename
crates/node_sdk/README.md Updates documentation with new API examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

MasonChow and others added 3 commits September 14, 2025 23:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MasonChow MasonChow merged commit bd89c1f into main Sep 15, 2025
1 check passed
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.

2 participants