-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Add npm diff #144
RFC: Add npm diff #144
Conversation
Interesting - this is diffing between the file contents, but i'd also want to know the theoretical lockfile diff - iow, what transitive dep name/version changes have happened across that span. |
I also asked during the RFC call about whether the diff should be from "current to wanted" by default rather than "current to latest", so as to avoid breaking changes (matching what |
btw we actually have a working prototype over at npm/cli#1319 |
@coreyfarrell suggested in the tooling WG that it would be nice to have a |
@ruyadorno have you considered if any standard diff CLI flags will be supported? Like diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
index 6e3935d138..e6ae3952f3 100644
--- a/lib/internal/main/worker_thread.js
+++ b/lib/internal/main/worker_thread.js
@@ -113,8 +113,9 @@ port.on('message', (message) => {
initializeDeprecations();
initializeWASI();
initializeCJSLoader();
- initializeESMLoader();
+ initializeESMLoader(loaderPort);
+ if (!internal) {
const CJSLoader = require('internal/modules/cjs/loader');
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
loadPreloadModules();
@@ -122,6 +123,7 @@ port.on('message', (message) => {
if (argv !== undefined) {
process.argv = process.argv.concat(argv);
}
+ }
publicWorker.parentPort = publicPort;
publicWorker.workerData = workerData;
With or without support for standard |
In general it’d be nice if it could defer to git diff - and all its options. |
Quickly sharing my learnings from working on https://github.com/juliangruber/npm-diff:
|
- As proposed in RFC: npm/rfcs#144
- As proposed in RFC: npm/rfcs#144
- As proposed in RFC: npm/rfcs#144
- As proposed in RFC: npm/rfcs#144
- As proposed in RFC: npm/rfcs#144 PR-URL: #1319 Credit: @ruyadorno Close: #1319 Reviewed-by: @isaacs
Should this be merged? |
yes! I'll just finish cleaning it up and merge it as implemented 😊 |
For future reference, this feature went out in |
Quick overview:
See more in the rendered RFC