Skip to content

Commit

Permalink
Fix bare-test
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Nov 7, 2023
1 parent 946d853 commit 67f5e8a
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions typescript/src/composables/package.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,32 @@ export default composable<ResolvedOptions>(
scripts = extendObjectProperties(
scripts,
{
'bare-test': anyTestProject
? 'cross-env NODE_OPTIONS=--experimental-vm-modules jest'
: undefined,
test: extendPackageScript(
extendPackageScript(scripts.test, `${packageManager} build`, {
after: '*lint-prettier*',
}),
`${packageManager} bare-test`,
),
test: extendPackageScript(scripts.test, `${packageManager} build`, {
after: '*lint-prettier*',
}),
},
{
after: '*lint*',
},
);

if (anyTestProject) {
scripts = extendObjectProperties(
scripts,
{
'bare-test':
'cross-env NODE_OPTIONS=--experimental-vm-modules jest',
test: extendPackageScript(
scripts.test,
`${packageManager} bare-test`,
),
},
{
before: 'test',
},
);
}

return {
...data,
scripts,
Expand Down

0 comments on commit 67f5e8a

Please sign in to comment.