Skip to content

Commit

Permalink
Path resolution fix (#15)
Browse files Browse the repository at this point in the history
* fix: fixed wasm path resolution

* build: updated version to 0.9.6
  • Loading branch information
erik-perri authored May 8, 2024
1 parent 256b955 commit 453c4a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sourcetoad/add-badge",
"version": "0.9.5",
"version": "0.9.6",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
3 changes: 1 addition & 2 deletions src/utils/initializeImageMagick.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';

import { initializeImageMagick as baseInitializeImageMagick } from '@imagemagick/magick-wasm';

export default async function initializeImageMagick(): Promise<void> {
const wasmBytes = readFileSync(
resolve('node_modules/@imagemagick/magick-wasm/dist/magick.wasm'),
require.resolve('@imagemagick/magick-wasm/magick.wasm'),
);
await baseInitializeImageMagick(wasmBytes);
}

0 comments on commit 453c4a9

Please sign in to comment.