Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: Don't assume named exports interop (#1154)
  • Loading branch information
eps1lon committed Aug 4, 2022
1 parent 73a5694 commit 4f965e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/screen.ts
@@ -1,4 +1,6 @@
import {compressToEncodedURIComponent} from 'lz-string'
// WARNING: `lz-string` only has a default export but statically we assume named exports are allowd
// TODO: Statically verify we don't rely on NodeJS implicit named imports.
import lzString from 'lz-string'
import type {OptionsReceived} from 'pretty-format'
import {getQueriesForElement} from './get-queries-for-element'
import {getDocument} from './helpers'
Expand All @@ -12,7 +14,7 @@ function unindent(string: string) {
}

function encode(value: string) {
return compressToEncodedURIComponent(unindent(value))
return lzString.compressToEncodedURIComponent(unindent(value))
}

function getPlaygroundUrl(markup: string) {
Expand Down

0 comments on commit 4f965e9

Please sign in to comment.