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

fix: Don't assume named exports interop #1154

Merged
merged 1 commit into from Aug 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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