Conversation
The code looks more native now.
There was a problem hiding this comment.
Pull request overview
This PR removes the Bluebird dependency and migrates the codebase (core plugin + packagers + tests) to native Promise and async/await patterns.
Changes:
- Dropped
bluebirdfrompackage.jsonand replacedBbPromise.*usages acrosslib/andtests/. - Refactored several modules (notably compilation/packaging paths) to
async/awaitwith native concurrency handling. - Updated Jest mocks/tests to work with Node-style async APIs (
fs.readFile,fs.stat) and native promises.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/wpwatch.test.js | Replaced BbPromise.join/reject with Promise.all/native Promise.reject. |
| tests/validate.test.js | Updated mocked config loads and rejection cases to native promises. |
| tests/runPluginSupport.test.js | Replaced BbPromise.join with Promise.all. |
| tests/run.test.js | Updated watch handler stubs from Bluebird to native resolved promises. |
| tests/prepareStepOfflineInvoke.test.js | Updated spawn rejection to native Promise.reject. |
| tests/prepareOfflineInvoke.test.js | Updated spawn rejection to native Promise.reject. |
| tests/packagers/yarn.test.js | Updated spawnProcess stubs to return native promises. |
| tests/packagers/npm.test.js | Updated spawnProcess stubs to return native promises. |
| tests/packageModules.test.js | Replaced Bluebird sequencing helpers with async loops/native promises. |
| tests/packExternalModules.test.js | Updated packager mock returns and assertions to native promises. |
| tests/index.test.js | Updated plugin hook stubs to return native promises. |
| package.json | Removed bluebird dependency. |
| lib/wpwatch.js | Converted Bluebird usage to native promises for watch lifecycle. |
| lib/validate.js | Replaced Bluebird resolves/rejects with native Promise patterns; minor optional chaining cleanup. |
| lib/utils.js | Removed lodash/bluebird usage; native implementations for cache purge + helpers. |
| lib/runPluginSupport.js | Replaced BbPromise.resolve() with Promise.resolve(). |
| lib/run.js | Reworked watch flow away from BbPromise.try to try/catch + Promise.resolve(action). |
| lib/packagers/yarn.js | Migrated to async/await and removed Bluebird-specific helpers. |
| lib/packagers/npm.js | Migrated to async/await and removed Bluebird-specific helpers. |
| lib/packagers/index.js | Updated packager interface docs to Promise-based terminology. |
| lib/packageModules.js | Replaced Bluebird promisify/mapSeries with util.promisify + async loops + Promise.all. |
| lib/packExternalModules.js | Converted to async/await; introduced helper for callback/promise interop. |
| lib/compile.js | Replaced Bluebird concurrency with custom async concurrency mapper. |
| lib/cleanup.js | Replaced BbPromise.resolve() with Promise.resolve(). |
| index.js | Updated Serverless hook chains from BbPromise.bind/tap to native promise chaining. |
| biome.jsonc | Updated Biome schema URL version. |
| mocks/fs.js | Added callback-based readFile/stat and mode to support promisified fs usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
package.json:41
- After removing the
bluebirddependency, there are still repo artifacts that reference it (e.g.README.mdandexamples/babel-webpack-5/lib/App.jsimport/requirebluebird). Consumers following the README or running examples will hit a runtime/module-resolution error unless those references are updated (orbluebirdis kept as a dependency/devDependency). Consider updating docs/examples (and regeneratingpackage-lock.jsonif applicable) as part of this change.
"dependencies": {
"archiver": "^7.0.1",
"find-yarn-workspace-root": "^2.0.0",
"fs-extra": "^11.3.4",
"glob": "^13.0.6",
"lodash": "^4.18.1",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
vicary
left a comment
There was a problem hiding this comment.
Ah, finally!
Tried exactly this a few years ago, blocked by the support matrix back then. It surely feels weird that this is trivial work now with LLM.
The code looks more native now.