File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/utils/graphql-codegen-testing/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @graphql-codegen/testing ' : patch
3+ ---
4+
5+ Fix usage issue due to ESM/CJS incompatibility
Original file line number Diff line number Diff line change 11import { dirname , join , resolve } from 'path' ;
22import { Types } from '@graphql-codegen/plugin-helpers' ;
3- import { compressToEncodedURIComponent } from 'lz-string' ;
3+ import * as LZString from 'lz-string' ; // lz-string is a package which has CJS/ESM issues. So, we cannot do `import { something } from 'lz-string'`
44import {
55 CompilerOptions ,
66 createCompilerHost ,
@@ -239,7 +239,7 @@ export function compileTs(
239239 }
240240 } catch ( e ) {
241241 if ( openPlayground ) {
242- const compressedCode = compressToEncodedURIComponent ( contents ) ;
242+ const compressedCode = LZString . compressToEncodedURIComponent ( contents ) ;
243243 open ( 'http://www.typescriptlang.org/play/#code/' + compressedCode ) ;
244244 }
245245
You can’t perform that action at this time.
0 commit comments