Skip to content

Commit

Permalink
refactor: use tinyspawn
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 9, 2024
1 parent 0f2bfb6 commit 0674993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ava": "latest",
"babel-plugin-transform-react-pure-class-to-function": "latest",
"babel-plugin-transform-react-remove-prop-types": "latest",
"execa": "latest",
"tinyspawn": "latest",
"lodash": "latest",
"prop-types": "latest",
"react": "18",
Expand Down
6 changes: 3 additions & 3 deletions packages/react/test/build.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { $ } from 'execa'
import $ from 'tinyspawn'
import test from 'ava'

const evalScript = code => $`node --eval ${code}`.then(({ stdout }) => stdout)
evalScript.esm = code => $`node --input-type module --eval ${code}`.then(({ stdout }) => stdout)
const evalScript = (code, flags = []) => $('node', ['--eval', code, ...flags]).then(({ stdout }) => stdout)
evalScript.esm = code => evalScript(code, ['--input-type', 'module'])

test('cjs', async t => {
t.snapshot((await evalScript("console.log(require('./dist/microlink.cjs'))")))
Expand Down

0 comments on commit 0674993

Please sign in to comment.