Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gajus/slonik
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v33.0.9
Choose a base ref
...
head repository: gajus/slonik
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v33.0.10
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Feb 23, 2023

  1. Use strict stringify (#461)

    * feat: use stringify strict mode
    
    This mode makes sure functions, NaN and other values that can not
    be represented in JSON throw an appropriate error.
    
    There are still cases left where the result may be undefined, such
    as when a replacer or toJSON function is used and that function
    returns undefined.
    
    * style: apply eslint fixes
    
    ---------
    
    Co-authored-by: Ruben Bridgewater <ruben@bridgewater.de>
    gajus and BridgeAR authored Feb 23, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    renovate-bot Mend Renovate
    Copy the full SHA
    8a1e725 View commit details
  2. Copy the full SHA
    97e1034 View commit details
Showing with 43 additions and 35 deletions.
  1. +30 −30 package-lock.json
  2. +4 −4 package.json
  3. +9 −1 src/utilities/safeStringify.ts
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -11,12 +11,12 @@
"is-plain-object": "^5.0.0",
"iso8601-duration": "^1.3.0",
"p-defer": "^3.0.0",
"pg": "^8.8.0",
"pg": "^8.9.0",
"pg-copy-streams": "^6.0.4",
"pg-copy-streams-binary": "^2.2.0",
"pg-cursor": "^2.7.4",
"pg-protocol": "^1.5.0",
"pg-types": "^4.0.0",
"pg-cursor": "^2.8.0",
"pg-protocol": "^1.6.0",
"pg-types": "^4.0.1",
"postgres-array": "^3.0.1",
"postgres-interval": "^4.0.0",
"roarr": "^7.14.1",
10 changes: 9 additions & 1 deletion src/utilities/safeStringify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import stringify from 'safe-stable-stringify';
import {
configure,
} from 'safe-stable-stringify';

const stringify = configure({
bigint: true,
circularValue: '[Circular]',
strict: true,
});

export const safeStringify = (
subject: unknown,