Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gpotter2 committed Jul 24, 2023
1 parent 39e83a5 commit 6ded5e8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 14, 15, 16, 18]
node-version: [10, 12, 14, 15, 16, 18]
steps:
- uses: actions/checkout@v3
- name: Get Node.js ${{ matrix.node-version }}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"devDependencies": {
"@types/node": "^20.4.2",
"chai": "^4.3.7",
"mocha": "^10.2.0",
"mocha": "<9.0.0",
"sinon": "^15.2.0",
"typescript": "<5.1.0"
"typescript": "<5.0.0"
},
"preferGlobal": true,
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/lib/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import { PassThrough } from "stream";
import '../polyfill/globalThis';

function streamifyResponse(handler) {
return (event, context) =>
Expand Down
14 changes: 14 additions & 0 deletions src/polyfill/globalThis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(function (global) {
if (!global.globalThis) {
if (Object.defineProperty) {
Object.defineProperty(global, 'globalThis', {
configurable: true,
enumerable: false,
value: global,
writable: true
});
} else {
global.globalThis = global;
}
}
})(typeof this === 'object' ? this : Function('return this')())
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"allowJs": true,
"declaration": true,
"outDir": "./build",
"target": "es5"
"ignoreDeprecations": "5.0",
"target": "es3"
},
"include": [
"./src/**/*"
Expand Down

0 comments on commit 6ded5e8

Please sign in to comment.