Skip to content

Commit

Permalink
Try to fix patch-package call on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed Jul 30, 2024
1 parent a87389d commit e72b19d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/jest-dom/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import * as childProcess from 'node:child_process';
import { promisify } from 'node:util';
import { fork } from 'node:child_process';

import babel from '@rollup/plugin-babel';
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';

import { rollupPluginDomAccessibilityApi } from '../rollup-plugin-dom-accessibility-api.js';

const exec = promisify(childProcess.exec);

const extensions = ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.tsx'];

const { stdout, stderr } = await exec('./node_modules/.bin/patch-package');
process.stdout.write(stdout);
process.stderr.write(stderr);
await new Promise((resolve, reject) => {
const child = fork('./node_modules/.bin/patch-package', [], {
stdio: 'inherit',
});
child.on('exit', (code) => {
if (code === 0) resolve();
else reject(new Error(`patch-package exited with code ${code}`));
});
});

const stubs = {
chalk: `
Expand Down

0 comments on commit e72b19d

Please sign in to comment.