Skip to content

Commit

Permalink
test: change module
Browse files Browse the repository at this point in the history
  • Loading branch information
gao-sun committed Mar 16, 2024
1 parent 01d846b commit 9045f1e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/factories/createPrimitiveValueExpressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const createPrimitiveValueExpressions = (values: readonly unknown[]): rea
primitiveValueExpressions.push(value);
} else {
log.warn({
value: JSON.parse(safeStringify.default(value)),
values: JSON.parse(safeStringify.default(values)),
value: JSON.parse(safeStringify(value)),
values: JSON.parse(safeStringify(values)),
}, 'unexpected value expression');

throw new UnexpectedStateError('Unexpected value expression.');
Expand Down
6 changes: 3 additions & 3 deletions src/factories/createSqlTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const sql: SqlTaggedTemplate = (
if (token === undefined) {
log.debug({
index,
parts: JSON.parse(safeStringify.default(parts)),
values: JSON.parse(safeStringify.default(values)),
parts: JSON.parse(safeStringify(parts)),
values: JSON.parse(safeStringify(values)),
}, 'bound values');

throw new InvalidInputError('SQL tag cannot be bound an undefined value.');
Expand All @@ -89,7 +89,7 @@ const sql: SqlTaggedTemplate = (
log.error({
constructedSql: rawSql,
index,
offendingToken: JSON.parse(safeStringify.default(token)),
offendingToken: JSON.parse(safeStringify(token)),
}, 'unexpected value expression');

throw new TypeError('Unexpected value expression.');
Expand Down
2 changes: 1 addition & 1 deletion src/sqlFragmentFactories/createJsonSqlFragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const createJsonSqlFragment = (token: JsonBinarySqlToken | JsonSqlToken,
throw new InvalidInputError('JSON payload must be a primitive value or a plain object.');
} else {
try {
value = safeStringify.default(token.value);
value = safeStringify(token.value);
} catch (error) {
log.error({
error: serializeError(error),
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@silverhand/ts-config/tsconfig.base",
"compilerOptions": {
"moduleResolution": "bundler",
"module": "esnext",
"outDir": "dist",
"noImplicitReturns": true,
// We need to enable the following flags in the future
Expand Down

0 comments on commit 9045f1e

Please sign in to comment.