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(jex): shim buffer #499

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jex/build-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ esbuild
platform: 'browser',
format: 'esm',
outfile: 'dist/index.mjs',
inject: ['shims.js'],
plugins: [polyfillNode()]
})
.catch(() => process.exit(1))
3 changes: 2 additions & 1 deletion jex/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bpinternal/jex",
"version": "1.2.0",
"version": "1.2.1",
"description": "JSON-Extends; JSON Schema type checking library",
"main": "dist/index.cjs",
"module": "./dist/index.mjs",
Expand All @@ -26,6 +26,7 @@
"@types/lodash": "^4.14.202",
"@vitest/browser": "^2.1.8",
"ajv": "^8.12.0",
"buffer": "^6.0.3",
"esbuild": "^0.24.0",
"esbuild-plugin-polyfill-node": "^0.3.0",
"playwright": "^1.49.0",
Expand Down
18 changes: 18 additions & 0 deletions jex/pnpm-lock.yaml

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

6 changes: 6 additions & 0 deletions jex/shims.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Buffer } from 'buffer'

// Ensure Buffer is available globally
if (typeof globalThis.Buffer === 'undefined') {
globalThis.Buffer = Buffer
}
Loading