Skip to content

Commit

Permalink
updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdarveau-MSFT committed Nov 6, 2024
1 parent d948e6d commit 0067e64
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1,018 deletions.
6 changes: 6 additions & 0 deletions packages/teams-js/jest-setup.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/* eslint-disable strict-null-checks/all */
/* eslint-disable @typescript-eslint/no-var-requires */

/**
* This while TextDecoder is supported in both browser and Node environments, it is not supported in jsdom, which we use for our jest environment.
* To resolve this issue, we polyfill TextDecoder with the node implementation prior to rujnning the tests.
*/

const TextDecoder = require('util').TextDecoder;
global.TextDecoder = TextDecoder;
2 changes: 1 addition & 1 deletion packages/teams-js/src/internal/uint8array-extras/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This package is a stripped out version of the [uint8arrays-extras](https://www.npmjs.com/package/uint8array-extras) package, containing only the functionality used by teams-js. Itis being directly included in the library instead of an NPM package due to a Jest issue preventing its usage, which is solved by transpiling the file ourselves. This package is used to replace the `Buffer` package as this is both treeshakable and browser-compatible, so we no longer need to polyfill `Buffer`, which is quite size intensive. This provides a much more space-efficient method to providing the needed functionality.
This package is a stripped out version of the [uint8arrays-extras](https://www.npmjs.com/package/uint8array-extras) package, containing only the functionality used by teams-js. It is being directly included in the library instead of an NPM package due to a Jest issue preventing its usage, which is solved by transpiling the file ourselves. This package is used to replace the `Buffer` package as this is both treeshakable and browser-compatible, so we no longer need to polyfill `Buffer`, which is quite size intensive. This provides a much more space-efficient method to providing the needed functionality. To update our `uint8array-extras` package if a new version is released, we will need to look at the new version of the package published to npm and manually copy the contents to our package here.
94 changes: 0 additions & 94 deletions skeleton-buffer/index.d.ts

This file was deleted.

Loading

0 comments on commit 0067e64

Please sign in to comment.