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

Remove osc-min dependency #124

Closed
wants to merge 3 commits into from
Closed

Remove osc-min dependency #124

wants to merge 3 commits into from

Conversation

MylesBorins
Copy link
Owner

@MylesBorins MylesBorins commented Aug 20, 2024

Fixes #115

Remove the osc-min dependency and implement toBuffer and fromBuffer functions according to the OSC specification.

  • package.json

    • Remove the osc-min dependency.
    • Update the imports section to include #osc pointing to internal/osc.mjs.
  • lib/Client.mjs

    • Remove the import of osc-min.
    • Import toBuffer from #osc.
    • Update the send method to use toBuffer from #osc.
  • lib/Server.mjs

    • Remove the import of #decode.
    • Import fromBuffer from #osc.
    • Update the _sock.on('message') handler to use fromBuffer from #osc.
  • internal/osc.mjs

    • Implement the toBuffer function according to the OSC specification.
    • Implement the fromBuffer function according to the OSC specification.
  • test/test-osc.mjs

    • Add unit tests for toBuffer function.
    • Add unit tests for fromBuffer function.
  • rollup.config.mjs

    • Remove osc-min from the external array in the walkLib and walkTest functions.
    • Add #osc to the external array in the walkLib and walkTest functions.
  • lib/internal/decode.mjs

    • Delete the file.
  • test/test-decode.mjs

    • Delete the file.

For more details, open the Copilot Workspace session.

Fixes #115

Remove the `osc-min` dependency and implement `toBuffer` and `fromBuffer` functions according to the OSC specification.

* **package.json**
  - Remove the `osc-min` dependency.
  - Update the `imports` section to include `#osc` pointing to `internal/osc.mjs`.

* **lib/Client.mjs**
  - Remove the import of `osc-min`.
  - Import `toBuffer` from `#osc`.
  - Update the `send` method to use `toBuffer` from `#osc`.

* **lib/Server.mjs**
  - Remove the import of `#decode`.
  - Import `fromBuffer` from `#osc`.
  - Update the `_sock.on('message')` handler to use `fromBuffer` from `#osc`.

* **internal/osc.mjs**
  - Implement the `toBuffer` function according to the OSC specification.
  - Implement the `fromBuffer` function according to the OSC specification.

* **test/test-osc.mjs**
  - Add unit tests for `toBuffer` function.
  - Add unit tests for `fromBuffer` function.

* **rollup.config.mjs**
  - Remove `osc-min` from the `external` array in the `walkLib` and `walkTest` functions.
  - Add `#osc` to the `external` array in the `walkLib` and `walkTest` functions.

* **lib/internal/decode.mjs**
  - Delete the file.

* **test/test-decode.mjs**
  - Delete the file.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/MylesBorins/node-osc/issues/115?shareId=XXXX-XXXX-XXXX-XXXX).
@@ -1,7 +1,7 @@
import { createSocket } from 'node:dgram';
import { EventEmitter } from 'node:events';

import decode from '#decode';
import { fromBuffer } from '#osc';
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
import { fromBuffer } from '#osc';
import { fromBuffer } from '#osc';
import { toBuffer } from '#osc';

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.

Remove osc-min dependency
1 participant