Skip to content

Commit

Permalink
fix: commonjs module in ESM usage (#271)
Browse files Browse the repository at this point in the history
close #270
  • Loading branch information
JounQin committed Jul 7, 2023
1 parent 22ebead commit 038ccb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-owls-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"prettier-plugin-sql": patch
---

fix: commonjs module in ESM usage
5 changes: 3 additions & 2 deletions packages/sql/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { type AST, type Option, Parser } from 'node-sql-parser'
import type { AST, Option } from 'node-sql-parser'
import nodeSqlParser from 'node-sql-parser'
import type { Options, ParserOptions, Plugin } from 'prettier'
import { format, type FormatOptions } from 'sql-formatter'

import { languages } from './languages.js'

const parser = new Parser()
const parser = new nodeSqlParser.Parser()

const SQL_FORMATTER = 'sql-formatter'
const NODE_SQL_PARSER = 'node-sql-parser'
Expand Down

0 comments on commit 038ccb7

Please sign in to comment.