Skip to content
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
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _clean_dist:

init: _clean_dist
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear dprint taplo-cli -y
node packages/tools/src/bin.js sync-remote
node packages/tools/src/index.ts sync-remote
pnpm install
pnpm -C docs install

Expand Down
8 changes: 6 additions & 2 deletions packages/cli/binding/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,17 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
wasiBindingError = err;
}
}
if (!nativeBinding) {
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
try {
wasiBinding = require('@voidzero-dev/vite-plus-wasm32-wasi');
nativeBinding = wasiBinding;
} catch (err) {
if (process.env.NAPI_RS_FORCE_WASI) {
wasiBindingError.cause = err;
if (!wasiBindingError) {
wasiBindingError = err;
} else {
wasiBindingError.cause = err;
}
loadErrors.push(err);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/__tests__/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'node:path';

import { describe, expect, test } from '@voidzero-dev/vite-plus-test';

import { isPassThroughEnv, replaceUnstableOutput } from '../utils.js';
import { isPassThroughEnv, replaceUnstableOutput } from '../utils.ts';

describe('replaceUnstableOutput()', () => {
test('strip ANSI escape sequences', () => {
Expand Down
14 changes: 7 additions & 7 deletions packages/tools/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ const subcommand = process.argv[2];

switch (subcommand) {
case 'snap-test':
const { snapTest } = await import('./snap-test.js');
const { snapTest } = await import('./snap-test.ts');
await snapTest();
break;
case 'replace-file-content':
const { replaceFileContent } = await import('./replace-file-content.js');
const { replaceFileContent } = await import('./replace-file-content.ts');
replaceFileContent();
break;
case 'sync-remote':
const { syncRemote } = await import('./sync-remote-deps.js');
const { syncRemote } = await import('./sync-remote-deps.ts');
await syncRemote();
break;
case 'json-sort':
const { jsonSort } = await import('./json-sort.js');
const { jsonSort } = await import('./json-sort.ts');
jsonSort();
break;
case 'merge-peer-deps':
const { mergePeerDeps } = await import('./merge-peer-deps.js');
const { mergePeerDeps } = await import('./merge-peer-deps.ts');
mergePeerDeps();
break;
case 'install-global-cli':
const { installGlobalCli } = await import('./install-global-cli.js');
const { installGlobalCli } = await import('./install-global-cli.ts');
installGlobalCli();
break;
case 'brand-vite':
const { brandVite } = await import('./brand-vite.js');
const { brandVite } = await import('./brand-vite.ts');
brandVite();
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/sync-remote-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ export async function syncRemote() {
log('✓ package.json exports updated successfully!');

// Apply Vite+ branding patches to vite source
const { brandVite } = await import('./brand-vite.js');
const { brandVite } = await import('./brand-vite.ts');
brandVite(rootDir);

log('✓ Done!');
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"allowImportingTsExtensions": true,
"declaration": true,
"esModuleInterop": true,
"module": "nodenext",
Expand Down
Loading