Skip to content

Commit

Permalink
Merge branch 'main' into feature/isClass
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson authored Nov 23, 2024
2 parents bdc10f7 + e9c274b commit 7cfd06b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions scripts/bench-file/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ async function main() {
const rootDir = new URL('../../../', import.meta.url).pathname
const scriptDir = new URL('../', import.meta.url).pathname
const nodeModulesDir = path.join(rootDir, 'node_modules')
const vitestDir = path.join(nodeModulesDir, 'vitest')

// If the root node_modules directory doesn't contain vitest, link
// it to the vitest installed for this script.
fs.mkdirSync(nodeModulesDir, { recursive: true })
try {
if (!fs.existsSync(vitestDir)) {
fs.mkdirSync(nodeModulesDir, { recursive: true })
fs.symlinkSync(
path.relative(
nodeModulesDir,
path.join(scriptDir, 'node_modules/vitest'),
),
path.join(nodeModulesDir, 'vitest'),
vitestDir,
)
} catch (e) {
console.warn(e)
}

const vitest = await createVitest('benchmark', {
Expand Down
6 changes: 3 additions & 3 deletions scripts/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function main([command, ...argv]) {
return
}

console.log(
console.warn(
`> Installing dependencies for ${path.relative(process.cwd(), pkgDir)}`,
)

Expand All @@ -58,7 +58,7 @@ async function main([command, ...argv]) {
installer.on('error', reject)
})

console.log()
console.warn()

for (const [name, version] of Object.entries(pkg.dependencies)) {
if (name === 'radashi') {
Expand Down Expand Up @@ -86,7 +86,7 @@ async function main([command, ...argv]) {
if (major < 22 || (major === 22 && minor < 6)) {
const tsxSpecifier = '[email protected]'
if (process.env.CI) {
console.log(`> pnpm add -g ${tsxSpecifier}`)
console.warn(`> pnpm add -g ${tsxSpecifier}`)
await new Promise((resolve, reject) => {
const installer = spawn('pnpm', ['install', '-g', tsxSpecifier], {
stdio: 'inherit',
Expand Down

0 comments on commit 7cfd06b

Please sign in to comment.