Skip to content

Commit

Permalink
Fixed patching script to work with pnpm nohoist core package
Browse files Browse the repository at this point in the history
  • Loading branch information
fayeed committed Dec 8, 2023
1 parent 1383c4b commit a51685c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ui/scripts/patch-safe-buffer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash

sed -i "s/import buffer from 'node:buffer';/const buffer = require('buffer');/" ../node_modules/safe-buffer/index.js
sed -i "s/import buffer from 'node:buffer';/const buffer = require('buffer');/" ../core/node_modules/safe-buffer/index.js

sed -i "s/import buffer from 'node:buffer'/const buffer = require('buffer');/" ../node_modules/safer-buffer/safer.js
sed -i "s/import buffer from 'node:buffer'/const buffer = require('buffer');/" ../core/node_modules/safer-buffer/safer.js
4 changes: 2 additions & 2 deletions ui/scripts/reverse-patch-safe-buffer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash

sed -i "s/const buffer = require('buffer');/import buffer from 'node:buffer';/" ../node_modules/safe-buffer/index.js
sed -i "s/const buffer = require('buffer');/import buffer from 'node:buffer';/" ../core/node_modules/safe-buffer/index.js

sed -i "s/const buffer = require('buffer');/import buffer from 'node:buffer';/" ../node_modules/safer-buffer/safer.js
sed -i "s/const buffer = require('buffer');/import buffer from 'node:buffer';/" ../core/node_modules/safer-buffer/safer.js

0 comments on commit a51685c

Please sign in to comment.