Skip to content

Commit

Permalink
try polyfilling on Node 16
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Aug 8, 2024
1 parent 8b77257 commit efd549f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@
"@types/mocha": "^10.0.6",
"@types/node": "^22.0.0",
"@types/semver": "^7.3.9",
"@types/ungap__structured-clone": "^1.2.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@ungap/structured-clone": "^1.2.0",
"aws-sdk": "^2.1130.0",
"benny": "^3.7.1",
"c8": "^10.1.2",
Expand Down
6 changes: 6 additions & 0 deletions test/_common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import * as gdal from 'gdal-async'
import structuredClone from '@ungap/structured-clone'

console.log(`GDAL Version: ${gdal.version}, source: ${gdal.bundled ? 'bundled' : 'system library'}`)
if (!('structuredClone' in globalThis)) {
console.log('Using a JS implementation of structuredClone')
// eslint-disable-next-line @typescript-eslint/no-explicit-any
globalThis.structuredClone = structuredClone as any
}

// gc tracing
try {
Expand Down
3 changes: 2 additions & 1 deletion test/tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"compilerOptions": {
"downlevelIteration": true,
"strict": true,
"strictNullChecks": true
"strictNullChecks": true,
"esModuleInterop": true
}
}

0 comments on commit efd549f

Please sign in to comment.