Skip to content

Commit

Permalink
fix(rust-plugins): πŸ› mdx plugin path fix (#107)
Browse files Browse the repository at this point in the history
* fix(rust-plugins): πŸ› mdx plugin path fix

* chore(rust-plugins): πŸ€– bump mdx version
  • Loading branch information
Maidang1 authored Jan 10, 2025
1 parent c6a251c commit e8ec3ec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
6 changes: 6 additions & 0 deletions rust-plugins/mdx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @farmfe/plugin-mdx

## 0.0.6

### Patch Changes

- fix package import path

## 0.0.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion rust-plugins/mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@farmfe/plugin-mdx",
"version": "0.0.5",
"version": "0.0.6",
"main": "scripts/index.js",
"types": "scripts/index.d.ts",
"type": "module",
Expand Down
18 changes: 9 additions & 9 deletions rust-plugins/mdx/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ switch (platform) {
if (existsSync(join(currentDir, '../npm/win32-x64-msvc/index.farm'))) {
binPath = join(currentDir, '../npm/win32-x64-msvc/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-win32-x64-msvc');
binPath = require.resolve('@farmfe/plugin-mdx-win32-x64-msvc');
}

break;
case 'ia32':
if (existsSync(join(currentDir, '../npm/win32-ia32-msvc/index.farm'))) {
binPath = join(currentDir, '../npm/win32-ia32-msvc/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-win32-ia32-msvc');
binPath = require.resolve('@farmfe/plugin-mdx-win32-ia32-msvc');
}

break;
case 'arm64':
if (existsSync(join(currentDir, '../npm/win32-arm64-msvc/index.farm'))) {
binPath = join(currentDir, '../npm/win32-arm64-msvc/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-win32-arm64-msvc');
binPath = require.resolve('@farmfe/plugin-mdx-win32-arm64-msvc');
}

break;
Expand All @@ -61,14 +61,14 @@ switch (platform) {
if (existsSync(join(currentDir, '../npm/darwin-x64/index.farm'))) {
binPath = join(currentDir, '../npm/darwin-x64/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-darwin-x64');
binPath = require.resolve('@farmfe/plugin-mdx-darwin-x64');
}
break;
case 'arm64':
if (existsSync(join(currentDir, '../npm/darwin-arm64/index.farm'))) {
binPath = join(currentDir, '../npm/darwin-arm64/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-darwin-arm64');
binPath = require.resolve('@farmfe/plugin-mdx-darwin-arm64');
}
break;
default:
Expand All @@ -82,13 +82,13 @@ switch (platform) {
if (existsSync(join(currentDir, '../npm/linux-x64-musl/index.farm'))) {
binPath = join(currentDir, '../npm/linux-x64-musl/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-linux-x64-musl');
binPath = require.resolve('@farmfe/plugin-mdx-linux-x64-musl');
}
} else {
if (existsSync(join(currentDir, '../npm/linux-x64-gnu/index.farm'))) {
binPath = join(currentDir, '../npm/linux-x64-gnu/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-linux-x64-gnu');
binPath = require.resolve('@farmfe/plugin-mdx-linux-x64-gnu');
}
}

Expand All @@ -101,15 +101,15 @@ switch (platform) {
) {
binPath = join(currentDir, '../npm/linux-arm64-musl/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-linux-arm64-musl');
binPath = require.resolve('@farmfe/plugin-mdx-linux-arm64-musl');
}
} else {
if (
existsSync(join(currentDir, '../npm/linux-arm64-gnu/index.farm'))
) {
binPath = join(currentDir, '../npm/linux-arm64-gnu/index.farm');
} else {
binPath = require.resolve('@farmfe/plugin-plugin-mdx-linux-arm64-gnu');
binPath = require.resolve('@farmfe/plugin-mdx-linux-arm64-gnu');
}
}
break;
Expand Down

0 comments on commit e8ec3ec

Please sign in to comment.