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

examples の class 化 #496

Merged
merged 20 commits into from
Mar 1, 2024
Merged

examples の class 化 #496

merged 20 commits into from
Mar 1, 2024

Conversation

voluntas
Copy link
Member

@voluntas voluntas commented Feb 29, 2024

This pull request includes changes primarily focused on updating the version of pnpm/action-setup used in the CI workflow, modifying the CHANGES.md file, and refactoring the code in the examples directory. The refactoring changes include renaming identifiers, changing the file extension from .mjs to .mts, and rewriting the code to use TypeScript and a class-based approach.

Version updates and changes in documentation:

  • .github/workflows/ci.yaml: Updated the version of pnpm/action-setup used from v2 to v3.
  • CHANGES.md: Removed the 2023.2.1 section and added changes about converting samples to a class-based approach and preparing a .env.template for samples. [1] [2]

Refactoring and code improvements:

  • examples/messaging/index.html, examples/messaging/main.mjs, examples/messaging/main.mts: Refactored the code to use a class-based approach, renamed identifiers, and changed the file extension from .mjs to .mts. [1] [2] [3] [4]
  • examples/recvonly/index.html, examples/recvonly/main.mjs, examples/recvonly/main.mts: Refactored the code to use a class-based approach, renamed identifiers, and changed the file extension from .mjs to .mts. [1] [2] [3]
  • examples/sendonly/index.html, examples/sendonly/main.mjs, examples/sendonly/main.mts: Refactored the code to use a class-based approach, renamed identifiers, and changed the file extension from .mjs to .mts. [1] [2] [3]
  • examples/sendrecv/index.html: Renamed identifiers and changed the file extension from .mjs to .mts. [1] [2]

@voluntas
Copy link
Member Author

voluntas commented Mar 1, 2024

This pull request includes multiple changes across several files, primarily focusing on updating the JavaScript files and HTML files in the examples directory. The changes include updating the versions of dependencies, refactoring the codebase to improve readability and maintainability, and updating the HTML files to reflect the changes in the JavaScript files.

Here are the most important changes:

Dependency version update:

Codebase refactoring:

  • examples/messaging/main.mjs and examples/messaging/main.mts: Refactored the code to improve readability and maintainability. The code has been restructured into a SoraClient class with methods for connection, disconnection, and message sending. The onnotify and onmessage event handlers have been moved into this class as well. [1] [2]
  • examples/recvonly/main.mjs and examples/recvonly/main.mts: Similar to the messaging example, the code has been refactored into a SoraClient class with methods for connection and disconnection. The onnotify, ontrack, and onremovetrack event handlers have been moved into this class. [1] [2]
  • examples/sendonly/main.mjs and examples/sendonly/main.mts: The code has been refactored into a SoraClient class with methods for connection and disconnection. The onnotify event handler has been moved into this class. [1] [2]

HTML updates:

  • examples/messaging/index.html: Updated the HTML to reflect the changes in the JavaScript file. For instance, the id of the connection display element has been changed from local-connection-id to connection-id. [1] [2]
  • examples/recvonly/index.html: Updated the HTML to reflect the changes in the JavaScript file. For instance, the id of the connection display element has been changed from recvonly-connection-id to connection-id.
  • examples/sendonly/index.html: Updated the HTML to reflect the changes in the JavaScript file. For instance, the id of the connection display element has been changed from sendonly-connection-id to connection-id.
  • examples/sendrecv/index.html: Updated the HTML to reflect the changes in the JavaScript file. For instance, the id of the start button has been changed from start-sendrecv1 to sendrecv1-start. [1] [2]

Other changes:

  • CHANGES.md: Removed the section for version 2023.2.1 and added new changes for the current version. [1] [2]

@voluntas voluntas changed the title [WIP] examples の class 化 examples の class 化 Mar 1, 2024
@voluntas voluntas merged commit 796c554 into develop Mar 1, 2024
7 checks passed
@voluntas voluntas deleted the feature/examples-class branch March 1, 2024 09:19
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.

1 participant