Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
FORCE_COLOR: 2
NODE_DISABLE_COMPILE_CACHE: 1

jobs:
lint:
Expand Down
5 changes: 5 additions & 0 deletions lib/cjs.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
const mod = require('node:module')

// to use V8's code cache to speed up instantiation time
mod.enableCompileCache?.()

const { default: npmRunAll } = require('./esm.mjs')

// Didn't manage to get this into the last breaking change, so adding a cjs as the primary export
Expand Down
4 changes: 4 additions & 0 deletions lib/esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// Requirements
// ------------------------------------------------------------------------------

import { enableCompileCache } from 'node:module'
import shellQuote from 'shell-quote'
import matchTasks from './match-tasks.js'
import readPackageJson from './read-package-json.js'
Expand All @@ -18,6 +19,9 @@ import runTasks from './run-tasks.js'
// Helpers
// ------------------------------------------------------------------------------

// to use V8's code cache to speed up instantiation time
enableCompileCache?.()

const ARGS_PATTERN = /\{(!)?([*@%]|\d+)([^}]+)?}/g
const ARGS_UNPACK_PATTERN = /\{(!)?([%])([^}]+)?}/g

Expand Down
Loading