Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/ci-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:

- name: Run ESLint
run: |
npm run lint -- -- --report-unused-disable-directives --max-warnings 0
npm run lint -- --report-unused-disable-directives --max-warnings 0
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
### bootstrap

* Fixed `--override` to support `package-lock.json` with `lockfileVersion` 2 and 3.
* Detects `bun.lock` / `bun.lockb` and uses `bun install` instead of npm when present.

### serve, pack

* Replaced webpack and webpack-dev-server with [Bun](https://bun.com) (`Bun.build()` and `Bun.serve()` with HMR).
* Added `config/bun/` bundler plugins for Babel, LESS, PostCSS, SCSS, and CSS Modules.
* Requires Bun 1.3+ (`engines.bun`).

## 7.3.3 (July 7, 2026)

Expand Down
31 changes: 26 additions & 5 deletions commands/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function displayHelp () {
console.log(` ${e} [options]`);
console.log();
console.log(' Options');
console.log(' -b, --base NPM install root level package');
console.log(' -b, --base Install root level package dependencies');
console.log(' (enabled by default)');
console.log(' -s, --sampler NPM install sampler package');
console.log(' -s, --sampler Install sampler package');
console.log(' (enabled by default)');
console.log(' -a, --allsamples NPM install all sample packages');
console.log(' -l, --link After install, attempt to link any available');
Expand All @@ -37,10 +37,17 @@ function displayHelp () {
process.exit(0);
}

function npmExec (args, cwd = process.cwd(), loglevel) {
function detectPackageManager (cwd) {
if (fs.existsSync(path.join(cwd, 'bun.lock')) || fs.existsSync(path.join(cwd, 'bun.lockb'))) {
return 'bun';
}
return 'npm';
}

function packageExec (command, args, cwd = process.cwd(), loglevel) {
return new Promise((resolve, reject) => {
if (loglevel) args.unshift('--loglevel', loglevel);
const child = spawn('npm', args, {stdio: 'inherit', cwd});
if (command === 'npm' && loglevel) args.unshift('--loglevel', loglevel);
const child = spawn(command, args, {stdio: 'inherit', cwd});
child.on('close', code => {
if (code !== 0) {
reject(new Error('Failed to ' + args[args.length - 1] + ': ' + path.basename(cwd)));
Expand All @@ -51,6 +58,20 @@ function npmExec (args, cwd = process.cwd(), loglevel) {
});
}

function npmExec (args, cwd = process.cwd(), loglevel) {
const pm = detectPackageManager(cwd);
if (pm === 'bun') {
if (args[0] === 'install') {
return packageExec('bun', ['install'], cwd, loglevel);
}
if (args[0] === 'run') {
return packageExec('bun', ['run', args[1]], cwd, loglevel);
}
}
if (loglevel) args.unshift('--loglevel', loglevel);
return packageExec('npm', args, cwd, loglevel);
}

function newline () {
console.log();
}
Expand Down
10 changes: 5 additions & 5 deletions commands/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ const enhanced = ['chalk', 'cross-spawn', 'filesize', 'fs-extra', 'minimist', 's
const content = ['@babel/runtime', 'core-js', 'react', 'react-dom'];
const bareDeps = {'cpy-cli': '^3.1.1', rimraf: '^3.0.2'};
const bareTasks = {
serve: 'webpack-dev-server --hot --inline --env development --config config/webpack.config.js',
pack: 'webpack --env development --config config/webpack.config.js && cpy public dist',
'pack-p': 'webpack --env production --config config/webpack.config.js && cpy public dist',
watch: 'cpy public dist && webpack --env development --config config/webpack.config.js --watch',
serve: 'bun config/bun/dev-server.mjs',
pack: 'bun config/bun/build.mjs && cpy public dist',
'pack-p': 'bun config/bun/build.mjs --production && cpy public dist',
watch: 'cpy public dist && bun config/bun/build.mjs --watch',
clean: 'rimraf build dist',
lint: 'eslint --no-config-lookup --config enact --ignore-pattern config/* .',
license: 'license-checker ',
Expand All @@ -61,7 +61,7 @@ function displayHelp () {
console.log(' Options');
console.log(' -b, --bare Abandon Enact CLI command enhancements');
console.log(' and eject into a a barebones setup (using');
console.log(' webpack, eslint, karma, etc. directly)');
console.log(' Bun, eslint, karma, etc. directly)');
console.log(' -v, --version Display version information');
console.log(' -h, --help Display help information');
console.log();
Expand Down
2 changes: 1 addition & 1 deletion commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function api ({cliInfo = false, dev = false} = {}) {
'eslint',
'jest',
'less',
'webpack'
'bun'
].forEach(dep => logVersion(dep));
} else {
const app = require('@enact/dev-utils').optionParser;
Expand Down
Loading
Loading